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/at91rm9200.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/at91rm9200.c')
-rw-r--r-- | arch/arm/mach-at91/at91rm9200.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 99c3174e24a2..dd6e2de13420 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -289,6 +289,15 @@ static struct at91_gpio_bank at91rm9200_gpio[] __initdata = { } }; +static void at91rm9200_idle(void) +{ + /* + * Disable the processor clock. The processor will be automatically + * re-enabled by an interrupt or by a reset. + */ + at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); +} + static void at91rm9200_restart(char mode, const char *cmd) { /* @@ -314,6 +323,7 @@ static void __init at91rm9200_ioremap_registers(void) static void __init at91rm9200_initialize(void) { + arm_pm_idle = at91rm9200_idle; arm_pm_restart = at91rm9200_restart; at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) |