From: York Sun Date: Tue, 6 Jun 2017 16:22:40 +0000 (-0700) Subject: net: phy: marvell: Fix init function for m88e1145 X-Git-Tag: v2017.07-rc2~18^2~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ef621da7f87a4e6907276595dbb9b6eba8784ddf;p=u-boot net: phy: marvell: Fix init function for m88e1145 Commit a058052c changed the generic phy_reset() to clear all bits in BMCR. This inevitably clears the ANEG bit. m88e1145 requires any change to ANEG bit to be followed by a software reset. This seems to be different from other PHYs. Implement read-modify-write procedure for this PHY init. Signed-off-by: York Sun Acked-by: Joe Hershberger --- diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 8041922a02..b7f300e40f 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -482,7 +482,10 @@ static int m88e1145_config(struct phy_device *phydev) genphy_config_aneg(phydev); - phy_reset(phydev); + /* soft reset */ + reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR); + reg |= BMCR_RESET; + phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, reg); return 0; }