aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pc100
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pc100')
-rw-r--r--arch/arm/mach-s5pc100/cpu.c22
-rw-r--r--arch/arm/mach-s5pc100/include/mach/system.h13
2 files changed, 32 insertions, 3 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 @@
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <asm/proc-fns.h>
26
25#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 28#include <asm/mach/map.h>
27#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
@@ -32,6 +34,7 @@
32 34
33#include <plat/cpu-freq.h> 35#include <plat/cpu-freq.h>
34#include <plat/regs-serial.h> 36#include <plat/regs-serial.h>
37#include <plat/regs-power.h>
35 38
36#include <plat/cpu.h> 39#include <plat/cpu.h>
37#include <plat/devs.h> 40#include <plat/devs.h>
@@ -45,6 +48,23 @@
45static struct map_desc s5pc100_iodesc[] __initdata = { 48static struct map_desc s5pc100_iodesc[] __initdata = {
46}; 49};
47 50
51static void s5pc100_idle(void)
52{
53 unsigned long tmp;
54
55 tmp = __raw_readl(S5PC100_PWR_CFG);
56 tmp &= ~S5PC100_PWRCFG_CFG_DEEP_IDLE;
57 tmp &= ~S5PC100_PWRCFG_CFG_WFI_MASK;
58 tmp |= S5PC100_PWRCFG_CFG_WFI_DEEP_IDLE;
59 __raw_writel(tmp, S5PC100_PWR_CFG);
60
61 tmp = __raw_readl(S5PC100_OTHERS);
62 tmp |= S5PC100_PMU_INT_DISABLE;
63 __raw_writel(tmp, S5PC100_OTHERS);
64
65 cpu_do_idle();
66}
67
48/* s5pc100_map_io 68/* s5pc100_map_io
49 * 69 *
50 * register the standard cpu IO areas 70 * register the standard cpu IO areas
@@ -93,5 +113,7 @@ int __init s5pc100_init(void)
93{ 113{
94 printk(KERN_DEBUG "S5PC100: Initialising architecture\n"); 114 printk(KERN_DEBUG "S5PC100: Initialising architecture\n");
95 115
116 s5pc1xx_idle = s5pc100_idle;
117
96 return sysdev_register(&s5pc100_sysdev); 118 return sysdev_register(&s5pc100_sysdev);
97} 119}
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h
index e39014375470..f0d31a2a598c 100644
--- a/arch/arm/mach-s5pc100/include/mach/system.h
+++ b/arch/arm/mach-s5pc100/include/mach/system.h
@@ -11,14 +11,21 @@
11#ifndef __ASM_ARCH_SYSTEM_H 11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H __FILE__ 12#define __ASM_ARCH_SYSTEM_H __FILE__
13 13
14#include <linux/io.h>
15#include <mach/map.h>
16#include <plat/regs-clock.h>
17
18void (*s5pc1xx_idle)(void);
19
14static void arch_idle(void) 20static void arch_idle(void)
15{ 21{
16 /* nothing here yet */ 22 if (s5pc1xx_idle)
23 s5pc1xx_idle();
17} 24}
18 25
19static void arch_reset(char mode, const char *cmd) 26static void arch_reset(char mode, const char *cmd)
20{ 27{
21 /* nothing here yet */ 28 __raw_writel(S5PC100_SWRESET_RESETVAL, S5PC100_SWRESET);
29 return;
22} 30}
23
24#endif /* __ASM_ARCH_IRQ_H */ 31#endif /* __ASM_ARCH_IRQ_H */