aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/sleep.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/sleep.S')
-rw-r--r--arch/arm/mach-pxa/sleep.S55
1 files changed, 8 insertions, 47 deletions
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
index 6f5368899d84..1e544be9905d 100644
--- a/arch/arm/mach-pxa/sleep.S
+++ b/arch/arm/mach-pxa/sleep.S
@@ -24,20 +24,9 @@
24 24
25#ifdef CONFIG_PXA3xx 25#ifdef CONFIG_PXA3xx
26/* 26/*
27 * pxa3xx_cpu_suspend() - forces CPU into sleep state (S2D3C4) 27 * pxa3xx_finish_suspend() - forces CPU into sleep state (S2D3C4)
28 *
29 * r0 = v:p offset
30 */ 28 */
31ENTRY(pxa3xx_cpu_suspend) 29ENTRY(pxa3xx_finish_suspend)
32
33#ifndef CONFIG_IWMMXT
34 mra r2, r3, acc0
35#endif
36 stmfd sp!, {r2 - r12, lr} @ save registers on stack
37 mov r1, r0
38 ldr r3, =pxa_cpu_resume @ resume function
39 bl cpu_suspend
40
41 mov r0, #0x06 @ S2D3C4 mode 30 mov r0, #0x06 @ S2D3C4 mode
42 mcr p14, 0, r0, c7, c0, 0 @ enter sleep 31 mcr p14, 0, r0, c7, c0, 0 @ enter sleep
43 32
@@ -46,28 +35,18 @@ ENTRY(pxa3xx_cpu_suspend)
46 35
47#ifdef CONFIG_PXA27x 36#ifdef CONFIG_PXA27x
48/* 37/*
49 * pxa27x_cpu_suspend() 38 * pxa27x_finish_suspend()
50 * 39 *
51 * Forces CPU into sleep state. 40 * Forces CPU into sleep state.
52 * 41 *
53 * r0 = value for PWRMODE M field for desired sleep state 42 * r0 = value for PWRMODE M field for desired sleep state
54 * r1 = v:p offset
55 */ 43 */
56ENTRY(pxa27x_cpu_suspend) 44ENTRY(pxa27x_finish_suspend)
57
58#ifndef CONFIG_IWMMXT
59 mra r2, r3, acc0
60#endif
61 stmfd sp!, {r2 - r12, lr} @ save registers on stack
62 mov r4, r0 @ save sleep mode
63 ldr r3, =pxa_cpu_resume @ resume function
64 bl cpu_suspend
65
66 @ Put the processor to sleep 45 @ Put the processor to sleep
67 @ (also workaround for sighting 28071) 46 @ (also workaround for sighting 28071)
68 47
69 @ prepare value for sleep mode 48 @ prepare value for sleep mode
70 mov r1, r4 @ sleep mode 49 mov r1, r0 @ sleep mode
71 50
72 @ prepare pointer to physical address 0 (virtual mapping in generic.c) 51 @ prepare pointer to physical address 0 (virtual mapping in generic.c)
73 mov r2, #UNCACHED_PHYS_0 52 mov r2, #UNCACHED_PHYS_0
@@ -99,21 +78,16 @@ ENTRY(pxa27x_cpu_suspend)
99 78
100#ifdef CONFIG_PXA25x 79#ifdef CONFIG_PXA25x
101/* 80/*
102 * pxa25x_cpu_suspend() 81 * pxa25x_finish_suspend()
103 * 82 *
104 * Forces CPU into sleep state. 83 * Forces CPU into sleep state.
105 * 84 *
106 * r0 = value for PWRMODE M field for desired sleep state 85 * r0 = value for PWRMODE M field for desired sleep state
107 * r1 = v:p offset
108 */ 86 */
109 87
110ENTRY(pxa25x_cpu_suspend) 88ENTRY(pxa25x_finish_suspend)
111 stmfd sp!, {r2 - r12, lr} @ save registers on stack
112 mov r4, r0 @ save sleep mode
113 ldr r3, =pxa_cpu_resume @ resume function
114 bl cpu_suspend
115 @ prepare value for sleep mode 89 @ prepare value for sleep mode
116 mov r1, r4 @ sleep mode 90 mov r1, r0 @ sleep mode
117 91
118 @ prepare pointer to physical address 0 (virtual mapping in generic.c) 92 @ prepare pointer to physical address 0 (virtual mapping in generic.c)
119 mov r2, #UNCACHED_PHYS_0 93 mov r2, #UNCACHED_PHYS_0
@@ -195,16 +169,3 @@ pxa_cpu_do_suspend:
195 mcr p14, 0, r1, c7, c0, 0 @ PWRMODE 169 mcr p14, 0, r1, c7, c0, 0 @ PWRMODE
196 170
19720: b 20b @ loop waiting for sleep 17120: b 20b @ loop waiting for sleep
198
199/*
200 * pxa_cpu_resume()
201 *
202 * entry point from bootloader into kernel during resume
203 */
204 .align 5
205pxa_cpu_resume:
206 ldmfd sp!, {r2, r3}
207#ifndef CONFIG_IWMMXT
208 mar acc0, r2, r3
209#endif
210 ldmfd sp!, {r4 - r12, pc} @ return to caller