aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S26
-rw-r--r--arch/arm/plat-omap/Kconfig17
2 files changed, 41 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index 12a8ba0e0a3c..d522cd70bf53 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -284,6 +284,21 @@ restore:
284 mcr p15, 0, r0, c7, c10, 5 @ data memory barrier 284 mcr p15, 0, r0, c7, c10, 5 @ data memory barrier
285 .word 0xE1600071 @ call SMI monitor (smi #1) 285 .word 0xE1600071 @ call SMI monitor (smi #1)
286 286
287#ifdef CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE
288 /* Restore L2 aux control register */
289 @ set service ID for PPA
290 mov r0, #CONFIG_OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
291 mov r12, r0 @ copy service ID in r12
292 mov r1, #0 @ set task ID for ROM code in r1
293 mov r2, #4 @ set some flags in r2, r6
294 mov r6, #0xff
295 ldr r4, scratchpad_base
296 ldr r3, [r4, #0xBC]
297 adds r3, r3, #8 @ r3 points to parameters
298 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
299 mcr p15, 0, r0, c7, c10, 5 @ data memory barrier
300 .word 0xE1600071 @ call SMI monitor (smi #1)
301#endif
287 b logic_l1_restore 302 b logic_l1_restore
288l2_inv_api_params: 303l2_inv_api_params:
289 .word 0x1, 0x00 304 .word 0x1, 0x00
@@ -297,6 +312,11 @@ smi: .word 0xE1600070 @ Call SMI monitor (smieq)
297 ldr r0, [r3,#4] 312 ldr r0, [r3,#4]
298 mov r12, #0x3 313 mov r12, #0x3
299 .word 0xE1600070 @ Call SMI monitor (smieq) 314 .word 0xE1600070 @ Call SMI monitor (smieq)
315 ldr r4, scratchpad_base
316 ldr r3, [r4,#0xBC]
317 ldr r0, [r3,#12]
318 mov r12, #0x2
319 .word 0xE1600070 @ Call SMI monitor (smieq)
300logic_l1_restore: 320logic_l1_restore:
301 mov r1, #0 321 mov r1, #0
302 /* Invalidate all instruction caches to PoU 322 /* Invalidate all instruction caches to PoU
@@ -305,7 +325,7 @@ logic_l1_restore:
305 325
306 ldr r4, scratchpad_base 326 ldr r4, scratchpad_base
307 ldr r3, [r4,#0xBC] 327 ldr r3, [r4,#0xBC]
308 adds r3, r3, #8 328 adds r3, r3, #16
309 ldmia r3!, {r4-r6} 329 ldmia r3!, {r4-r6}
310 mov sp, r4 330 mov sp, r4
311 msr spsr_cxsf, r5 331 msr spsr_cxsf, r5
@@ -424,7 +444,9 @@ save_context_wfi:
424 mov r8, r0 /* Store SDRAM address in r8 */ 444 mov r8, r0 /* Store SDRAM address in r8 */
425 mrc p15, 0, r5, c1, c0, 1 @ Read Auxiliary Control Register 445 mrc p15, 0, r5, c1, c0, 1 @ Read Auxiliary Control Register
426 mov r4, #0x1 @ Number of parameters for restore call 446 mov r4, #0x1 @ Number of parameters for restore call
427 stmia r8!, {r4-r5} 447 stmia r8!, {r4-r5} @ Push parameters for restore call
448 mrc p15, 1, r5, c9, c0, 2 @ Read L2 AUX ctrl register
449 stmia r8!, {r4-r5} @ Push parameters for restore call
428 /* Check what that target sleep state is:stored in r1*/ 450 /* Check what that target sleep state is:stored in r1*/
429 /* 1 - Only L1 and logic lost */ 451 /* 1 - Only L1 and logic lost */
430 /* 2 - Only L2 lost */ 452 /* 2 - Only L2 lost */
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 97d0c79ffd2b..be9484a28b12 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -135,6 +135,23 @@ config OMAP_32K_TIMER
135 135
136endchoice 136endchoice
137 137
138config OMAP3_L2_AUX_SECURE_SAVE_RESTORE
139 bool "OMAP3 HS/EMU save and restore for L2 AUX control register"
140 depends on ARCH_OMAP3 && PM
141 default n
142 help
143 Without this option, L2 Auxiliary control register contents are
144 lost during off-mode entry on HS/EMU devices. This feature
145 requires support from PPA / boot-loader in HS/EMU devices, which
146 currently does not exist by default.
147
148config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
149 int "Service ID for the support routine to set L2 AUX control"
150 depends on OMAP3_L2_AUX_SECURE_SAVE_RESTORE
151 default 43
152 help
153 PPA routine service ID for setting L2 auxiliary control register.
154
138config OMAP_32K_TIMER_HZ 155config OMAP_32K_TIMER_HZ
139 int "Kernel internal timer frequency for 32KHz timer" 156 int "Kernel internal timer frequency for 32KHz timer"
140 range 32 1024 157 range 32 1024