Lines Matching refs:phyaddr
48 static int stmmac_xgmac2_c45_format(struct stmmac_priv *priv, int phyaddr, in stmmac_xgmac2_c45_format() argument
55 tmp &= ~BIT(phyaddr); in stmmac_xgmac2_c45_format()
58 *hw_addr = (phyaddr << MII_XGMAC_PA_SHIFT) | (phyreg & 0xffff); in stmmac_xgmac2_c45_format()
63 static int stmmac_xgmac2_c22_format(struct stmmac_priv *priv, int phyaddr, in stmmac_xgmac2_c22_format() argument
69 if (phyaddr > MII_XGMAC_MAX_C22ADDR) in stmmac_xgmac2_c22_format()
75 tmp |= BIT(phyaddr); in stmmac_xgmac2_c22_format()
78 *hw_addr = (phyaddr << MII_XGMAC_PA_SHIFT) | (phyreg & 0x1f); in stmmac_xgmac2_c22_format()
82 static int stmmac_xgmac2_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg) in stmmac_xgmac2_mdio_read() argument
107 ret = stmmac_xgmac2_c45_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_read()
111 ret = stmmac_xgmac2_c22_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_read()
149 static int stmmac_xgmac2_mdio_write(struct mii_bus *bus, int phyaddr, in stmmac_xgmac2_mdio_write() argument
175 ret = stmmac_xgmac2_c45_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_write()
179 ret = stmmac_xgmac2_c22_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_write()
222 static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg) in stmmac_mdio_read() argument
238 value |= (phyaddr << priv->hw->mii.addr_shift) in stmmac_mdio_read()
289 static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg, in stmmac_mdio_write() argument
306 value |= (phyaddr << priv->hw->mii.addr_shift) in stmmac_mdio_write()