aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/headsmp.S
diff options
context:
space:
mode:
authorJoseph Lo <josephl@nvidia.com>2012-11-12 21:04:48 -0500
committerStephen Warren <swarren@nvidia.com>2012-11-15 17:09:22 -0500
commit29a0e7beab8e05be53d5b9c050253a4dc417041e (patch)
treeeddaa429e909f209cb0628b0733e0ade8e277fd0 /arch/arm/mach-tegra/headsmp.S
parentd552920a02759cdc45d8507868de10ac2f5b9a18 (diff)
ARM: tegra: retain L2 content over CPU suspend/resume
The L2 RAM is in different power domain from the CPU cluster. So the L2 content can be retained over CPU suspend/resume. To do that, we need to disable L2 after the MMU is disabled, and enable L2 before the MMU is enabled. But the L2 controller is in the same power domain with the CPU cluster. We need to restore it's settings and re-enable it after the power be resumed. Signed-off-by: Joseph Lo <josephl@nvidia.com> Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/headsmp.S')
-rw-r--r--arch/arm/mach-tegra/headsmp.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/headsmp.S b/arch/arm/mach-tegra/headsmp.S
index 82dc84b6b868..4a317fae6860 100644
--- a/arch/arm/mach-tegra/headsmp.S
+++ b/arch/arm/mach-tegra/headsmp.S
@@ -2,6 +2,8 @@
2#include <linux/init.h> 2#include <linux/init.h>
3 3
4#include <asm/cache.h> 4#include <asm/cache.h>
5#include <asm/asm-offsets.h>
6#include <asm/hardware/cache-l2x0.h>
5 7
6#include "flowctrl.h" 8#include "flowctrl.h"
7#include "iomap.h" 9#include "iomap.h"
@@ -113,10 +115,19 @@ ENTRY(tegra_resume)
113 str r1, [r0] 115 str r1, [r0]
114#endif 116#endif
115 117
118 /* L2 cache resume & re-enable */
119 l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr
120
116 b cpu_resume 121 b cpu_resume
117ENDPROC(tegra_resume) 122ENDPROC(tegra_resume)
118#endif 123#endif
119 124
125#ifdef CONFIG_CACHE_L2X0
126 .globl l2x0_saved_regs_addr
127l2x0_saved_regs_addr:
128 .long 0
129#endif
130
120 .align L1_CACHE_SHIFT 131 .align L1_CACHE_SHIFT
121ENTRY(__tegra_cpu_reset_handler_start) 132ENTRY(__tegra_cpu_reset_handler_start)
122 133