• Home
  • Raw
  • Download

Lines Matching refs:bgmac

36 static u16 bcma_mdio_phy_read(struct bgmac *bgmac, u8 phyaddr, u8 reg)  in bcma_mdio_phy_read()  argument
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()
86 static int bcma_mdio_phy_write(struct bgmac *bgmac, u8 phyaddr, u8 reg, in bcma_mdio_phy_write() argument
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()
131 static void bcma_mdio_phy_init(struct bgmac *bgmac) in bcma_mdio_phy_init() argument
133 struct bcma_chipinfo *ci = &bgmac->bcma.core->bus->chipinfo; in bcma_mdio_phy_init()
142 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x008b); in bcma_mdio_phy_init()
143 bcma_mdio_phy_write(bgmac, i, 0x15, 0x0100); in bcma_mdio_phy_init()
144 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x000f); in bcma_mdio_phy_init()
145 bcma_mdio_phy_write(bgmac, i, 0x12, 0x2aaa); in bcma_mdio_phy_init()
146 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x000b); in bcma_mdio_phy_init()
153 struct bcma_drv_cc *cc = &bgmac->bcma.core->bus->drv_cc; in bcma_mdio_phy_init()
158 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x000f); in bcma_mdio_phy_init()
159 bcma_mdio_phy_write(bgmac, i, 0x16, 0x5284); in bcma_mdio_phy_init()
160 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x000b); in bcma_mdio_phy_init()
161 bcma_mdio_phy_write(bgmac, i, 0x17, 0x0010); in bcma_mdio_phy_init()
162 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x000f); in bcma_mdio_phy_init()
163 bcma_mdio_phy_write(bgmac, i, 0x16, 0x5296); in bcma_mdio_phy_init()
164 bcma_mdio_phy_write(bgmac, i, 0x17, 0x1073); in bcma_mdio_phy_init()
165 bcma_mdio_phy_write(bgmac, i, 0x17, 0x9073); in bcma_mdio_phy_init()
166 bcma_mdio_phy_write(bgmac, i, 0x16, 0x52b6); in bcma_mdio_phy_init()
167 bcma_mdio_phy_write(bgmac, i, 0x17, 0x9273); in bcma_mdio_phy_init()
168 bcma_mdio_phy_write(bgmac, i, 0x1f, 0x000b); 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()
181 struct bgmac *bgmac = bus->priv; in bcma_mdio_phy_reset() local
182 u8 phyaddr = bgmac->phyaddr; in bcma_mdio_phy_reset()
187 bcma_mdio_phy_write(bgmac, phyaddr, MII_BMCR, BMCR_RESET); in bcma_mdio_phy_reset()
189 if (bcma_mdio_phy_read(bgmac, phyaddr, MII_BMCR) & BMCR_RESET) in bcma_mdio_phy_reset()
190 dev_err(bgmac->dev, "PHY reset failed\n"); in bcma_mdio_phy_reset()
191 bcma_mdio_phy_init(bgmac); in bcma_mdio_phy_reset()
211 struct mii_bus *bcma_mdio_mii_register(struct bgmac *bgmac) in bcma_mdio_mii_register() argument
213 struct bcma_device *core = bgmac->bcma.core; in bcma_mdio_mii_register()
227 mii_bus->priv = bgmac; in bcma_mdio_mii_register()
232 mii_bus->phy_mask = ~(1 << bgmac->phyaddr); in bcma_mdio_mii_register()