[U-Boot] [PATCH 3/9] NET: fec_mxc.c: Add a way to disable auto negotiation

Stefano Babic sbabic at denx.de
Wed Feb 22 11:24:35 CET 2012


Signed-off-by: Stefano Babic <sbabic at denx.de>
CC: Fabio Estevam <fabio.estevam at freescale.com>
---
 drivers/net/fec_mxc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 201e5d2..a45ac3f 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -175,9 +175,10 @@ int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr,
 #ifndef CONFIG_PHYLIB
 static int miiphy_restart_aneg(struct eth_device *dev)
 {
+	int ret = 0;
+#if !defined(CONFIG_FEC_MXC_NO_ANEG)
 	struct fec_priv *fec = (struct fec_priv *)dev->priv;
 	struct ethernet_regs *eth = fec->bus->priv;
-	int ret = 0;
 
 	/*
 	 * Wake up from sleep if necessary
@@ -201,6 +202,7 @@ static int miiphy_restart_aneg(struct eth_device *dev)
 	if (fec->mii_postcall)
 		ret = fec->mii_postcall(fec->phy_id);
 
+#endif
 	return ret;
 }
 
-- 
1.7.5.4



More information about the U-Boot mailing list