aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2011-12-28 07:43:11 +0100
committerJohn Rigby <john.rigby@linaro.org>2012-04-19 02:18:33 -0600
commit131ae652ac32ee8bc5a3cdf0f4c5dafc912cab23 (patch)
tree93bcc44b715f254bfb99e0c347cecec8cdfbe323
parent297fdd2dcfaaac7d3320f46d1093db79c618f1fc (diff)
downloadu-boot-linaro-next-topic-2012.04-mx.tar.gz
fec_mxc: move autonegoatiate restart after mii_postcalltopic-2012.04-mx
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 4105f6c..bca4a4b 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -207,12 +207,13 @@ static int miiphy_restart_aneg(struct eth_device *dev)
fec_mdio_write(eth, fec->phy_id, MII_ADVERTISE,
LPA_100FULL | LPA_100HALF | LPA_10FULL |
LPA_10HALF | PHY_ANLPAR_PSB_802_3);
- fec_mdio_write(eth, fec->phy_id, MII_BMCR,
- BMCR_ANENABLE | BMCR_ANRESTART);
if (fec->mii_postcall)
ret = fec->mii_postcall(fec->phy_id);
+ fec_mdio_write(eth, fec->phy_id, MII_BMCR,
+ BMCR_ANENABLE | BMCR_ANRESTART);
+
return ret;
}