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

From: Colin Cross
Date: Sun Jan 23 2011 - 21:06:13 EST


Signed-off-by: Colin Cross <ccross@xxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/