Lines Matching refs:phyaddr
52 static void sxgbe_mdio_c45(struct sxgbe_priv_data *sp, u32 cmd, int phyaddr, in sxgbe_mdio_c45() argument
59 reg |= (phyaddr << 16) | (phyreg & 0xffff); in sxgbe_mdio_c45()
65 static void sxgbe_mdio_c22(struct sxgbe_priv_data *sp, u32 cmd, int phyaddr, in sxgbe_mdio_c22() argument
70 writel(1 << phyaddr, sp->ioaddr + SXGBE_MDIO_CLAUSE22_PORT_REG); in sxgbe_mdio_c22()
73 reg = (phyaddr << 16) | (phyreg & 0x1f); in sxgbe_mdio_c22()
79 static int sxgbe_mdio_access(struct sxgbe_priv_data *sp, u32 cmd, int phyaddr, in sxgbe_mdio_access() argument
90 sxgbe_mdio_c45(sp, cmd, phyaddr, phyreg, phydata); in sxgbe_mdio_access()
93 if (phyaddr >= 4) in sxgbe_mdio_access()
96 sxgbe_mdio_c22(sp, cmd, phyaddr, phyreg, phydata); in sxgbe_mdio_access()
109 static int sxgbe_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg) in sxgbe_mdio_read() argument
115 rc = sxgbe_mdio_access(priv, SXGBE_SMA_READ_CMD, phyaddr, phyreg, 0); in sxgbe_mdio_read()
130 static int sxgbe_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg, in sxgbe_mdio_write() argument
136 return sxgbe_mdio_access(priv, SXGBE_SMA_WRITE_CMD, phyaddr, phyreg, in sxgbe_mdio_write()