From c9dfafbaca0b66a6665242d019b3b9c5be056fcf Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 2 Aug 2011 10:21:36 -0400 Subject: ARM: mach-at91: move special idle code out of line ... and hook it to arm_pm_idle. Signed-off-by: Nicolas Pitre --- arch/arm/mach-at91/at91rm9200.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-at91/at91rm9200.c') 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) -- cgit v1.2.3-55-g7522