diff options
author | Fugang Duan <B38611@freescale.com> | 2011-11-11 14:25:11 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2011-12-01 11:36:40 +0800 |
commit | 1b4c10dcea2d06dc59992c94dbd1e6861abcced5 (patch) | |
tree | d5d235c169050529bd277e8b99ffaf1b9270c1da | |
parent | 9ba4f9d08db576dcfebc336834b02fe89819515e (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>
-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 2022af73e19..3ca487da127 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); |