mpc5xxx_fec/motionpro: disable PHY initialization on motionpro board
PATCH 1/1 mpc5xxx_fec/motionpro: disable PHY initialization on motionpro board
Historically PHY intialization was disabled on motionpro board. Then at some point PHY init was enabled and only comment message was left. It worked somehow provided that PHY init was done at the early stage. But after commit f5cf2ef the driver initializes PHY only when it is actually needed and now Ethernet on motionpro board is broken again. I haven't managed to find the true reason of such behavior so I've just disabled PHY initialization on motionpro board.
--- drivers/net/mpc5xxx_fec.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/mpc5xxx_fec.c +2 -0
@@ -429,6 +429,7 @@ static int mpc5xxx_fec_init_phy(struct eth_device *dev, bd_t * bis)* PHY initialization for the Motion-PRO board, until a proper fix is found. */ +#ifndef CONFIG_MOTIONPRO if (fec->xcv_type !=SEVENWIRE ) {/* * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
@@ -561,6 +562,7 @@ static int mpc5xxx_fec_init_phy(struct eth_device *dev, bd_t * bis)if (fec->xcv_type !=SEVENWIRE )mpc5xxx_fec_phydump (dev->name);#endif +#endif /* CONFIG_MOTIONPRO */ #if (DEBUG &0x1 )
Signature · 1 line
1.7.0.4
PATCH 1/1 mpc5xxx_fec/motionpro: disable PHY initialization on motionpro board
Hello All,
Quoted 3 lines · Ilya Yanok
Historically PHY intialization was disabled on motionpro board. Then at some point PHY init was enabled and only comment message was left.
After looking once more at the history I've found that this problem was actually fixed by
commit c00125e07c1ebc125bab40e1e18bceed8be0c162
Author: Bartlomiej Sieka <[email protected]> Date: Sun May 27 16:58:45 2007 +0200
MPC5XXX, Motion-PRO: Fix PHY initialization problem.
which uses RESET_PHY_R feature to fix PHY initialization late in the boot process.
But with drivers that initialize PHYs not during boot process but on the first access (I believe mpc5xxx_fec is not the only example) this RESET_PHY_R feature is completely broken. What would be the correct way to fix this? Should we add reset_phy() call in every driver that uses 'lazy' PHY initialization?
Regards, Ilya.