Lines Matching defs:ocelot

10 #include <soc/mscc/ocelot.h>
891 static int vsc9959_gcb_soft_rst_status(struct ocelot *ocelot)
895 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val);
900 static int vsc9959_sys_ram_init_status(struct ocelot *ocelot)
902 return ocelot_read(ocelot, SYS_RAM_INIT);
908 static int vsc9959_reset(struct ocelot *ocelot)
913 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1);
915 err = readx_poll_timeout(vsc9959_gcb_soft_rst_status, ocelot, val, !val,
918 dev_err(ocelot->dev, "timeout: switch core reset\n");
923 ocelot_write(ocelot, SYS_RAM_INIT_RAM_INIT, SYS_RAM_INIT);
924 err = readx_poll_timeout(vsc9959_sys_ram_init_status, ocelot, val, !val,
928 dev_err(ocelot->dev, "timeout: switch sram init\n");
933 ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1);
938 static void vsc9959_phylink_validate(struct ocelot *ocelot, int port,
942 struct ocelot_port *ocelot_port = ocelot->ports[port];
975 static int vsc9959_prevalidate_phy_mode(struct ocelot *ocelot, int port,
1017 static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
1019 struct felix *felix = ocelot_to_felix(ocelot);
1021 struct device *dev = ocelot->dev;
1080 struct ocelot_port *ocelot_port = ocelot->ports[port];
1108 static void vsc9959_mdio_bus_free(struct ocelot *ocelot)
1110 struct felix *felix = ocelot_to_felix(ocelot);
1113 for (port = 0; port < ocelot->num_phys_ports; port++) {
1125 static void vsc9959_sched_speed_set(struct ocelot *ocelot, int port,
1148 ocelot_rmw_rix(ocelot,
1154 static void vsc9959_new_base_time(struct ocelot *ocelot, ktime_t base_time,
1162 ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
1176 static u32 vsc9959_tas_read_cfg_status(struct ocelot *ocelot)
1178 return ocelot_read(ocelot, QSYS_TAS_PARAM_CFG_CTRL);
1181 static void vsc9959_tas_gcl_set(struct ocelot *ocelot, const u32 gcl_ix,
1184 ocelot_write(ocelot,
1188 ocelot_write(ocelot, entry->interval, QSYS_GCL_CFG_REG_2);
1191 static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port,
1199 ocelot_rmw_rix(ocelot,
1215 ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port) |
1224 val = ocelot_read(ocelot, QSYS_PARAM_STATUS_REG_8);
1228 ocelot_rmw_rix(ocelot,
1237 vsc9959_new_base_time(ocelot, taprio->base_time,
1239 ocelot_write(ocelot, base_ts.tv_nsec, QSYS_PARAM_CFG_REG_1);
1240 ocelot_write(ocelot, lower_32_bits(base_ts.tv_sec), QSYS_PARAM_CFG_REG_2);
1242 ocelot_write(ocelot,
1246 ocelot_write(ocelot, taprio->cycle_time, QSYS_PARAM_CFG_REG_4);
1247 ocelot_write(ocelot, taprio->cycle_time_extension, QSYS_PARAM_CFG_REG_5);
1250 vsc9959_tas_gcl_set(ocelot, i, &taprio->entries[i]);
1252 ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_CONFIG_CHANGE,
1256 ret = readx_poll_timeout(vsc9959_tas_read_cfg_status, ocelot, val,
1266 struct ocelot *ocelot = ds->priv;
1274 ocelot_write_gix(ocelot, QSYS_CIR_CFG_CIR_RATE(0) |
1278 ocelot_rmw_gix(ocelot, 0, QSYS_SE_CFG_SE_AVB_ENA,
1292 ocelot_write_gix(ocelot,
1298 ocelot_rmw_gix(ocelot,
1313 struct ocelot *ocelot = ds->priv;
1317 return vsc9959_qos_port_tas_set(ocelot, port, type_data);
1325 static void vsc9959_xmit_template_populate(struct ocelot *ocelot, int port)
1327 struct ocelot_port *ocelot_port = ocelot->ports[port];
1336 src = ocelot->num_phys_ports;
1378 struct ocelot *ocelot = (struct ocelot *)data;
1388 ocelot_get_txtstamp(ocelot);
1397 struct ocelot *ocelot;
1431 ocelot = &felix->ocelot;
1432 ocelot->dev = &pdev->dev;
1433 ocelot->num_flooding_pgids = FELIX_NUM_TC;
1444 "felix-intb", ocelot);
1450 ocelot->ptp = 1;
1463 ds->priv = ocelot;