| 172 | } |
| 173 | |
| 174 | void rt_phy_mmd_start_indirect(struct rt_phy_device *phydev, int devad, int regnum) |
| 175 | { |
| 176 | /* Write the desired MMD Devad */ |
| 177 | rt_phy_write(phydev, RT_MDIO_DEVAD_NONE, RT_MII_MMD_CTRL, devad); |
| 178 | |
| 179 | /* Write the desired MMD register address */ |
| 180 | rt_phy_write(phydev, RT_MDIO_DEVAD_NONE, RT_MII_MMD_DATA, regnum); |
| 181 | |
| 182 | /* Select the Function : DATA with no post increment */ |
| 183 | rt_phy_write(phydev, RT_MDIO_DEVAD_NONE, RT_MII_MMD_CTRL, |
| 184 | (devad | RT_MII_MMD_CTRL_NOINCR)); |
| 185 | } |
| 186 | |
| 187 | int rt_phy_read_mmd(struct rt_phy_device *phydev, int devad, int regnum) |
| 188 | { |
no test coverage detected