diff options
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/pm-core.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/pm-core.h | 17 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/pm-core.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/pm.c | 2 |
4 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/pm-core.h b/arch/arm/mach-s3c2410/include/mach/pm-core.h index 70a83b209e25..45eea5210c87 100644 --- a/arch/arm/mach-s3c2410/include/mach/pm-core.h +++ b/arch/arm/mach-s3c2410/include/mach/pm-core.h | |||
@@ -62,3 +62,6 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, | |||
62 | struct pm_uart_save *save) | 62 | struct pm_uart_save *save) |
63 | { | 63 | { |
64 | } | 64 | } |
65 | |||
66 | static inline void s3c_pm_restored_gpios(void) { } | ||
67 | static inline void s3c_pm_saved_gpios(void) { } | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h index 4ed0f582d222..38659bebe4b1 100644 --- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h | |||
@@ -96,3 +96,20 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, | |||
96 | save->ucon = new_ucon; | 96 | save->ucon = new_ucon; |
97 | } | 97 | } |
98 | } | 98 | } |
99 | |||
100 | static inline void s3c_pm_restored_gpios(void) | ||
101 | { | ||
102 | /* ensure sleep mode has been cleared from the system */ | ||
103 | |||
104 | __raw_writel(0, S3C64XX_SLPEN); | ||
105 | } | ||
106 | |||
107 | static inline void s3c_pm_saved_gpios(void) | ||
108 | { | ||
109 | /* turn on the sleep mode and keep it there, as it seems that during | ||
110 | * suspend the xCON registers get re-set and thus you can end up with | ||
111 | * problems between going to sleep and resuming. | ||
112 | */ | ||
113 | |||
114 | __raw_writel(S3C64XX_SLPEN_USE_xSLP, S3C64XX_SLPEN); | ||
115 | } | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/pm-core.h b/arch/arm/mach-s5pv210/include/mach/pm-core.h index e8d394f8b057..3e22109e1b7b 100644 --- a/arch/arm/mach-s5pv210/include/mach/pm-core.h +++ b/arch/arm/mach-s5pv210/include/mach/pm-core.h | |||
@@ -41,3 +41,6 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, | |||
41 | { | 41 | { |
42 | /* nothing here yet */ | 42 | /* nothing here yet */ |
43 | } | 43 | } |
44 | |||
45 | static inline void s3c_pm_restored_gpios(void) { } | ||
46 | static inline void s3c_pm_saved_gpios(void) { } | ||
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 5c0a440d6e16..4f9a9515beae 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
@@ -268,6 +268,7 @@ static int s3c_pm_enter(suspend_state_t state) | |||
268 | /* save all necessary core registers not covered by the drivers */ | 268 | /* save all necessary core registers not covered by the drivers */ |
269 | 269 | ||
270 | s3c_pm_save_gpios(); | 270 | s3c_pm_save_gpios(); |
271 | s3c_pm_saved_gpios(); | ||
271 | s3c_pm_save_uarts(); | 272 | s3c_pm_save_uarts(); |
272 | s3c_pm_save_core(); | 273 | s3c_pm_save_core(); |
273 | 274 | ||
@@ -309,6 +310,7 @@ static int s3c_pm_enter(suspend_state_t state) | |||
309 | s3c_pm_restore_core(); | 310 | s3c_pm_restore_core(); |
310 | s3c_pm_restore_uarts(); | 311 | s3c_pm_restore_uarts(); |
311 | s3c_pm_restore_gpios(); | 312 | s3c_pm_restore_gpios(); |
313 | s3c_pm_restored_gpios(); | ||
312 | 314 | ||
313 | s3c_pm_debug_init(); | 315 | s3c_pm_debug_init(); |
314 | 316 | ||