Lines Matching +full:iproc +full:- +full:mdio
28 dev_err(&core->dev, "Timeout waiting for reg 0x%X\n", reg); in bcma_mdio_wait_value()
55 if (bgmac->bcma.core->id.id == BCMA_CORE_4706_MAC_GBIT) { in bcma_mdio_phy_read()
56 core = bgmac->bcma.core->bus->drv_gmac_cmn.core; in bcma_mdio_phy_read()
60 core = bgmac->bcma.core; in bcma_mdio_phy_read()
77 dev_err(&core->dev, "Reading PHY %d register 0x%X failed\n", in bcma_mdio_phy_read()
85 /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipphywr */
94 if (bgmac->bcma.core->id.id == BCMA_CORE_4706_MAC_GBIT) { in bcma_mdio_phy_write()
95 core = bgmac->bcma.core->bus->drv_gmac_cmn.core; in bcma_mdio_phy_write()
99 core = bgmac->bcma.core; in bcma_mdio_phy_write()
109 bcma_write32(bgmac->bcma.core, BGMAC_INT_STATUS, BGMAC_IS_MDIO); in bcma_mdio_phy_write()
110 if (bcma_read32(bgmac->bcma.core, BGMAC_INT_STATUS) & BGMAC_IS_MDIO) in bcma_mdio_phy_write()
111 dev_warn(&core->dev, "Error setting MDIO int\n"); in bcma_mdio_phy_write()
122 dev_err(&core->dev, "Writing to PHY %d register 0x%X failed\n", in bcma_mdio_phy_write()
124 return -ETIMEDOUT; in bcma_mdio_phy_write()
130 /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipphyinit */
133 struct bcma_chipinfo *ci = &bgmac->bcma.core->bus->chipinfo; in bcma_mdio_phy_init()
136 /* For some legacy hardware we do chipset-based PHY initialization here in bcma_mdio_phy_init()
140 if (ci->id == BCMA_CHIP_ID_BCM5356) { in bcma_mdio_phy_init()
150 if ((ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg != 10) || in bcma_mdio_phy_init()
151 (ci->id == BCMA_CHIP_ID_BCM4749 && ci->pkg != 10) || in bcma_mdio_phy_init()
152 (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg != 9)) { in bcma_mdio_phy_init()
153 struct bcma_drv_cc *cc = &bgmac->bcma.core->bus->drv_cc; in bcma_mdio_phy_init()
174 if (bgmac->net_dev && bgmac->net_dev->phydev) in bcma_mdio_phy_init()
175 phy_init_hw(bgmac->net_dev->phydev); in bcma_mdio_phy_init()
178 /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipphyreset */
181 struct bgmac *bgmac = bus->priv; in bcma_mdio_phy_reset()
182 u8 phyaddr = bgmac->phyaddr; in bcma_mdio_phy_reset()
190 dev_err(bgmac->dev, "PHY reset failed\n"); in bcma_mdio_phy_reset()
202 return bcma_mdio_phy_read(bus->priv, mii_id, regnum); in bcma_mdio_mii_read()
208 return bcma_mdio_phy_write(bus->priv, mii_id, regnum, value); in bcma_mdio_mii_write()
213 struct bcma_device *core = bgmac->bcma.core; in bcma_mdio_mii_register()
220 err = -ENOMEM; in bcma_mdio_mii_register()
224 mii_bus->name = "bcma_mdio mii bus"; in bcma_mdio_mii_register()
225 sprintf(mii_bus->id, "%s-%d-%d", "bcma_mdio", core->bus->num, in bcma_mdio_mii_register()
226 core->core_unit); in bcma_mdio_mii_register()
227 mii_bus->priv = bgmac; in bcma_mdio_mii_register()
228 mii_bus->read = bcma_mdio_mii_read; in bcma_mdio_mii_register()
229 mii_bus->write = bcma_mdio_mii_write; in bcma_mdio_mii_register()
230 mii_bus->reset = bcma_mdio_phy_reset; in bcma_mdio_mii_register()
231 mii_bus->parent = &core->dev; in bcma_mdio_mii_register()
232 mii_bus->phy_mask = ~(1 << bgmac->phyaddr); in bcma_mdio_mii_register()
234 np = of_get_child_by_name(core->dev.of_node, "mdio"); in bcma_mdio_mii_register()
239 dev_err(&core->dev, "Registration of mii bus failed\n"); in bcma_mdio_mii_register()
263 MODULE_DESCRIPTION("Broadcom iProc GBit BCMA MDIO helpers");