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
105 ret = stmmac_xgmac2_c45_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_read()
109 ret = stmmac_xgmac2_c22_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_read()
147 static int stmmac_xgmac2_mdio_write(struct mii_bus *bus, int phyaddr, in stmmac_xgmac2_mdio_write() argument
171 ret = stmmac_xgmac2_c45_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_write()
175 ret = stmmac_xgmac2_c22_format(priv, phyaddr, phyreg, &addr); in stmmac_xgmac2_mdio_write()
218 static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg) in stmmac_mdio_read() argument
232 value |= (phyaddr << priv->hw->mii.addr_shift) in stmmac_mdio_read()
283 static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg, in stmmac_mdio_write() argument
298 value |= (phyaddr << priv->hw->mii.addr_shift) in stmmac_mdio_write()