Lines Matching refs:cpmac_mii
306 static struct mii_bus *cpmac_mii; variable
1077 if (!mdiobus_get_phy(cpmac_mii, phy_id)) in cpmac_probe()
1079 strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE); in cpmac_probe()
1177 cpmac_mii = mdiobus_alloc(); in cpmac_init()
1178 if (cpmac_mii == NULL) in cpmac_init()
1181 cpmac_mii->name = "cpmac-mii"; in cpmac_init()
1182 cpmac_mii->read = cpmac_mdio_read; in cpmac_init()
1183 cpmac_mii->write = cpmac_mdio_write; in cpmac_init()
1184 cpmac_mii->reset = cpmac_mdio_reset; in cpmac_init()
1186 cpmac_mii->priv = ioremap(AR7_REGS_MDIO, 256); in cpmac_init()
1188 if (!cpmac_mii->priv) { in cpmac_init()
1201 cpmac_mii->reset(cpmac_mii); in cpmac_init()
1204 mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE); in cpmac_init()
1217 cpmac_mii->phy_mask = ~(mask | 0x80000000); in cpmac_init()
1218 snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "cpmac-1"); in cpmac_init()
1220 res = mdiobus_register(cpmac_mii); in cpmac_init()
1231 mdiobus_unregister(cpmac_mii); in cpmac_init()
1234 iounmap(cpmac_mii->priv); in cpmac_init()
1237 mdiobus_free(cpmac_mii); in cpmac_init()
1245 mdiobus_unregister(cpmac_mii); in cpmac_exit()
1246 iounmap(cpmac_mii->priv); in cpmac_exit()
1247 mdiobus_free(cpmac_mii); in cpmac_exit()