Lines Matching full:ocelot

8 #include <soc/mscc/ocelot.h>
862 static int vsc9953_gcb_soft_rst_status(struct ocelot *ocelot) in vsc9953_gcb_soft_rst_status() argument
866 ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); in vsc9953_gcb_soft_rst_status()
871 static int vsc9953_sys_ram_init_status(struct ocelot *ocelot) in vsc9953_sys_ram_init_status() argument
875 ocelot_field_read(ocelot, SYS_RESET_CFG_MEM_INIT, &val); in vsc9953_sys_ram_init_status()
880 static int vsc9953_gcb_miim_pending_status(struct ocelot *ocelot) in vsc9953_gcb_miim_pending_status() argument
884 ocelot_field_read(ocelot, GCB_MIIM_MII_STATUS_PENDING, &val); in vsc9953_gcb_miim_pending_status()
889 static int vsc9953_gcb_miim_busy_status(struct ocelot *ocelot) in vsc9953_gcb_miim_busy_status() argument
893 ocelot_field_read(ocelot, GCB_MIIM_MII_STATUS_BUSY, &val); in vsc9953_gcb_miim_busy_status()
901 struct ocelot *ocelot = bus->priv; in vsc9953_mdio_write() local
905 err = readx_poll_timeout(vsc9953_gcb_miim_pending_status, ocelot, in vsc9953_mdio_write()
908 dev_err(ocelot->dev, "MDIO write: pending timeout\n"); in vsc9953_mdio_write()
917 ocelot_write(ocelot, cmd, GCB_MIIM_MII_CMD); in vsc9953_mdio_write()
925 struct ocelot *ocelot = bus->priv; in vsc9953_mdio_read() local
929 err = readx_poll_timeout(vsc9953_gcb_miim_pending_status, ocelot, in vsc9953_mdio_read()
932 dev_err(ocelot->dev, "MDIO read: pending timeout\n"); in vsc9953_mdio_read()
940 ocelot_write(ocelot, cmd, GCB_MIIM_MII_CMD); in vsc9953_mdio_read()
943 err = readx_poll_timeout(vsc9953_gcb_miim_busy_status, ocelot, in vsc9953_mdio_read()
946 dev_err(ocelot->dev, "MDIO read: busy timeout\n"); in vsc9953_mdio_read()
950 val = ocelot_read(ocelot, GCB_MIIM_MII_DATA); in vsc9953_mdio_read()
961 static int vsc9953_reset(struct ocelot *ocelot) in vsc9953_reset() argument
966 ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1); in vsc9953_reset()
968 err = readx_poll_timeout(vsc9953_gcb_soft_rst_status, ocelot, val, !val, in vsc9953_reset()
971 dev_err(ocelot->dev, "timeout: switch core reset\n"); in vsc9953_reset()
976 ocelot_field_write(ocelot, SYS_RESET_CFG_MEM_ENA, 1); in vsc9953_reset()
977 ocelot_field_write(ocelot, SYS_RESET_CFG_MEM_INIT, 1); in vsc9953_reset()
979 err = readx_poll_timeout(vsc9953_sys_ram_init_status, ocelot, val, !val, in vsc9953_reset()
983 dev_err(ocelot->dev, "timeout: switch sram init\n"); in vsc9953_reset()
988 ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1); in vsc9953_reset()
993 static void vsc9953_phylink_validate(struct ocelot *ocelot, int port, in vsc9953_phylink_validate() argument
997 struct ocelot_port *ocelot_port = ocelot->ports[port]; in vsc9953_phylink_validate()
1027 static int vsc9953_prevalidate_phy_mode(struct ocelot *ocelot, int port, in vsc9953_prevalidate_phy_mode() argument
1067 static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) in vsc9953_mdio_bus_alloc() argument
1069 struct felix *felix = ocelot_to_felix(ocelot); in vsc9953_mdio_bus_alloc()
1070 struct device *dev = ocelot->dev; in vsc9953_mdio_bus_alloc()
1091 bus->priv = ocelot; in vsc9953_mdio_bus_alloc()
1104 struct ocelot_port *ocelot_port = ocelot->ports[port]; in vsc9953_mdio_bus_alloc()
1133 static void vsc9953_mdio_bus_free(struct ocelot *ocelot) in vsc9953_mdio_bus_free() argument
1135 struct felix *felix = ocelot_to_felix(ocelot); in vsc9953_mdio_bus_free()
1138 for (port = 0; port < ocelot->num_phys_ports; port++) { in vsc9953_mdio_bus_free()
1150 static void vsc9953_xmit_template_populate(struct ocelot *ocelot, int port) in vsc9953_xmit_template_populate() argument
1152 struct ocelot_port *ocelot_port = ocelot->ports[port]; in vsc9953_xmit_template_populate()
1161 src = ocelot->num_phys_ports; in vsc9953_xmit_template_populate()
1197 struct ocelot *ocelot; in seville_probe() local
1211 ocelot = &felix->ocelot; in seville_probe()
1212 ocelot->dev = &pdev->dev; in seville_probe()
1213 ocelot->num_flooding_pgids = 1; in seville_probe()
1229 ds->priv = ocelot; in seville_probe()