diff options
author | Fugang Duan <B38611@freescale.com> | 2011-11-11 14:25:11 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:17:58 +0800 |
commit | 05ee5a7f9e3217fddc301ad9e080d33d67810e50 (patch) | |
tree | fb091a08f82fb20cb50e3573f269c959f64df319 /drivers/net | |
parent | d19bf1528e2f602b3ca14267ad82c8a7d03aff20 (diff) | |
download | linux-05ee5a7f9e3217fddc301ad9e080d33d67810e50.tar.gz |
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/net')
-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 f9f73505891e..dc6349c2edf7 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -238,7 +238,7 @@ struct fec_enet_private { #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) @@ -885,9 +885,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); |