aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXie Xiaobo <X.Xie@freescale.com>2010-05-10 11:31:21 +0800
committerXiexiaobo <X.Xie@freescale.com>2010-05-10 11:49:41 +0800
commit60312c0895f9cc964975d3ace7235d045bbf60af (patch)
treef3b48ab97305d034141e8d7ffb0616273ae3f489
parent2b7e54dace8e6b1f31b70ae003bf1a26f11eba63 (diff)
ENGR00123296 MX5: Fix FEC compiling error
1. One variable declaration was controlled by ARCH_MXS, but it was used by other platforms, So remove the ARCH_MXS flags controlling. 2. Added judgement for FEC 1588 interrupt enablement. Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
-rw-r--r--drivers/net/fec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index f95fe039087..44c1b65dcb6 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1247,9 +1247,8 @@ fec_restart(struct net_device *dev, int duplex)
int i;
uint ret = 0;
u32 temp_mac[2];
-#ifdef CONFIG_ARCH_MXS
unsigned long reg;
-#endif
+
/* Whack a reset. We should wait for this. */
writel(1, fep->hwp + FEC_ECNTRL);
udelay(10);
@@ -1368,8 +1367,11 @@ fec_restart(struct net_device *dev, int duplex)
writel(0, fep->hwp + FEC_R_DES_ACTIVE);
/* Enable interrupts we wish to service */
- writel(FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_TS_AVAIL |
- FEC_ENET_TS_TIMER, fep->hwp + FEC_IMASK);
+ if (fep->ptimer_present)
+ writel(FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_TS_AVAIL |
+ FEC_ENET_TS_TIMER, fep->hwp + FEC_IMASK);
+ else
+ writel(FEC_ENET_TXF | FEC_ENET_RXF, fep->hwp + FEC_IMASK);
}
static void