From: Ilya Yanok Date: Thu, 19 Aug 2010 09:09:06 +0000 (+0200) Subject: mpc5xxx_fec: add call to reset_phy() after PHY initialization X-Git-Tag: v2010.12-rc1~135^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f87a6f27e61ead22fd87bd4f38eadad82dc94b66;p=oweals%2Fu-boot.git 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//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 Signed-off-by: Ben Warren --- diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c index c88e596c01..bc8c9222dc 100644 --- a/drivers/net/mpc5xxx_fec.c +++ b/drivers/net/mpc5xxx_fec.c @@ -249,6 +249,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 */