@@ -149,6 +149,9 @@ static const char *clock_event_mode_label[] const = {
static void mxs_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt)
{
+ unsigned long flags;
+
+ local_irq_save(flags);
/* Disable interrupt in timer module */
timrot_irq_disable();
@@ -173,13 +176,16 @@ static void mxs_set_mode(enum clock_event_mode mode,
/* Remember timer mode */
mxs_clockevent_mode = mode;
+ local_irq_restore(flags);
switch (mode) {
case CLOCK_EVT_MODE_PERIODIC:
pr_err("%s: Periodic mode is not implemented\n", __func__);
break;
case CLOCK_EVT_MODE_ONESHOT:
+ local_irq_save(flags);
timrot_irq_enable();
+ local_irq_restore(flags);
break;
case CLOCK_EVT_MODE_SHUTDOWN:
case CLOCK_EVT_MODE_UNUSED: