@@ -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;
}
Removed the SoC relating codes in the function of mxc_timer_interrupt. Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com> --- arch/arm/mach-imx/time.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)