On 12/26/2013 08:22 PM, Stephen Boyd wrote: > On 12/25, Ivan Khoronzhuk wrote: >> + >> + /* enable timer interrupts */ >> + keystone_timer_writel(INTCTLSTAT_ENINT_MASK, INTCTLSTAT); >> + >> + error = request_irq(irq, keystone_timer_interrupt, IRQF_TIMER, >> + TIMER_NAME, event_dev); >> + if (error) { >> + pr_err("%s: failed to setup irq\n", __func__); >> + goto err; >> + } >> + >> + /* setup clockevent */ >> + event_dev->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; >> + event_dev->set_next_event = keystone_set_next_event; >> + event_dev->set_mode = keystone_set_mode; >> + event_dev->cpumask = cpu_all_mask; >> + event_dev->owner = THIS_MODULE; >> + event_dev->name = TIMER_NAME; >> + event_dev->irq = irq; >> + >> + clockevents_config_and_register(event_dev, rate, 1, ULONG_MAX); >> + > > I hope you don't get an interrupt before you register the > clockevent. You might want to reorder the interrupt request and > the clockevent registration so that it isn't a problem. Other > than that you can have my > > Reviewed-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> > Thanks. While interrupt enabling the timer is disabled, so it cannot generate interrupt. The timer will be enabled when next event is set by clockevent core. -- Regards, Ivan Khoronzhuk -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html