diff options
Diffstat (limited to 'arch/arm/plat-s3c/pm.c')
-rw-r--r-- | arch/arm/plat-s3c/pm.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c index a0ca18a75b0e..061182ca66e3 100644 --- a/arch/arm/plat-s3c/pm.c +++ b/arch/arm/plat-s3c/pm.c | |||
@@ -229,7 +229,7 @@ void (*pm_cpu_sleep)(void); | |||
229 | 229 | ||
230 | static int s3c_pm_enter(suspend_state_t state) | 230 | static int s3c_pm_enter(suspend_state_t state) |
231 | { | 231 | { |
232 | unsigned long regs_save[16]; | 232 | static unsigned long regs_save[16]; |
233 | 233 | ||
234 | /* ensure the debug is initialised (if enabled) */ | 234 | /* ensure the debug is initialised (if enabled) */ |
235 | 235 | ||
@@ -289,15 +289,11 @@ static int s3c_pm_enter(suspend_state_t state) | |||
289 | 289 | ||
290 | s3c_pm_arch_stop_clocks(); | 290 | s3c_pm_arch_stop_clocks(); |
291 | 291 | ||
292 | /* s3c2410_cpu_save will also act as our return point from when | 292 | /* s3c_cpu_save will also act as our return point from when |
293 | * we resume as it saves its own register state, so use the return | 293 | * we resume as it saves its own register state and restores it |
294 | * code to differentiate return from save and return from sleep */ | 294 | * during the resume. */ |
295 | 295 | ||
296 | if (s3c_cpu_save(regs_save) == 0) { | 296 | s3c_cpu_save(regs_save); |
297 | flush_cache_all(); | ||
298 | S3C_PMDBG("preparing to sleep\n"); | ||
299 | pm_cpu_sleep(); | ||
300 | } | ||
301 | 297 | ||
302 | /* restore the cpu state using the kernel's cpu init code. */ | 298 | /* restore the cpu state using the kernel's cpu init code. */ |
303 | 299 | ||
@@ -325,6 +321,12 @@ static int s3c_pm_enter(suspend_state_t state) | |||
325 | return 0; | 321 | return 0; |
326 | } | 322 | } |
327 | 323 | ||
324 | /* callback from assembly code */ | ||
325 | void s3c_pm_cb_flushcache(void) | ||
326 | { | ||
327 | flush_cache_all(); | ||
328 | } | ||
329 | |||
328 | static int s3c_pm_prepare(void) | 330 | static int s3c_pm_prepare(void) |
329 | { | 331 | { |
330 | /* prepare check area if configured */ | 332 | /* prepare check area if configured */ |