diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-08-03 14:29:42 +0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2012-01-21 03:55:12 +0400 |
commit | 8925b0f88ec3f6c65418bf5f430a16a827f4c77b (patch) | |
tree | 0d096288b5311dc228a13e7c288b78bb865229db /arch/arm/mach-gemini/idle.c | |
parent | 1b7f72fc395d3d2b498fee5ecfb9e46497f55cdd (diff) | |
download | linux-8925b0f88ec3f6c65418bf5f430a16a827f4c77b.tar.xz |
ARM: mach-gemini: move special idle code out of line
... and hook it to arm_pm_idle.
Signed-off-by: nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/mach-gemini/idle.c')
-rw-r--r-- | arch/arm/mach-gemini/idle.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-gemini/idle.c b/arch/arm/mach-gemini/idle.c new file mode 100644 index 000000000000..92bbd6bb600a --- /dev/null +++ b/arch/arm/mach-gemini/idle.c @@ -0,0 +1,29 @@ +/* + * arch/arm/mach-gemini/idle.c + */ + +#include <linux/init.h> +#include <asm/system.h> +#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 + * should call enable_hlt() in init code, since by default it is + * disabled. + */ + 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); |