2011-08-03 10:29:42 +00:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-gemini/idle.c
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
2014-02-24 15:48:26 +00:00
|
|
|
#include <asm/system_misc.h>
|
2011-08-03 10:29:42 +00:00
|
|
|
#include <asm/proc-fns.h>
|
|
|
|
|
|
|
|
static void gemini_idle(void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Because of broken hardware we have to enable interrupts or the CPU
|
|
|
|
* will never wakeup... Acctualy it is not very good to enable
|
|
|
|
* interrupts first since scheduler can miss a tick, but there is
|
|
|
|
* no other way around this. Platforms that needs it for power saving
|
2013-03-21 21:49:38 +00:00
|
|
|
* should enable it in init code, since by default it is
|
2011-08-03 10:29:42 +00:00
|
|
|
* disabled.
|
|
|
|
*/
|
2013-03-21 21:49:38 +00:00
|
|
|
|
|
|
|
/* FIXME: Enabling interrupts here is racy! */
|
2011-08-03 10:29:42 +00:00
|
|
|
local_irq_enable();
|
|
|
|
cpu_do_idle();
|
|
|
|
}
|
|
|
|
|
|
|
|
static int __init gemini_idle_init(void)
|
|
|
|
{
|
|
|
|
arm_pm_idle = gemini_idle;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
arch_initcall(gemini_idle_init);
|