lkml.org 
[lkml]   [2011]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 25/28] ARM: tegra: suspend: Save protected aperture across LP0
Date
Signed-off-by: Colin Cross <ccross@android.com>
---
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


\
 
 \ /
  Last update: 2011-01-24 03:09    [W:0.026 / U:11.896 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site