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 if (!(bus->phy_ignore_ta_mask & 1 << phy_id) && (cmd & MDIO_READ_FAIL)) in unimac_mdio_read()
96 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() argument
99 struct unimac_mdio_priv *priv = bus->priv; in unimac_mdio_write()
138 static int unimac_mdio_reset(struct mii_bus *bus) in unimac_mdio_reset() argument
140 struct device_node *np = bus->dev.of_node; in unimac_mdio_reset()
146 read_mask = ~bus->phy_mask; in unimac_mdio_reset()
149 addr = of_mdio_parse_addr(&bus->dev, child); in unimac_mdio_reset()
159 mdiobus_read(bus, addr, MII_BMSR); in unimac_mdio_reset()
169 struct mii_bus *bus; in unimac_mdio_probe() local
194 bus = priv->mii_bus; in unimac_mdio_probe()
195 bus->priv = priv; in unimac_mdio_probe()
196 bus->name = "unimac MII bus"; in unimac_mdio_probe()
197 bus->parent = &pdev->dev; in unimac_mdio_probe()
198 bus->read = unimac_mdio_read; in unimac_mdio_probe()
199 bus->write = unimac_mdio_write; in unimac_mdio_probe()
200 bus->reset = unimac_mdio_reset; in unimac_mdio_probe()
201 snprintf(bus->id, MII_BUS_ID_SIZE, "%s", pdev->name); in unimac_mdio_probe()
203 bus->irq = kcalloc(PHY_MAX_ADDR, sizeof(int), GFP_KERNEL); in unimac_mdio_probe()
204 if (!bus->irq) { in unimac_mdio_probe()
209 ret = of_mdiobus_register(bus, np); in unimac_mdio_probe()
222 kfree(bus->irq); in unimac_mdio_probe()
224 mdiobus_free(bus); in unimac_mdio_probe()