aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2011-12-28 07:43:11 +0100
committerEric Miao <eric.miao@linaro.org>2012-01-17 12:19:57 +0800
commitd3609db7353a2f031a696fb5b4b6204a6fcbf205 (patch)
tree38c56467be86e7e84f97a417ad0114523d16804c
parent70e82115ed5459b69318f419eb64ccabfb67c36a (diff)
downloadu-boot-linaro-d3609db7353a2f031a696fb5b4b6204a6fcbf205.tar.gz
fec_mxc: move autonegoatiate restart after mii_postcall
Allow boards to change what is advertised before an autoneg restart happens Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
-rw-r--r--drivers/net/fec_mxc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index b652699..24ef418 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -206,12 +206,12 @@ static int miiphy_restart_aneg(struct eth_device *dev)
miiphy_write(dev->name, fec->phy_id, MII_ADVERTISE,
LPA_100FULL | LPA_100HALF | LPA_10FULL |
LPA_10HALF | PHY_ANLPAR_PSB_802_3);
- miiphy_write(dev->name, fec->phy_id, MII_BMCR,
- BMCR_ANENABLE | BMCR_ANRESTART);
-
if (fec->mii_postcall)
ret = fec->mii_postcall(fec->phy_id);
+ miiphy_write(dev->name, fec->phy_id, MII_BMCR,
+ BMCR_ANENABLE | BMCR_ANRESTART);
+
return ret;
}