summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFugang Duan <B38611@freescale.com>2011-11-11 14:25:11 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:07:13 +0800
commitab1897cd83ca6b00f589e95876336d0725fa77a3 (patch)
tree1581a8c93fac8b05a33cedd5cd968803162d1e36 /drivers/net
parentaaa2f05eca5e5658d83c4a61efdfc539109eb15f (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/net')
-rw-r--r--drivers/net/fec.c12
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);