Lines Matching refs:phyregs
22 void tsec_local_mdio_write(struct tsec_mii_mng __iomem *phyregs, int port_addr, in tsec_local_mdio_write() argument
27 out_be32(&phyregs->miimadd, (port_addr << 8) | (regnum & 0x1f)); in tsec_local_mdio_write()
28 out_be32(&phyregs->miimcon, value); in tsec_local_mdio_write()
32 while ((in_be32(&phyregs->miimind) & MIIMIND_BUSY) && timeout--) in tsec_local_mdio_write()
36 int tsec_local_mdio_read(struct tsec_mii_mng __iomem *phyregs, int port_addr, in tsec_local_mdio_read() argument
43 out_be32(&phyregs->miimadd, (port_addr << 8) | (regnum & 0x1f)); in tsec_local_mdio_read()
46 out_be32(&phyregs->miimcom, 0); in tsec_local_mdio_read()
51 out_be32(&phyregs->miimcom, MIIMCOM_READ_CYCLE); in tsec_local_mdio_read()
56 while ((in_be32(&phyregs->miimind) & (MIIMIND_NOTVALID | MIIMIND_BUSY)) in tsec_local_mdio_read()
61 value = in_be32(&phyregs->miimstat); in tsec_local_mdio_read()
96 struct tsec_mii_mng __iomem *phyregs; in tsec_phy_read() local
98 phyregs = (struct tsec_mii_mng __iomem *)bus->priv; in tsec_phy_read()
106 phyregs = priv->regs; in tsec_phy_read()
109 return tsec_local_mdio_read(phyregs, addr, dev_addr, regnum); in tsec_phy_read()
115 struct tsec_mii_mng __iomem *phyregs; in tsec_phy_write() local
117 phyregs = (struct tsec_mii_mng __iomem *)bus->priv; in tsec_phy_write()
125 phyregs = priv->regs; in tsec_phy_write()
128 tsec_local_mdio_write(phyregs, addr, dev_addr, regnum, value); in tsec_phy_write()