diff options
author | Jason Liu <r64343@freescale.com> | 2010-08-11 12:25:22 +0800 |
---|---|---|
committer | Andy Voltz <andy.voltz@timesys.com> | 2011-06-01 13:18:42 -0400 |
commit | 94e6fa5f14cdba87b40be2a459f7b200706080e5 (patch) | |
tree | b1f58605971d3ece5187af097c4dbe1780ca270e /drivers/net | |
parent | 67905b08ace4d6f05a82c861e4fc200c4234bc48 (diff) |
ENGR00126155 FEC:Set RMII mode corretly after FEC reset
FEC will go to MII mode after the FEC reset
which lead to PHY not work correctly for next link set up.
We need to reconfigure the MII/RMII mode according
the platform data setting after FEC reset
Signed-off-by:Jason Liu <r64343@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 743759587985..c09cada27bfe 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -1320,6 +1320,17 @@ fec_stop(struct net_device *dev) writel(1, fep->hwp + FEC_ECNTRL); udelay(10); +#ifdef CONFIG_ARCH_MXS + /* Check MII or RMII */ + if (fep->phy_interface == PHY_INTERFACE_MODE_RMII) + writel(readl(fep->hwp + FEC_R_CNTRL) | 0x100, + fep->hwp + FEC_R_CNTRL); + else + writel(readl(fep->hwp + FEC_R_CNTRL) & ~0x100, + fep->hwp + FEC_R_CNTRL); +#endif + /* Clear outstanding MII command interrupts. */ + writel(FEC_ENET_MII, fep->hwp + FEC_IEVENT); writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); } |