diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2016-12-20 17:04:49 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-01-11 15:56:37 +0100 |
commit | cd2eb96658b73d3110071c848029767c3f43c0da (patch) | |
tree | f1146834fabd0edeac26dec1ac5d7565a2733e7b /drivers/clocksource | |
parent | 56ffbfa0a24d8fd51ce9a7f79e36150a75b68c2a (diff) | |
parent | a34f0e8a2f8976f0bae4962edf2af4dd16cb85f7 (diff) |
Merge tag 'v4.4.39' into toradex_vf_4.4-next
This is the 4.4.39 stable release
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/sun4i_timer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c index 6f3719d73390..e84877a2cacc 100644 --- a/drivers/clocksource/sun4i_timer.c +++ b/drivers/clocksource/sun4i_timer.c @@ -123,12 +123,16 @@ static struct clock_event_device sun4i_clockevent = { .set_next_event = sun4i_clkevt_next_event, }; +static void sun4i_timer_clear_interrupt(void) +{ + writel(TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_ST_REG); +} static irqreturn_t sun4i_timer_interrupt(int irq, void *dev_id) { struct clock_event_device *evt = (struct clock_event_device *)dev_id; - writel(0x1, timer_base + TIMER_IRQ_ST_REG); + sun4i_timer_clear_interrupt(); evt->event_handler(evt); return IRQ_HANDLED; @@ -193,6 +197,9 @@ static void __init sun4i_timer_init(struct device_node *node) /* Make sure timer is stopped before playing with interrupts */ sun4i_clkevt_time_stop(0); + /* clear timer0 interrupt */ + sun4i_timer_clear_interrupt(); + sun4i_clockevent.cpumask = cpu_possible_mask; sun4i_clockevent.irq = irq; |