diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2009-11-17 08:41:17 +0100 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-12-01 01:33:15 +0000 |
commit | c3fcf5d1a43cc27393f77d07b1323232095173de (patch) | |
tree | 544d53172edc45f2fafa20b511e2926528c2430b /arch/arm/mach-s5pc100/cpu.c | |
parent | b0d5217cfb0a2357ac076977400c648cccff6154 (diff) | |
download | blackbird-op-linux-c3fcf5d1a43cc27393f77d07b1323232095173de.tar.gz blackbird-op-linux-c3fcf5d1a43cc27393f77d07b1323232095173de.zip |
ARM: S5PC1XX: add cpu idle and system reset support
Add CPU idle support by a call to SoC build-in power management core.
Add system reset support by a simple write to system controll register.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s5pc100/cpu.c')
-rw-r--r-- | arch/arm/mach-s5pc100/cpu.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index 0e718890da32..a23ca5795bc8 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c @@ -22,6 +22,8 @@ #include <linux/serial_core.h> #include <linux/platform_device.h> +#include <asm/proc-fns.h> + #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/irq.h> @@ -32,6 +34,7 @@ #include <plat/cpu-freq.h> #include <plat/regs-serial.h> +#include <plat/regs-power.h> #include <plat/cpu.h> #include <plat/devs.h> @@ -45,6 +48,23 @@ static struct map_desc s5pc100_iodesc[] __initdata = { }; +static void s5pc100_idle(void) +{ + unsigned long tmp; + + tmp = __raw_readl(S5PC100_PWR_CFG); + tmp &= ~S5PC100_PWRCFG_CFG_DEEP_IDLE; + tmp &= ~S5PC100_PWRCFG_CFG_WFI_MASK; + tmp |= S5PC100_PWRCFG_CFG_WFI_DEEP_IDLE; + __raw_writel(tmp, S5PC100_PWR_CFG); + + tmp = __raw_readl(S5PC100_OTHERS); + tmp |= S5PC100_PMU_INT_DISABLE; + __raw_writel(tmp, S5PC100_OTHERS); + + cpu_do_idle(); +} + /* s5pc100_map_io * * register the standard cpu IO areas @@ -93,5 +113,7 @@ int __init s5pc100_init(void) { printk(KERN_DEBUG "S5PC100: Initialising architecture\n"); + s5pc1xx_idle = s5pc100_idle; + return sysdev_register(&s5pc100_sysdev); } |