|
@@ -12,6 +12,7 @@
|
|
|
#include <linux/irq.h>
|
|
|
#include <linux/kernel.h>
|
|
|
#include <linux/time.h>
|
|
|
+#include <linux/cpu.h>
|
|
|
|
|
|
#include <asm/sysreg.h>
|
|
|
|
|
@@ -87,13 +88,17 @@ static void comparator_mode(enum clock_event_mode mode,
|
|
|
pr_debug("%s: start\n", evdev->name);
|
|
|
/* FALLTHROUGH */
|
|
|
case CLOCK_EVT_MODE_RESUME:
|
|
|
- cpu_disable_idle_sleep();
|
|
|
+ /*
|
|
|
+ * If we're using the COUNT and COMPARE registers we
|
|
|
+ * need to force idle poll.
|
|
|
+ */
|
|
|
+ cpu_idle_poll_ctrl(true);
|
|
|
break;
|
|
|
case CLOCK_EVT_MODE_UNUSED:
|
|
|
case CLOCK_EVT_MODE_SHUTDOWN:
|
|
|
sysreg_write(COMPARE, 0);
|
|
|
pr_debug("%s: stop\n", evdev->name);
|
|
|
- cpu_enable_idle_sleep();
|
|
|
+ cpu_idle_poll_ctrl(false);
|
|
|
break;
|
|
|
default:
|
|
|
BUG();
|