Lines Matching refs:ocelot
9 #include <soc/mscc/ocelot.h>
14 #include <linux/dsa/ocelot.h>
785 static int vsc9953_gcb_soft_rst_status(struct ocelot *ocelot)
789 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val);
794 static int vsc9953_sys_ram_init_status(struct ocelot *ocelot)
798 ocelot_field_read(ocelot, SYS_RESET_CFG_MEM_INIT, &val);
808 static int vsc9953_reset(struct ocelot *ocelot)
813 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1);
815 err = readx_poll_timeout(vsc9953_gcb_soft_rst_status, ocelot, val, !val,
818 dev_err(ocelot->dev, "timeout: switch core reset\n");
823 ocelot_field_write(ocelot, SYS_RESET_CFG_MEM_ENA, 1);
824 ocelot_field_write(ocelot, SYS_RESET_CFG_MEM_INIT, 1);
826 err = readx_poll_timeout(vsc9953_sys_ram_init_status, ocelot, val, !val,
830 dev_err(ocelot->dev, "timeout: switch sram init\n");
835 ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1);
879 static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot)
881 struct felix *felix = ocelot_to_felix(ocelot);
882 struct device *dev = ocelot->dev;
896 ocelot->targets[GCB],
897 ocelot->map[GCB][GCB_MIIM_MII_STATUS & REG_MASK],
914 struct ocelot_port *ocelot_port = ocelot->ports[port];
936 static void vsc9953_mdio_bus_free(struct ocelot *ocelot)
938 struct felix *felix = ocelot_to_felix(ocelot);
941 for (port = 0; port < ocelot->num_phys_ports; port++) {
975 struct ocelot *ocelot;
989 ocelot = &felix->ocelot;
990 ocelot->dev = &pdev->dev;
991 ocelot->num_flooding_pgids = 1;
1012 ds->priv = ocelot;