[ARM] S3C: Tidy sleep code path to fix call flow

As noted by Russell King, the sleep code path is not
elegant and makes use of leaving items on the stack
between calls.

Change the code that does the following:

        if (s3c_cpu_save(regs_save) == 0) {
                flush_cache_all();
                S3C_PMDBG("preparing to sleep\n");
                pm_cpu_sleep();
        }

to simply call s3c_cpu_save, and let that do the
necessary calls to quiesce and sleep the system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
Ben Dooks
2009-03-10 11:48:07 +00:00
parent aa8aba6944
commit fff94cd9f5
3 changed files with 28 additions and 25 deletions

View File

@@ -162,5 +162,13 @@ extern void s3c_pm_restore_gpios(void);
*/
extern void s3c_pm_save_gpios(void);
/**
* s3c_pm_cb_flushcache - callback for assembly code
*
* Callback to issue flush_cache_all() as this call is
* not a directly callable object.
*/
extern void s3c_pm_cb_flushcache(void);
extern void s3c_pm_save_core(void);
extern void s3c_pm_restore_core(void);