aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-06-13 10:58:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-06-24 03:48:43 -0400
commite8856a8797e76e6883ae81f8f9ecbb231cc535df (patch)
treef256d1100f2458e01ca2680052466b24bbabe664 /arch/arm/mach-s5pv210
parentdbc125168fd7dda4ffb24a29548746c7bd3b3d87 (diff)
ARM: pm: convert cpu_suspend() to a normal function
cpu_suspend() has a weird calling method which makes it only possible to call from assembly code: it returns with a modified stack pointer to finish the suspend, but on resume, it 'returns' via a provided pointer. We can make cpu_suspend() appear to be a normal function merely by swapping the resume pointer argument and the link register. Do so, and update all callers to take account of this more traditional behaviour. Acked-by: Frank Hofmann <frank.hofmann@tomtom.com> Tested-by: Kevin Hilman <khilman@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r--arch/arm/mach-s5pv210/sleep.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S
index a3d649466fb1..1182fc848a79 100644
--- a/arch/arm/mach-s5pv210/sleep.S
+++ b/arch/arm/mach-s5pv210/sleep.S
@@ -41,16 +41,15 @@
41ENTRY(s3c_cpu_save) 41ENTRY(s3c_cpu_save)
42 42
43 stmfd sp!, { r3 - r12, lr } 43 stmfd sp!, { r3 - r12, lr }
44 ldr r3, =resume_with_mmu 44 adr r3, BSYM(s5pv210_finish_suspend)
45 bl cpu_suspend 45 bl cpu_suspend
46 ldmfd sp!, { r3 - r12, pc }
46 47
48s5pv210_finish_suspend:
47 ldr r0, =pm_cpu_sleep 49 ldr r0, =pm_cpu_sleep
48 ldr r0, [ r0 ] 50 ldr r0, [ r0 ]
49 mov pc, r0 51 mov pc, r0
50 52
51resume_with_mmu:
52 ldmfd sp!, { r3 - r12, pc }
53
54 .ltorg 53 .ltorg
55 54
56 /* sleep magic, to allow the bootloader to check for an valid 55 /* sleep magic, to allow the bootloader to check for an valid