*/
int __cpuinit local_timer_setup(struct clock_event_device *evt)
{
-#ifdef CONFIG_LOCAL_TIMERS
- if (!enable_wait_mode) {
- evt->irq = IRQ_LOCALTIMER;
- twd_timer_setup(evt);
- return 0;
- }
-#endif
- return -1;
+ evt->irq = IRQ_LOCALTIMER;
+ twd_timer_setup(evt);
+ return 0;
}
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/pmic_external.h>
+#include <linux/clockchips.h>
#include <asm/io.h>
#include <mach/hardware.h>
#include <mach/clock.h>
__raw_writel(ccm_clpcr, MXC_CCM_CLPCR);
}
- void arch_idle(void)
+extern int tick_broadcast_oneshot_active(void);
+
+void arch_idle(void)
{
if (enable_wait_mode) {
+#ifdef CONFIG_LOCAL_TIMERS
+ int cpu = smp_processor_id();
+ if (!tick_broadcast_oneshot_active())
+ return;
+
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
+#endif
*((char *)(&num_cpu_idle_lock) + smp_processor_id()) = 0x0;
mxc_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
mx6_wait((void *)&num_cpu_idle_lock, (void *)&num_cpu_idle);
+#ifdef CONFIG_LOCAL_TIMERS
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
+#endif
} else
cpu_do_idle();
}