From b4288794f1b5abcf4ed2761dffff1f5787560253 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Wed, 1 Jun 2011 10:44:50 +0100 Subject: [PATCH] --- yaml --- r: 260608 b: refs/heads/master c: 1bac282af43d81d826ef25945a35536fa9bd041d h: refs/heads/master v: v3 --- [refs] | 2 +- .../arm/mach-s3c2410/include/mach/pm-core.h | 3 +++ .../arm/mach-s3c64xx/include/mach/pm-core.h | 17 +++++++++++++++++ .../arm/mach-s5pv210/include/mach/pm-core.h | 3 +++ trunk/arch/arm/plat-samsung/pm.c | 2 ++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b93c9272c42c..9a8a4cbcc8e3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c17afc0aa69615b4c2250b6476431c4d601890a0 +refs/heads/master: 1bac282af43d81d826ef25945a35536fa9bd041d diff --git a/trunk/arch/arm/mach-s3c2410/include/mach/pm-core.h b/trunk/arch/arm/mach-s3c2410/include/mach/pm-core.h index 70a83b209e25..45eea5210c87 100644 --- a/trunk/arch/arm/mach-s3c2410/include/mach/pm-core.h +++ b/trunk/arch/arm/mach-s3c2410/include/mach/pm-core.h @@ -62,3 +62,6 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save) { } + +static inline void s3c_pm_restored_gpios(void) { } +static inline void s3c_pm_saved_gpios(void) { } diff --git a/trunk/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/trunk/arch/arm/mach-s3c64xx/include/mach/pm-core.h index 4ed0f582d222..38659bebe4b1 100644 --- a/trunk/arch/arm/mach-s3c64xx/include/mach/pm-core.h +++ b/trunk/arch/arm/mach-s3c64xx/include/mach/pm-core.h @@ -96,3 +96,20 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, save->ucon = new_ucon; } } + +static inline void s3c_pm_restored_gpios(void) +{ + /* ensure sleep mode has been cleared from the system */ + + __raw_writel(0, S3C64XX_SLPEN); +} + +static inline void s3c_pm_saved_gpios(void) +{ + /* turn on the sleep mode and keep it there, as it seems that during + * suspend the xCON registers get re-set and thus you can end up with + * problems between going to sleep and resuming. + */ + + __raw_writel(S3C64XX_SLPEN_USE_xSLP, S3C64XX_SLPEN); +} diff --git a/trunk/arch/arm/mach-s5pv210/include/mach/pm-core.h b/trunk/arch/arm/mach-s5pv210/include/mach/pm-core.h index e8d394f8b057..3e22109e1b7b 100644 --- a/trunk/arch/arm/mach-s5pv210/include/mach/pm-core.h +++ b/trunk/arch/arm/mach-s5pv210/include/mach/pm-core.h @@ -41,3 +41,6 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, { /* nothing here yet */ } + +static inline void s3c_pm_restored_gpios(void) { } +static inline void s3c_pm_saved_gpios(void) { } diff --git a/trunk/arch/arm/plat-samsung/pm.c b/trunk/arch/arm/plat-samsung/pm.c index 5c0a440d6e16..4f9a9515beae 100644 --- a/trunk/arch/arm/plat-samsung/pm.c +++ b/trunk/arch/arm/plat-samsung/pm.c @@ -268,6 +268,7 @@ static int s3c_pm_enter(suspend_state_t state) /* save all necessary core registers not covered by the drivers */ s3c_pm_save_gpios(); + s3c_pm_saved_gpios(); s3c_pm_save_uarts(); s3c_pm_save_core(); @@ -309,6 +310,7 @@ static int s3c_pm_enter(suspend_state_t state) s3c_pm_restore_core(); s3c_pm_restore_uarts(); s3c_pm_restore_gpios(); + s3c_pm_restored_gpios(); s3c_pm_debug_init();