From bd117bd161ea99826494983aef8c8e236ac129bd Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 10 Mar 2009 18:19:35 +0000 Subject: [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 --- arch/arm/plat-s3c/Kconfig | 9 +++++++++ arch/arm/plat-s3c/include/plat/pm.h | 12 ++++++++++++ arch/arm/plat-s3c/pm.c | 6 ++++-- 3 files changed, 25 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-s3c') diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig index 042d34a6f81..a4c5027421d 100644 --- a/arch/arm/plat-s3c/Kconfig +++ b/arch/arm/plat-s3c/Kconfig @@ -71,6 +71,15 @@ config S3C2410_PM_DEBUG Resume code. See for more information. +config S3C_PM_DEBUG_LED_SMDK + bool "SMDK LED suspend/resume debugging" + depends on PM && (MACH_SMDK6410) + help + Say Y here to enable the use of the SMDK LEDs on the baseboard + for debugging of the state of the suspend and resume process. + + Note, this currently only works for S3C64XX based SMDK boards. + config S3C2410_PM_CHECK bool "S3C2410 PM Suspend Memory CRC" 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 5f8707e2a09..7a797192fcf 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, ...); #define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt) #endif +#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK +/** + * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs + * @set: set bits for the state of the LEDs + * @clear: clear bits for the state of the LEDs. + */ +extern void s3c_pm_debug_smdkled(u32 set, u32 clear); + +#else +static inline void s3c_pm_debug_smdkled(u32 set, u32 clear) { } +#endif /* CONFIG_S3C_PM_DEBUG_LED_SMDK */ + /* suspend memory checking */ #ifdef CONFIG_S3C2410_PM_CHECK diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c index 9957b539600..8d97db2c7a0 100644 --- a/arch/arm/plat-s3c/pm.c +++ b/arch/arm/plat-s3c/pm.c @@ -21,11 +21,10 @@ #include #include +#include #include #include -#include -#include #include #include @@ -326,6 +325,9 @@ static int s3c_pm_enter(suspend_state_t state) S3C_PMDBG("%s: post sleep, preparing to return\n", __func__); + /* LEDs should now be 1110 */ + s3c_pm_debug_smdkled(1 << 1, 0); + s3c_pm_check_restore(); /* ok, let's return from sleep */ -- cgit v1.2.3