diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-08-03 11:34:59 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2012-01-20 18:55:13 -0500 |
commit | 92311272c1a5148e5e19d0ebc9acda0ed978fba7 (patch) | |
tree | e19b240e158378b12b5a6565cb29c55f0386ec2b /arch/arm/mach-s3c2410/include/mach | |
parent | 50edbf78f566bcb7749c558129a849c63ae15838 (diff) |
ARM: s3c24xx: move special idle code to 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-s3c2410/include/mach')
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/system.h | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h index 5e215c1a5c8f..3ce4b38ba1fe 100644 --- a/arch/arm/mach-s3c2410/include/mach/system.h +++ b/arch/arm/mach-s3c2410/include/mach/system.h @@ -10,45 +10,7 @@ * published by the Free Software Foundation. */ -#include <linux/io.h> -#include <mach/hardware.h> - -#include <mach/map.h> -#include <mach/idle.h> - -#include <mach/regs-clock.h> - -void (*s3c24xx_idle)(void); - -void s3c24xx_default_idle(void) -{ - unsigned long tmp; - int i; - - /* idle the system by using the idle mode which will wait for an - * interrupt to happen before restarting the system. - */ - - /* Warning: going into idle state upsets jtag scanning */ - - __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE, - S3C2410_CLKCON); - - /* the samsung port seems to do a loop and then unset idle.. */ - for (i = 0; i < 50; i++) { - tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */ - } - - /* this bit is not cleared on re-start... */ - - __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE, - S3C2410_CLKCON); -} - static void arch_idle(void) { - if (s3c24xx_idle != NULL) - (s3c24xx_idle)(); - else - s3c24xx_default_idle(); + cpu_do_idle(); } |