diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/sleep34xx.S | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index 99e43cc5a503..e60ac1f71bd4 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -246,6 +246,27 @@ clean_caches: | |||
246 | * - it executes in a cached space so is faster than refetch per-block | 246 | * - it executes in a cached space so is faster than refetch per-block |
247 | * - should be faster and will change with kernel | 247 | * - should be faster and will change with kernel |
248 | * - 'might' have to copy address, load and jump to it | 248 | * - 'might' have to copy address, load and jump to it |
249 | * Flush all data from the L1 data cache before disabling | ||
250 | * SCTLR.C bit. | ||
251 | */ | ||
252 | ldr r1, kernel_flush | ||
253 | mov lr, pc | ||
254 | bx r1 | ||
255 | |||
256 | /* | ||
257 | * Clear the SCTLR.C bit to prevent further data cache | ||
258 | * allocation. Clearing SCTLR.C would make all the data accesses | ||
259 | * strongly ordered and would not hit the cache. | ||
260 | */ | ||
261 | mrc p15, 0, r0, c1, c0, 0 | ||
262 | bic r0, r0, #(1 << 2) @ Disable the C bit | ||
263 | mcr p15, 0, r0, c1, c0, 0 | ||
264 | isb | ||
265 | |||
266 | /* | ||
267 | * Invalidate L1 data cache. Even though only invalidate is | ||
268 | * necessary exported flush API is used here. Doing clean | ||
269 | * on already clean cache would be almost NOP. | ||
249 | */ | 270 | */ |
250 | ldr r1, kernel_flush | 271 | ldr r1, kernel_flush |
251 | blx r1 | 272 | blx r1 |
@@ -295,6 +316,12 @@ omap3_do_wfi: | |||
295 | nop | 316 | nop |
296 | bl wait_sdrc_ok | 317 | bl wait_sdrc_ok |
297 | 318 | ||
319 | mrc p15, 0, r0, c1, c0, 0 | ||
320 | tst r0, #(1 << 2) @ Check C bit enabled? | ||
321 | orreq r0, r0, #(1 << 2) @ Enable the C bit if cleared | ||
322 | mcreq p15, 0, r0, c1, c0, 0 | ||
323 | isb | ||
324 | |||
298 | /* | 325 | /* |
299 | * =================================== | 326 | * =================================== |
300 | * == Exit point from non-OFF modes == | 327 | * == Exit point from non-OFF modes == |