summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Yanok <yanok@emcraft.com>2010-08-19 11:09:06 +0200
committerBen Warren <biggerbadderben@gmail.com>2010-10-11 23:00:29 -0700
commitf87a6f27e61ead22fd87bd4f38eadad82dc94b66 (patch)
tree73ccd42f47c3c7740f67b24c0e745a7244622577
parent77179067db7353c049403fe31701c35d52458d26 (diff)
downloadu-boot-imx-f87a6f27e61ead22fd87bd4f38eadad82dc94b66.zip
u-boot-imx-f87a6f27e61ead22fd87bd4f38eadad82dc94b66.tar.gz
u-boot-imx-f87a6f27e61ead22fd87bd4f38eadad82dc94b66.tar.bz2
mpc5xxx_fec: add call to reset_phy() after PHY initialization
Some boards need their board-specific PHY quirks to be called to PHY to work normally. As mpc5xxx_fec driver uses on demand PHY initialization and can even reinit PHY during normal operation we can't count on reset_phy() call from arch/<arch>/lib/board.c (it is most likely called _before_ we init the PHY from the driver) so we need to add call to reset_phy() directly in the driver. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r--drivers/net/mpc5xxx_fec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index c88e596..bc8c922 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -250,6 +250,13 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
mpc5xxx_fec_init_phy(dev, bis);
/*
+ * Call board-specific PHY fixups (if any)
+ */
+#ifdef CONFIG_RESET_PHY_R
+ reset_phy();
+#endif
+
+ /*
* Initialize RxBD/TxBD rings
*/
mpc5xxx_fec_rbd_init(fec);