• Home
  • Raw
  • Download

Lines Matching refs:mii_bus

22 	struct mii_bus *mii_bus;  member
33 struct mii_bus *mii_bus; member
43 static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) in mdio_mux_read()
55 mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING); in mdio_mux_read()
62 r = pb->mii_bus->read(pb->mii_bus, phy_id, regnum); in mdio_mux_read()
64 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_read()
72 static int mdio_mux_write(struct mii_bus *bus, int phy_id, in mdio_mux_write()
80 mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING); in mdio_mux_write()
87 r = pb->mii_bus->write(pb->mii_bus, phy_id, regnum, val); in mdio_mux_write()
89 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_write()
104 struct mii_bus *parent_bus; in mdio_mux_init()
132 pb->mii_bus = parent_bus; in mdio_mux_init()
153 cb->mii_bus = mdiobus_alloc(); in mdio_mux_init()
154 if (!cb->mii_bus) { in mdio_mux_init()
159 cb->mii_bus->priv = cb; in mdio_mux_init()
160 cb->mii_bus->irq = cb->phy_irq; in mdio_mux_init()
161 cb->mii_bus->name = "mdio_mux"; in mdio_mux_init()
162 snprintf(cb->mii_bus->id, MII_BUS_ID_SIZE, "%x.%x", in mdio_mux_init()
164 cb->mii_bus->parent = dev; in mdio_mux_init()
165 cb->mii_bus->read = mdio_mux_read; in mdio_mux_init()
166 cb->mii_bus->write = mdio_mux_write; in mdio_mux_init()
167 r = of_mdiobus_register(cb->mii_bus, child_bus_node); in mdio_mux_init()
169 mdiobus_free(cb->mii_bus); in mdio_mux_init()
184 put_device(&pb->mii_bus->dev); in mdio_mux_init()
198 mdiobus_unregister(cb->mii_bus); in mdio_mux_uninit()
199 mdiobus_free(cb->mii_bus); in mdio_mux_uninit()
204 put_device(&pb->mii_bus->dev); in mdio_mux_uninit()