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.S58
1 files changed, 6 insertions, 52 deletions
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
index 3a67887e6dbd..1e544be9905d 100644
--- a/arch/arm/mach-pxa/sleep.S
+++ b/arch/arm/mach-pxa/sleep.S
@@ -24,22 +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 adr r3, BSYM(pxa3xx_finish_suspend)
39 bl cpu_suspend
40 b pxa_cpu_resume
41
42pxa3xx_finish_suspend:
43 mov r0, #0x06 @ S2D3C4 mode 30 mov r0, #0x06 @ S2D3C4 mode
44 mcr p14, 0, r0, c7, c0, 0 @ enter sleep 31 mcr p14, 0, r0, c7, c0, 0 @ enter sleep
45 32
@@ -48,25 +35,13 @@ pxa3xx_finish_suspend:
48 35
49#ifdef CONFIG_PXA27x 36#ifdef CONFIG_PXA27x
50/* 37/*
51 * pxa27x_cpu_suspend() 38 * pxa27x_finish_suspend()
52 * 39 *
53 * Forces CPU into sleep state. 40 * Forces CPU into sleep state.
54 * 41 *
55 * r0 = value for PWRMODE M field for desired sleep state 42 * r0 = value for PWRMODE M field for desired sleep state
56 * r1 = v:p offset
57 */ 43 */
58ENTRY(pxa27x_cpu_suspend) 44ENTRY(pxa27x_finish_suspend)
59
60#ifndef CONFIG_IWMMXT
61 mra r2, r3, acc0
62#endif
63 stmfd sp!, {r2 - r12, lr} @ save registers on stack
64 mov r2, r0 @ save sleep mode
65 adr r3, BSYM(pxa27x_finish_suspend)
66 bl cpu_suspend
67 b pxa_cpu_resume
68
69pxa27x_finish_suspend:
70 @ Put the processor to sleep 45 @ Put the processor to sleep
71 @ (also workaround for sighting 28071) 46 @ (also workaround for sighting 28071)
72 47
@@ -103,22 +78,14 @@ pxa27x_finish_suspend:
103 78
104#ifdef CONFIG_PXA25x 79#ifdef CONFIG_PXA25x
105/* 80/*
106 * pxa25x_cpu_suspend() 81 * pxa25x_finish_suspend()
107 * 82 *
108 * Forces CPU into sleep state. 83 * Forces CPU into sleep state.
109 * 84 *
110 * r0 = value for PWRMODE M field for desired sleep state 85 * r0 = value for PWRMODE M field for desired sleep state
111 * r1 = v:p offset
112 */ 86 */
113 87
114ENTRY(pxa25x_cpu_suspend) 88ENTRY(pxa25x_finish_suspend)
115 stmfd sp!, {r2 - r12, lr} @ save registers on stack
116 mov r2, r0 @ save sleep mode
117 adr r3, BSYM(pxa25x_finish_suspend)
118 bl cpu_suspend
119 b pxa_cpu_resume
120
121pxa25x_finish_suspend:
122 @ prepare value for sleep mode 89 @ prepare value for sleep mode
123 mov r1, r0 @ sleep mode 90 mov r1, r0 @ sleep mode
124 91
@@ -202,16 +169,3 @@ pxa_cpu_do_suspend:
202 mcr p14, 0, r1, c7, c0, 0 @ PWRMODE 169 mcr p14, 0, r1, c7, c0, 0 @ PWRMODE
203 170
20420: b 20b @ loop waiting for sleep 17120: b 20b @ loop waiting for sleep
205
206/*
207 * pxa_cpu_resume()
208 *
209 * entry point from bootloader into kernel during resume
210 */
211 .align 5
212pxa_cpu_resume:
213 ldmfd sp!, {r2, r3}
214#ifndef CONFIG_IWMMXT
215 mar acc0, r2, r3
216#endif
217 ldmfd sp!, {r4 - r12, pc} @ return to caller