[PATCH 09/18] ARM: imx: Removed the SoC relating codes in mxc_timer_interrupt
Shenwei Wang
shenwei.wang at freescale.com
Thu Apr 30 07:44:24 PDT 2015
Removed the SoC relating codes in the function of
mxc_timer_interrupt.
Signed-off-by: Shenwei Wang <shenwei.wang at freescale.com>
---
arch/arm/mach-imx/time.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index cf07401..e41bad9 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -320,17 +320,16 @@ static void mxc_set_mode(enum clock_event_mode mode,
*/
static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id)
{
- struct clock_event_device *evt = &clockevent_mxc;
- uint32_t tstat;
+ struct imx_timer *tm = dev_id;
+ void (*event_handler)(struct clock_event_device *);
- if (timer_is_v2())
- tstat = __raw_readl(timer_base + V2_TSTAT);
- else
- tstat = __raw_readl(timer_base + MX1_2_TSTAT);
+ BUG_ON(!tm);
- gpt_irq_acknowledge();
+ tm->gpt_irq_acknowledge(tm);
- evt->event_handler(evt);
+ event_handler = ACCESS_ONCE(tm->evt.event_handler);
+ if (event_handler)
+ event_handler(&tm->evt);
return IRQ_HANDLED;
}
--
1.9.1
More information about the linux-arm-kernel
mailing list