aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9g45.c
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-08-02 10:21:36 -0400
committerNicolas Pitre <nico@fluxnic.net>2012-01-20 18:55:10 -0500
commitc9dfafbaca0b66a6665242d019b3b9c5be056fcf (patch)
tree68163a95d873055cfa97ea4b62be848adb9d59bd /arch/arm/mach-at91/at91sam9g45.c
parent8dd67188834314fd6a8426e17f56c7a103c57d9c (diff)
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/at91sam9g45.c')
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 7032dd32cdf0..0e80b395214d 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -318,6 +318,12 @@ static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = {
318 } 318 }
319}; 319};
320 320
321static void at91sam9g45_idle(void)
322{
323 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
324 cpu_do_idle();
325}
326
321static void at91sam9g45_restart(char mode, const char *cmd) 327static void at91sam9g45_restart(char mode, const char *cmd)
322{ 328{
323 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 329 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
@@ -342,6 +348,7 @@ static void __init at91sam9g45_ioremap_registers(void)
342 348
343static void __init at91sam9g45_initialize(void) 349static void __init at91sam9g45_initialize(void)
344{ 350{
351 arm_pm_idle = at91sam9g45_idle;
345 arm_pm_restart = at91sam9g45_restart; 352 arm_pm_restart = at91sam9g45_restart;
346 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); 353 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
347 354