aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/s3c2412.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2410/s3c2412.c')
-rw-r--r--arch/arm/mach-s3c2410/s3c2412.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c
index e24ffd5e478b..2d163f7600be 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2410/s3c2412.c
@@ -35,11 +35,15 @@
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/hardware.h> 37#include <asm/hardware.h>
38#include <asm/proc-fns.h>
38#include <asm/io.h> 39#include <asm/io.h>
39#include <asm/irq.h> 40#include <asm/irq.h>
40 41
42#include <asm/arch/idle.h>
43
41#include <asm/arch/regs-clock.h> 44#include <asm/arch/regs-clock.h>
42#include <asm/arch/regs-serial.h> 45#include <asm/arch/regs-serial.h>
46#include <asm/arch/regs-power.h>
43#include <asm/arch/regs-gpio.h> 47#include <asm/arch/regs-gpio.h>
44#include <asm/arch/regs-gpioj.h> 48#include <asm/arch/regs-gpioj.h>
45#include <asm/arch/regs-dsc.h> 49#include <asm/arch/regs-dsc.h>
@@ -75,6 +79,27 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no)
75 s3c_device_nand.name = "s3c2412-nand"; 79 s3c_device_nand.name = "s3c2412-nand";
76} 80}
77 81
82/* s3c2412_idle
83 *
84 * use the standard idle call by ensuring the idle mode
85 * in power config, then issuing the idle co-processor
86 * instruction
87*/
88
89static void s3c2412_idle(void)
90{
91 unsigned long tmp;
92
93 /* ensure our idle mode is to go to idle */
94
95 tmp = __raw_readl(S3C2412_PWRCFG);
96 tmp &= ~S3C2412_PWRCFG_STANDBYWFI_MASK;
97 tmp |= S3C2412_PWRCFG_STANDBYWFI_IDLE;
98 __raw_writel(tmp, S3C2412_PWRCFG);
99
100 cpu_do_idle();
101}
102
78/* s3c2412_map_io 103/* s3c2412_map_io
79 * 104 *
80 * register the standard cpu IO areas, and any passed in from the 105 * register the standard cpu IO areas, and any passed in from the
@@ -87,6 +112,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
87 112
88 s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; 113 s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10;
89 114
115 /* set our idle function */
116
117 s3c24xx_idle = s3c2412_idle;
118
90 /* register our io-tables */ 119 /* register our io-tables */
91 120
92 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); 121 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));