From 60312c0895f9cc964975d3ace7235d045bbf60af Mon Sep 17 00:00:00 2001 From: Xie Xiaobo Date: Mon, 10 May 2010 11:31:21 +0800 Subject: 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 --- drivers/net/fec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/fec.c b/drivers/net/fec.c index f95fe0390874..44c1b65dcb6e 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 -- cgit v1.2.3