diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-08-02 16:21:36 +0200 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2012-01-21 00:55:10 +0100 |
commit | c9dfafbaca0b66a6665242d019b3b9c5be056fcf (patch) | |
tree | 68163a95d873055cfa97ea4b62be848adb9d59bd /arch/arm/mach-at91/at91cap9.c | |
parent | ARM: mach-exynos: use standard arch_idle() (diff) | |
download | linux-c9dfafbaca0b66a6665242d019b3b9c5be056fcf.tar.xz linux-c9dfafbaca0b66a6665242d019b3b9c5be056fcf.zip |
ARM: mach-at91: 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-at91/at91cap9.c')
-rw-r--r-- | arch/arm/mach-at91/at91cap9.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c index edb879ac04c8..1d29a6cbbae2 100644 --- a/arch/arm/mach-at91/at91cap9.c +++ b/arch/arm/mach-at91/at91cap9.c @@ -14,6 +14,7 @@ #include <linux/module.h> +#include <asm/proc-fns.h> #include <asm/irq.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> @@ -314,6 +315,12 @@ static struct at91_gpio_bank at91cap9_gpio[] __initdata = { } }; +static void at91cap9_idle(void) +{ + at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); + cpu_do_idle(); +} + static void at91cap9_restart(char mode, const char *cmd) { at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); @@ -337,6 +344,7 @@ static void __init at91cap9_ioremap_registers(void) static void __init at91cap9_initialize(void) { + arm_pm_idle = at91cap9_idle; arm_pm_restart = at91cap9_restart; at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); |