Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8925b0f8 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Nicolas Pitre
Browse files

ARM: mach-gemini: move special idle code out of line



... and hook it to arm_pm_idle.

Signed-off-by: default avatarnicolas Pitre <nicolas.pitre@linaro.org>
parent 1b7f72fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@


# Object file lists.
# Object file lists.


obj-y			:= irq.o mm.o time.o devices.o gpio.o
obj-y			:= irq.o mm.o time.o devices.o gpio.o idle.o


# Board-specific support
# Board-specific support
obj-$(CONFIG_MACH_NAS4220B)	+= board-nas4220b.o
obj-$(CONFIG_MACH_NAS4220B)	+= board-nas4220b.o
+29 −0
Original line number Original line Diff line number Diff line
/*
 * 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);
+0 −9
Original line number Original line Diff line number Diff line
@@ -16,15 +16,6 @@


static inline void arch_idle(void)
static inline void arch_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 here 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();
	cpu_do_idle();
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -73,8 +73,8 @@ void __init gemini_init_irq(void)
	unsigned int i, mode = 0, level = 0;
	unsigned int i, mode = 0, level = 0;


	/*
	/*
	 * Disable arch_idle() by default since it is buggy
	 * Disable the idle handler by default since it is buggy
	 * For more info see arch/arm/mach-gemini/include/mach/system.h
	 * For more info see arch/arm/mach-gemini/idle.c
	 */
	 */
	disable_hlt();
	disable_hlt();