aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2012-02-22 00:24:35 +0000
committerJohn Rigby <john.rigby@linaro.org>2012-05-04 16:28:45 -0600
commit3356461a17a9b35a1a0bedb75a1430583c5461f4 (patch)
treef4a32ba24a7b8ce808224d5161c4578dacf01913
parent722f4ae81039d33289171bdd807df804ee95e67f (diff)
downloadu-boot-linaro-stable-3356461a17a9b35a1a0bedb75a1430583c5461f4.tar.gz
NET: fec_mxc.c: Add a way to disable auto negotiation
Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@freescale.com>
-rw-r--r--drivers/net/fec_mxc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index d8db9f0c6..5c3b90fe0 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -187,9 +187,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
@@ -213,6 +214,7 @@ static int miiphy_restart_aneg(struct eth_device *dev)
if (fec->mii_postcall)
ret = fec->mii_postcall(fec->phy_id);
+#endif
return ret;
}