Lines Matching refs:adpt
46 struct emac_adapter *adpt = bus->priv; in emac_mdio_read() local
49 emac_reg_update32(adpt->base + EMAC_PHY_STS, PHY_ADDR_BMSK, in emac_mdio_read()
57 writel(reg, adpt->base + EMAC_MDIO_CTRL); in emac_mdio_read()
59 if (readl_poll_timeout(adpt->base + EMAC_MDIO_CTRL, reg, in emac_mdio_read()
69 struct emac_adapter *adpt = bus->priv; in emac_mdio_write() local
72 emac_reg_update32(adpt->base + EMAC_PHY_STS, PHY_ADDR_BMSK, in emac_mdio_write()
81 writel(reg, adpt->base + EMAC_MDIO_CTRL); in emac_mdio_write()
83 if (readl_poll_timeout(adpt->base + EMAC_MDIO_CTRL, reg, in emac_mdio_write()
92 int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt) in emac_phy_config() argument
99 adpt->mii_bus = mii_bus = devm_mdiobus_alloc(&pdev->dev); in emac_phy_config()
108 mii_bus->priv = adpt; in emac_phy_config()
124 adpt->phydev = phy_find_first(mii_bus); in emac_phy_config()
126 adpt->phydev = mdiobus_get_phy(mii_bus, phy_addr); in emac_phy_config()
133 if (adpt->phydev) in emac_phy_config()
134 get_device(&adpt->phydev->mdio.dev); in emac_phy_config()
145 adpt->phydev = of_phy_find_device(phy_np); in emac_phy_config()
149 if (!adpt->phydev) { in emac_phy_config()