Lines Matching refs:adpt
54 struct emac_adapter *adpt = bus->priv; in emac_mdio_read() local
57 emac_reg_update32(adpt->base + EMAC_PHY_STS, PHY_ADDR_BMSK, in emac_mdio_read()
65 writel(reg, adpt->base + EMAC_MDIO_CTRL); in emac_mdio_read()
67 if (readl_poll_timeout(adpt->base + EMAC_MDIO_CTRL, reg, in emac_mdio_read()
77 struct emac_adapter *adpt = bus->priv; in emac_mdio_write() local
80 emac_reg_update32(adpt->base + EMAC_PHY_STS, PHY_ADDR_BMSK, in emac_mdio_write()
89 writel(reg, adpt->base + EMAC_MDIO_CTRL); in emac_mdio_write()
91 if (readl_poll_timeout(adpt->base + EMAC_MDIO_CTRL, reg, in emac_mdio_write()
100 int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt) in emac_phy_config() argument
107 adpt->mii_bus = mii_bus = devm_mdiobus_alloc(&pdev->dev); in emac_phy_config()
116 mii_bus->priv = adpt; in emac_phy_config()
132 adpt->phydev = phy_find_first(mii_bus); in emac_phy_config()
134 adpt->phydev = mdiobus_get_phy(mii_bus, phy_addr); in emac_phy_config()
141 if (adpt->phydev) in emac_phy_config()
142 get_device(&adpt->phydev->mdio.dev); in emac_phy_config()
153 adpt->phydev = of_phy_find_device(phy_np); in emac_phy_config()
157 if (!adpt->phydev) { in emac_phy_config()