static int m88e1111s_config(struct phy_device *phydev)
{
int reg;
- int timeout;
if ((phydev->interface == PHY_INTERFACE_MODE_RGMII) ||
(phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
MIIM_88E1111_PHY_EXT_SR, reg);
/* soft reset */
- timeout = 1000;
- phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET);
- udelay(1000);
- reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
- while ((reg & BMCR_RESET) && --timeout) {
- udelay(1000);
- reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
- }
- if (!timeout)
- printf("%s: phy soft reset timeout\n", __func__);
+ phy_reset(phydev);
reg = phy_read(phydev, MDIO_DEVAD_NONE,
MIIM_88E1111_PHY_EXT_SR);
}
/* soft reset */
- timeout = 1000;
- phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET);
- udelay(1000);
- reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
- while ((reg & BMCR_RESET) && --timeout) {
- udelay(1000);
- reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
- }
- if (!timeout)
- printf("%s: phy soft reset timeout\n", __func__);
+ phy_reset(phydev);
genphy_config_aneg(phydev);