mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
[ARM] tegra: suspend: Save protected aperture across LP0
Change-Id: Iab66c566957cfbac8ddab615ec92e57c2164ab68 Signed-off-by: Colin Cross <ccross@android.com>
This commit is contained in:
@@ -461,13 +461,14 @@ 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)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
void __iomem *mc = IO_ADDRESS(TEGRA_MC_BASE);
|
||||
unsigned long flags;
|
||||
u32 mc_data[2];
|
||||
u32 mc_data[3] = {0, 0, 0};
|
||||
int irq;
|
||||
bool do_lp0 = (current_suspend_mode == TEGRA_SUSPEND_LP0);
|
||||
bool do_lp2 = (current_suspend_mode == TEGRA_SUSPEND_LP2);
|
||||
@@ -494,6 +495,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);
|
||||
}
|
||||
|
||||
for_each_irq_desc(irq, desc) {
|
||||
@@ -521,6 +523,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();
|
||||
|
||||
Reference in New Issue
Block a user