aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/sleep34xx.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/sleep34xx.S')
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S55
1 files changed, 9 insertions, 46 deletions
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index 9a1349ea460a..d18f52e46c7c 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -74,46 +74,6 @@
74 * API functions 74 * API functions
75 */ 75 */
76 76
77/*
78 * The "get_*restore_pointer" functions are used to provide a
79 * physical restore address where the ROM code jumps while waking
80 * up from MPU OFF/OSWR state.
81 * The restore pointer is stored into the scratchpad.
82 */
83
84 .text
85/* Function call to get the restore pointer for resume from OFF */
86ENTRY(get_restore_pointer)
87 stmfd sp!, {lr} @ save registers on stack
88 adr r0, restore
89 ldmfd sp!, {pc} @ restore regs and return
90ENDPROC(get_restore_pointer)
91 .align
92ENTRY(get_restore_pointer_sz)
93 .word . - get_restore_pointer
94
95 .text
96/* Function call to get the restore pointer for 3630 resume from OFF */
97ENTRY(get_omap3630_restore_pointer)
98 stmfd sp!, {lr} @ save registers on stack
99 adr r0, restore_3630
100 ldmfd sp!, {pc} @ restore regs and return
101ENDPROC(get_omap3630_restore_pointer)
102 .align
103ENTRY(get_omap3630_restore_pointer_sz)
104 .word . - get_omap3630_restore_pointer
105
106 .text
107/* Function call to get the restore pointer for ES3 to resume from OFF */
108ENTRY(get_es3_restore_pointer)
109 stmfd sp!, {lr} @ save registers on stack
110 adr r0, restore_es3
111 ldmfd sp!, {pc} @ restore regs and return
112ENDPROC(get_es3_restore_pointer)
113 .align
114ENTRY(get_es3_restore_pointer_sz)
115 .word . - get_es3_restore_pointer
116
117 .text 77 .text
118/* 78/*
119 * L2 cache needs to be toggled for stable OFF mode functionality on 3630. 79 * L2 cache needs to be toggled for stable OFF mode functionality on 3630.
@@ -316,12 +276,12 @@ omap3_do_wfi:
316 * restore_3630: applies to 36xx 276 * restore_3630: applies to 36xx
317 * restore: common code for 3xxx 277 * restore: common code for 3xxx
318 */ 278 */
319restore_es3: 279ENTRY(omap3_restore_es3)
320 ldr r5, pm_prepwstst_core_p 280 ldr r5, pm_prepwstst_core_p
321 ldr r4, [r5] 281 ldr r4, [r5]
322 and r4, r4, #0x3 282 and r4, r4, #0x3
323 cmp r4, #0x0 @ Check if previous power state of CORE is OFF 283 cmp r4, #0x0 @ Check if previous power state of CORE is OFF
324 bne restore 284 bne omap3_restore
325 adr r0, es3_sdrc_fix 285 adr r0, es3_sdrc_fix
326 ldr r1, sram_base 286 ldr r1, sram_base
327 ldr r2, es3_sdrc_fix_sz 287 ldr r2, es3_sdrc_fix_sz
@@ -333,22 +293,24 @@ copy_to_sram:
333 bne copy_to_sram 293 bne copy_to_sram
334 ldr r1, sram_base 294 ldr r1, sram_base
335 blx r1 295 blx r1
336 b restore 296 b omap3_restore
297ENDPROC(omap3_restore_es3)
337 298
338restore_3630: 299ENTRY(omap3_restore_3630)
339 ldr r1, pm_prepwstst_core_p 300 ldr r1, pm_prepwstst_core_p
340 ldr r2, [r1] 301 ldr r2, [r1]
341 and r2, r2, #0x3 302 and r2, r2, #0x3
342 cmp r2, #0x0 @ Check if previous power state of CORE is OFF 303 cmp r2, #0x0 @ Check if previous power state of CORE is OFF
343 bne restore 304 bne omap3_restore
344 /* Disable RTA before giving control */ 305 /* Disable RTA before giving control */
345 ldr r1, control_mem_rta 306 ldr r1, control_mem_rta
346 mov r2, #OMAP36XX_RTA_DISABLE 307 mov r2, #OMAP36XX_RTA_DISABLE
347 str r2, [r1] 308 str r2, [r1]
309ENDPROC(omap3_restore_3630)
348 310
349 /* Fall through to common code for the remaining logic */ 311 /* Fall through to common code for the remaining logic */
350 312
351restore: 313ENTRY(omap3_restore)
352 /* 314 /*
353 * Read the pwstctrl register to check the reason for mpu reset. 315 * Read the pwstctrl register to check the reason for mpu reset.
354 * This tells us what was lost. 316 * This tells us what was lost.
@@ -438,6 +400,7 @@ skipl2reen:
438 400
439 /* Now branch to the common CPU resume function */ 401 /* Now branch to the common CPU resume function */
440 b cpu_resume 402 b cpu_resume
403ENDPROC(omap3_restore)
441 404
442 .ltorg 405 .ltorg
443 406