aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2009-03-10 14:19:35 -0400
committerBen Dooks <ben-linux@fluff.org>2009-05-07 06:04:55 -0400
commitbd117bd161ea99826494983aef8c8e236ac129bd (patch)
tree76929c5f9eb611b7428a69375b2e6ddf09638821 /arch/arm/plat-s3c
parent4b637dc231a96a151ea70c27d86b35c7891e2a7c (diff)
[ARM] S3C64XX: Initial support for PM (suspend to RAM)
Add the initial support for the S3C64XX based systems to use suspend-to-RAM to sleep. Includes basic debugging for use with the SMDK6410 usign the LEDs on the baseboard. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r--arch/arm/plat-s3c/Kconfig9
-rw-r--r--arch/arm/plat-s3c/include/plat/pm.h12
-rw-r--r--arch/arm/plat-s3c/pm.c6
3 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig
index 042d34a6f815..a4c5027421d3 100644
--- a/arch/arm/plat-s3c/Kconfig
+++ b/arch/arm/plat-s3c/Kconfig
@@ -71,6 +71,15 @@ config S3C2410_PM_DEBUG
71 Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> 71 Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
72 for more information. 72 for more information.
73 73
74config S3C_PM_DEBUG_LED_SMDK
75 bool "SMDK LED suspend/resume debugging"
76 depends on PM && (MACH_SMDK6410)
77 help
78 Say Y here to enable the use of the SMDK LEDs on the baseboard
79 for debugging of the state of the suspend and resume process.
80
81 Note, this currently only works for S3C64XX based SMDK boards.
82
74config S3C2410_PM_CHECK 83config S3C2410_PM_CHECK
75 bool "S3C2410 PM Suspend Memory CRC" 84 bool "S3C2410 PM Suspend Memory CRC"
76 depends on PM && CRC32 85 depends on PM && CRC32
diff --git a/arch/arm/plat-s3c/include/plat/pm.h b/arch/arm/plat-s3c/include/plat/pm.h
index 5f8707e2a09c..7a797192fcf3 100644
--- a/arch/arm/plat-s3c/include/plat/pm.h
+++ b/arch/arm/plat-s3c/include/plat/pm.h
@@ -127,6 +127,18 @@ extern void s3c_pm_dbg(const char *msg, ...);
127#define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt) 127#define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt)
128#endif 128#endif
129 129
130#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
131/**
132 * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs
133 * @set: set bits for the state of the LEDs
134 * @clear: clear bits for the state of the LEDs.
135 */
136extern void s3c_pm_debug_smdkled(u32 set, u32 clear);
137
138#else
139static inline void s3c_pm_debug_smdkled(u32 set, u32 clear) { }
140#endif /* CONFIG_S3C_PM_DEBUG_LED_SMDK */
141
130/* suspend memory checking */ 142/* suspend memory checking */
131 143
132#ifdef CONFIG_S3C2410_PM_CHECK 144#ifdef CONFIG_S3C2410_PM_CHECK
diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c
index 9957b539600f..8d97db2c7a0d 100644
--- a/arch/arm/plat-s3c/pm.c
+++ b/arch/arm/plat-s3c/pm.c
@@ -21,11 +21,10 @@
21 21
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/map.h>
24 25
25#include <plat/regs-serial.h> 26#include <plat/regs-serial.h>
26#include <mach/regs-clock.h> 27#include <mach/regs-clock.h>
27#include <mach/regs-gpio.h>
28#include <mach/regs-mem.h>
29#include <mach/regs-irq.h> 28#include <mach/regs-irq.h>
30#include <asm/irq.h> 29#include <asm/irq.h>
31 30
@@ -326,6 +325,9 @@ static int s3c_pm_enter(suspend_state_t state)
326 325
327 S3C_PMDBG("%s: post sleep, preparing to return\n", __func__); 326 S3C_PMDBG("%s: post sleep, preparing to return\n", __func__);
328 327
328 /* LEDs should now be 1110 */
329 s3c_pm_debug_smdkled(1 << 1, 0);
330
329 s3c_pm_check_restore(); 331 s3c_pm_check_restore();
330 332
331 /* ok, let's return from sleep */ 333 /* ok, let's return from sleep */