ARM: mach-clps711x: move special idle code out of line
authorNicolas Pitre <nicolas.pitre@linaro.org>
Tue, 2 Aug 2011 16:22:48 +0000 (12:22 -0400)
committerNicolas Pitre <nico@fluxnic.net>
Fri, 20 Jan 2012 23:55:10 +0000 (18:55 -0500)
... and hook it to arm_pm_idle.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
arch/arm/mach-clps711x/common.c
arch/arm/mach-clps711x/include/mach/system.h

index ab1711b9b4d6324f039dfc12a63802b53937daf9..8736c1acc166c7bf826e9c112ecb67de650a175a 100644 (file)
@@ -225,3 +225,19 @@ void clps711x_restart(char mode, const char *cmd)
 {
        soft_restart(0);
 }
+
+static void clps711x_idle(void)
+{
+       clps_writel(1, HALT);
+       __asm__ __volatile__(
+       "mov    r0, r0\n\
+       mov     r0, r0");
+}
+
+static int __init clps711x_idle_init(void)
+{
+       arm_pm_idle = clps711x_idle;
+       return 0;
+}
+
+arch_initcall(clps711x_idle_init);
index 23d6ef8c84daa5a7de5dc35a56e848217bfe2b8b..0e74e1e9cc24c81322c39b02bb647555cd00b015 100644 (file)
 
 static inline void arch_idle(void)
 {
-       clps_writel(1, HALT);
-       __asm__ __volatile__(
-       "mov    r0, r0\n\
-       mov     r0, r0");
+       cpu_do_idle();
 }
 
 #endif