aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2006-09-14 08:29:15 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-14 08:29:15 -0400
commitc84cbb246e5a5235af30ddbe49d23bb1eaf64add (patch)
tree90ba1f16e562a64d4efe6e23470a90c74f9006e5 /arch
parenta55ee0ea51ae8f622cb3d69d81a47cb772952f73 (diff)
[ARM] 3785/1: S3C2412: Fix idle code as default uses wrong clocks
Patch from Ben Dooks Fix the idle code on the s3c2412 as the default code is using bits in the CLKCON register that are no-longer there. Provide an override for the idle code, and ensure that the power configuration is set to allow idle instead of stop or sleep. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-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));