public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: phy: marvell: Fix up reset ordering
@ 2016-06-01 16:22 Nathan Rossi
  2016-06-02  5:31 ` Michal Simek
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Rossi @ 2016-06-01 16:22 UTC (permalink / raw)
  To: u-boot

Commit a058052c "net: phy: do not read configuration register on reset",
changes the behaviour of the phy_reset function such that the state of
the BMCR register is not preserved during reset.

Reorder the phy_reset and genphy_config_aneg calls for some of the
marvell phy drivers so that auto-negotiation occurs after reset.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
---
 drivers/net/phy/marvell.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index d2e68d4..40284a5 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -414,10 +414,10 @@ static int m88e1145_config(struct phy_device *phydev)
 			MIIM_M88E1145_RGMII_TX_DELAY;
 	phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1145_PHY_EXT_CR, reg);
 
-	genphy_config_aneg(phydev);
-
 	phy_reset(phydev);
 
+	genphy_config_aneg(phydev);
+
 	return 0;
 }
 
@@ -443,10 +443,10 @@ static int m88e1149_config(struct phy_device *phydev)
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x0);
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100);
 
-	genphy_config_aneg(phydev);
-
 	phy_reset(phydev);
 
+	genphy_config_aneg(phydev);
+
 	return 0;
 }
 
@@ -476,9 +476,10 @@ static int m88e1310_config(struct phy_device *phydev)
 	/* Ensure to return to page 0 */
 	phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1310_PHY_PAGE, 0x0000);
 
-	genphy_config_aneg(phydev);
 	phy_reset(phydev);
 
+	genphy_config_aneg(phydev);
+
 	return 0;
 }
 
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-03 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 16:22 [U-Boot] [PATCH] net: phy: marvell: Fix up reset ordering Nathan Rossi
2016-06-02  5:31 ` Michal Simek
2016-06-02  5:42   ` Stefan Roese
2016-06-02  5:59     ` Michal Simek
2016-06-03 13:15       ` Nathan Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox