summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-h720x/common.c
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-08-03 06:55:31 -0400
committerNicolas Pitre <nico@fluxnic.net>2012-01-20 18:55:12 -0500
commit50edbf78f566bcb7749c558129a849c63ae15838 (patch)
tree26d2d3aacfc8040763d97deb2473946011cbd2c4 /arch/arm/mach-h720x/common.c
parent8925b0f88ec3f6c65418bf5f430a16a827f4c77b (diff)
downloadlinux-50edbf78f566bcb7749c558129a849c63ae15838.tar.bz2
ARM: mach-h720x: 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-h720x/common.c')
-rw-r--r--arch/arm/mach-h720x/common.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index f8a2f6bb5483..e756d1ac00c2 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -247,3 +247,21 @@ void h720x_restart(char mode, const char *cmd)
{
CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
}
+
+static void h720x__idle(void)
+{
+ CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
+ nop();
+ nop();
+ CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
+ nop();
+ nop();
+}
+
+static int __init h720x_idle_init(void)
+{
+ arm_pm_idle = h720x__idle;
+ return 0;
+}
+
+arch_initcall(h720x_idle_init);