diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-21 11:26:29 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-24 03:48:43 -0400 |
commit | 34c79de6b2ea5bc5734d970851fb966b49d55a17 (patch) | |
tree | d0eda84c745e9147390b3af40c5cbeef98f57819 /arch/arm/mach-sa1100 | |
parent | 14cd8fd574bce1cfbe510ccb1f73c7c1024d770f (diff) |
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: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r-- | arch/arm/mach-sa1100/pm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/sleep.S | 11 |
2 files changed, 4 insertions, 11 deletions
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index d35885ca97a1..259ed3bcc3fe 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
33 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | 34 | ||
35 | extern void sa1100_cpu_suspend(long); | 35 | extern void sa1100_finish_suspend(unsigned long); |
36 | 36 | ||
37 | #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x | 37 | #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x |
38 | #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] | 38 | #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] |
@@ -75,7 +75,7 @@ static int sa11x0_pm_enter(suspend_state_t state) | |||
75 | PSPR = virt_to_phys(cpu_resume); | 75 | PSPR = virt_to_phys(cpu_resume); |
76 | 76 | ||
77 | /* go zzz */ | 77 | /* go zzz */ |
78 | sa1100_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET); | 78 | cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, 0, sa1100_finish_suspend); |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * Ensure not to come back here if it wasn't intended | 81 | * Ensure not to come back here if it wasn't intended |
diff --git a/arch/arm/mach-sa1100/sleep.S b/arch/arm/mach-sa1100/sleep.S index f3fe39773f8b..e8223315b442 100644 --- a/arch/arm/mach-sa1100/sleep.S +++ b/arch/arm/mach-sa1100/sleep.S | |||
@@ -22,20 +22,13 @@ | |||
22 | 22 | ||
23 | .text | 23 | .text |
24 | /* | 24 | /* |
25 | * sa1100_cpu_suspend() | 25 | * sa1100_finish_suspend() |
26 | * | 26 | * |
27 | * Causes sa11x0 to enter sleep state | 27 | * Causes sa11x0 to enter sleep state |
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | ENTRY(sa1100_cpu_suspend) | 31 | ENTRY(sa1100_finish_suspend) |
32 | stmfd sp!, {r4 - r12, lr} @ save registers on stack | ||
33 | mov r1, r0 | ||
34 | adr r3, BSYM(sa1100_finish_suspend) | ||
35 | bl cpu_suspend | ||
36 | ldmfd sp!, {r4 - r12, pc} @ return to caller | ||
37 | |||
38 | sa1100_finish_suspend: | ||
39 | @ disable clock switching | 32 | @ disable clock switching |
40 | mcr p15, 0, r1, c15, c2, 2 | 33 | mcr p15, 0, r1, c15, c2, 2 |
41 | 34 | ||