diff options
author | Fugang Duan <B38611@freescale.com> | 2011-11-11 14:25:11 +0800 |
---|---|---|
committer | Fugang Duan <B38611@freescale.com> | 2011-11-17 19:21:10 +0800 |
commit | 11509bdd28842272140fd111871b987c956a7419 (patch) | |
tree | 6faffbb0b36c8c98241c7d1877931cbd233b4643 /drivers | |
parent | 5a4082407519ffd2d29386017b50bf1813edbcc5 (diff) |
ENGR00162013 - FEC : Fix loss interrupt when add "rootwait"
- MII timeout when config ipg 40MHz mode and add "rootwait"
para in uboot. Kernel will delay before peripheral equipment
are ready, which lead to CPU loss interrupt.
- So, prolong the timeout time, and increase the MII clock.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 2022af73e194..3ca487da1272 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -246,7 +246,7 @@ static void fec_stop(struct net_device *dev); #define FEC_MMFR_TA (2 << 16) #define FEC_MMFR_DATA(v) (v & 0xffff) -#define FEC_MII_TIMEOUT 1000 /* us */ +#define FEC_MII_TIMEOUT 2000 /* us */ /* Transmitter timeout */ #define TX_TIMEOUT (2 * HZ) @@ -898,9 +898,13 @@ static int fec_enet_mii_init(struct platform_device *pdev) */ fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), 5000000) << 1; - if (cpu_is_mx6q()) - /* FIXME: hard code to 0x1a for clock issue */ - fep->phy_speed = 0x11a; + if (cpu_is_mx6q()) { + /* FIXME: non-1588 MII clk: 66MHz, 1588 mode : 40MHz */ + if (fep->ptimer_present) + fep->phy_speed = 0xe; + else + fep->phy_speed = 0x11a; + } writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); |