Commit 34c79de6 authored by Russell King's avatar Russell King

ARM: pm: sa1100: move cpu_suspend into C code

We don't need a veneer for cpu_suspend, it can be called directly from
C code now.  Move it into sa11x0_pm_enter() along with the re-enabling
of clock switching.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 14cd8fd5
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
extern void sa1100_cpu_suspend(long); extern void sa1100_finish_suspend(unsigned long);
#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x
#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x]
...@@ -75,7 +75,7 @@ static int sa11x0_pm_enter(suspend_state_t state) ...@@ -75,7 +75,7 @@ static int sa11x0_pm_enter(suspend_state_t state)
PSPR = virt_to_phys(cpu_resume); PSPR = virt_to_phys(cpu_resume);
/* go zzz */ /* go zzz */
sa1100_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET); cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, sa1100_finish_suspend);
/* /*
* Ensure not to come back here if it wasn't intended * Ensure not to come back here if it wasn't intended
......
...@@ -22,20 +22,13 @@ ...@@ -22,20 +22,13 @@
.text .text
/* /*
* sa1100_cpu_suspend() * sa1100_finish_suspend()
* *
* Causes sa11x0 to enter sleep state * Causes sa11x0 to enter sleep state
* *
*/ */
ENTRY(sa1100_cpu_suspend) ENTRY(sa1100_finish_suspend)
stmfd sp!, {r4 - r12, lr} @ save registers on stack
mov r1, r0
adr r3, BSYM(sa1100_finish_suspend)
bl cpu_suspend
ldmfd sp!, {r4 - r12, pc} @ return to caller
sa1100_finish_suspend:
@ disable clock switching @ disable clock switching
mcr p15, 0, r1, c15, c2, 2 mcr p15, 0, r1, c15, c2, 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment