Thread (59 messages) 59 messages, 9 authors, 2011-02-01
STALE5618d

[PATCH v2 25/28] ARM: tegra: suspend: Save protected aperture across LP0

From: Colin Cross <hidden>
Date: 2011-01-24 02:02:21
Also in: lkml
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

Signed-off-by: Colin Cross <redacted>
---
 arch/arm/mach-tegra/suspend.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c
index ded2c36..be8c78f 100644
--- a/arch/arm/mach-tegra/suspend.c
+++ b/arch/arm/mach-tegra/suspend.c
@@ -497,12 +497,13 @@ static void tegra_debug_uart_resume(void)
 
 #define MC_SECURITY_START	0x6c
 #define MC_SECURITY_SIZE	0x70
+#define MC_SECURITY_CFG2	0x7c
 
 static int tegra_suspend_enter(suspend_state_t state)
 {
 	void __iomem *mc = IO_ADDRESS(TEGRA_MC_BASE);
 	unsigned long flags;
-	u32 mc_data[2];
+	u32 mc_data[3] = {0, 0, 0};
 	bool do_lp0 = (current_suspend_mode == TEGRA_SUSPEND_LP0);
 	bool do_lp2 = (current_suspend_mode == TEGRA_SUSPEND_LP2);
 	int lp_state;
@@ -533,6 +534,7 @@ static int tegra_suspend_enter(suspend_state_t state)
 
 		mc_data[0] = readl(mc + MC_SECURITY_START);
 		mc_data[1] = readl(mc + MC_SECURITY_SIZE);
+		mc_data[2] = readl(mc + MC_SECURITY_CFG2);
 	}
 
 	rtc_before = tegra_rtc_read_ms();
@@ -550,6 +552,7 @@ static int tegra_suspend_enter(suspend_state_t state)
 	if (do_lp0) {
 		writel(mc_data[0], mc + MC_SECURITY_START);
 		writel(mc_data[1], mc + MC_SECURITY_SIZE);
+		writel(mc_data[2], mc + MC_SECURITY_CFG2);
 
 		tegra_clk_resume();
 		tegra_gpio_resume();
-- 
1.7.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help