Lines Matching full:ocelot

10 #include <soc/mscc/ocelot.h>
890 static int vsc9959_gcb_soft_rst_status(struct ocelot *ocelot) in vsc9959_gcb_soft_rst_status() argument
894 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); in vsc9959_gcb_soft_rst_status()
899 static int vsc9959_sys_ram_init_status(struct ocelot *ocelot) in vsc9959_sys_ram_init_status() argument
901 return ocelot_read(ocelot, SYS_RAM_INIT); in vsc9959_sys_ram_init_status()
907 static int vsc9959_reset(struct ocelot *ocelot) in vsc9959_reset() argument
912 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1); in vsc9959_reset()
914 err = readx_poll_timeout(vsc9959_gcb_soft_rst_status, ocelot, val, !val, in vsc9959_reset()
917 dev_err(ocelot->dev, "timeout: switch core reset\n"); in vsc9959_reset()
922 ocelot_write(ocelot, SYS_RAM_INIT_RAM_INIT, SYS_RAM_INIT); in vsc9959_reset()
923 err = readx_poll_timeout(vsc9959_sys_ram_init_status, ocelot, val, !val, in vsc9959_reset()
927 dev_err(ocelot->dev, "timeout: switch sram init\n"); in vsc9959_reset()
932 ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1); in vsc9959_reset()
937 static void vsc9959_phylink_validate(struct ocelot *ocelot, int port, in vsc9959_phylink_validate() argument
941 struct ocelot_port *ocelot_port = ocelot->ports[port]; in vsc9959_phylink_validate()
974 static int vsc9959_prevalidate_phy_mode(struct ocelot *ocelot, int port, in vsc9959_prevalidate_phy_mode() argument
1016 static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) in vsc9959_mdio_bus_alloc() argument
1018 struct felix *felix = ocelot_to_felix(ocelot); in vsc9959_mdio_bus_alloc()
1020 struct device *dev = ocelot->dev; in vsc9959_mdio_bus_alloc()
1079 struct ocelot_port *ocelot_port = ocelot->ports[port]; in vsc9959_mdio_bus_alloc()
1107 static void vsc9959_mdio_bus_free(struct ocelot *ocelot) in vsc9959_mdio_bus_free() argument
1109 struct felix *felix = ocelot_to_felix(ocelot); in vsc9959_mdio_bus_free()
1112 for (port = 0; port < ocelot->num_phys_ports; port++) { in vsc9959_mdio_bus_free()
1124 static void vsc9959_sched_speed_set(struct ocelot *ocelot, int port, in vsc9959_sched_speed_set() argument
1147 ocelot_rmw_rix(ocelot, in vsc9959_sched_speed_set()
1153 static void vsc9959_new_base_time(struct ocelot *ocelot, ktime_t base_time, in vsc9959_new_base_time() argument
1161 ocelot_ptp_gettime64(&ocelot->ptp_info, &ts); in vsc9959_new_base_time()
1175 static u32 vsc9959_tas_read_cfg_status(struct ocelot *ocelot) in vsc9959_tas_read_cfg_status() argument
1177 return ocelot_read(ocelot, QSYS_TAS_PARAM_CFG_CTRL); in vsc9959_tas_read_cfg_status()
1180 static void vsc9959_tas_gcl_set(struct ocelot *ocelot, const u32 gcl_ix, in vsc9959_tas_gcl_set() argument
1183 ocelot_write(ocelot, in vsc9959_tas_gcl_set()
1187 ocelot_write(ocelot, entry->interval, QSYS_GCL_CFG_REG_2); in vsc9959_tas_gcl_set()
1190 static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port, in vsc9959_qos_port_tas_set() argument
1198 ocelot_rmw_rix(ocelot, in vsc9959_qos_port_tas_set()
1214 ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port) | in vsc9959_qos_port_tas_set()
1223 val = ocelot_read(ocelot, QSYS_PARAM_STATUS_REG_8); in vsc9959_qos_port_tas_set()
1227 ocelot_rmw_rix(ocelot, in vsc9959_qos_port_tas_set()
1236 vsc9959_new_base_time(ocelot, taprio->base_time, in vsc9959_qos_port_tas_set()
1238 ocelot_write(ocelot, base_ts.tv_nsec, QSYS_PARAM_CFG_REG_1); in vsc9959_qos_port_tas_set()
1239 ocelot_write(ocelot, lower_32_bits(base_ts.tv_sec), QSYS_PARAM_CFG_REG_2); in vsc9959_qos_port_tas_set()
1241 ocelot_write(ocelot, in vsc9959_qos_port_tas_set()
1245 ocelot_write(ocelot, taprio->cycle_time, QSYS_PARAM_CFG_REG_4); in vsc9959_qos_port_tas_set()
1246 ocelot_write(ocelot, taprio->cycle_time_extension, QSYS_PARAM_CFG_REG_5); in vsc9959_qos_port_tas_set()
1249 vsc9959_tas_gcl_set(ocelot, i, &taprio->entries[i]); in vsc9959_qos_port_tas_set()
1251 ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_CONFIG_CHANGE, in vsc9959_qos_port_tas_set()
1255 ret = readx_poll_timeout(vsc9959_tas_read_cfg_status, ocelot, val, in vsc9959_qos_port_tas_set()
1265 struct ocelot *ocelot = ds->priv; in vsc9959_qos_port_cbs_set() local
1273 ocelot_write_gix(ocelot, QSYS_CIR_CFG_CIR_RATE(0) | in vsc9959_qos_port_cbs_set()
1277 ocelot_rmw_gix(ocelot, 0, QSYS_SE_CFG_SE_AVB_ENA, in vsc9959_qos_port_cbs_set()
1291 ocelot_write_gix(ocelot, in vsc9959_qos_port_cbs_set()
1297 ocelot_rmw_gix(ocelot, in vsc9959_qos_port_cbs_set()
1312 struct ocelot *ocelot = ds->priv; in vsc9959_port_setup_tc() local
1316 return vsc9959_qos_port_tas_set(ocelot, port, type_data); in vsc9959_port_setup_tc()
1324 static void vsc9959_xmit_template_populate(struct ocelot *ocelot, int port) in vsc9959_xmit_template_populate() argument
1326 struct ocelot_port *ocelot_port = ocelot->ports[port]; in vsc9959_xmit_template_populate()
1335 src = ocelot->num_phys_ports; in vsc9959_xmit_template_populate()
1377 struct ocelot *ocelot = (struct ocelot *)data; in felix_irq_handler() local
1387 ocelot_get_txtstamp(ocelot); in felix_irq_handler()
1396 struct ocelot *ocelot; in felix_pci_probe() local
1430 ocelot = &felix->ocelot; in felix_pci_probe()
1431 ocelot->dev = &pdev->dev; in felix_pci_probe()
1432 ocelot->num_flooding_pgids = FELIX_NUM_TC; in felix_pci_probe()
1443 "felix-intb", ocelot); in felix_pci_probe()
1449 ocelot->ptp = 1; in felix_pci_probe()
1462 ds->priv = ocelot; in felix_pci_probe()