aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-gemini/idle.c
blob: 92bbd6bb600a37fdb11b7d8ef5427e48a02c176d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);