Lines Matching refs:bus
60 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() argument
62 struct unimac_mdio_priv *priv = bus->priv; in unimac_mdio_read()
90 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() argument
93 struct unimac_mdio_priv *priv = bus->priv; in unimac_mdio_write()
121 struct mii_bus *bus; in unimac_mdio_probe() local
146 bus = priv->mii_bus; in unimac_mdio_probe()
147 bus->priv = priv; in unimac_mdio_probe()
148 bus->name = "unimac MII bus"; in unimac_mdio_probe()
149 bus->parent = &pdev->dev; in unimac_mdio_probe()
150 bus->read = unimac_mdio_read; in unimac_mdio_probe()
151 bus->write = unimac_mdio_write; in unimac_mdio_probe()
152 snprintf(bus->id, MII_BUS_ID_SIZE, "%s", pdev->name); in unimac_mdio_probe()
154 bus->irq = kcalloc(PHY_MAX_ADDR, sizeof(int), GFP_KERNEL); in unimac_mdio_probe()
155 if (!bus->irq) { in unimac_mdio_probe()
160 ret = of_mdiobus_register(bus, np); in unimac_mdio_probe()
173 kfree(bus->irq); in unimac_mdio_probe()
175 mdiobus_free(bus); in unimac_mdio_probe()