summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep.S
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-11-02 16:49:01 -0700
committerSimone Willett <swillett@nvidia.com>2012-04-05 17:57:47 -0700
commitbd1e9de741fa7578062e93bda5251b95ac0f9d24 (patch)
tree2f1c7f6759c68c58d34f956996249fb5a09eaa74 /arch/arm/mach-tegra/sleep.S
parenta27cd62bb4934abe2af420ba7ca5115fbfb653be (diff)
Revert "ARM: tegra: power: Workaround PMD corruption by cpu_resume_mmu"
This reverts commit 48565a367997c1748c655bc834e06b348d4e5b2c. Change-Id: I0e1411f1260ae916c510478276d88b41416a0d42 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/85670 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/sleep.S')
-rw-r--r--arch/arm/mach-tegra/sleep.S21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index 973c8677bafe..003de98acd03 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -395,6 +395,27 @@ tegra_cpu_resume:
* r1 = physical address to jump to with mmu off
*/
ENTRY(tegra_turn_off_mmu)
+ /*
+ * change page table pointer to tegra_pgd_phys, so that IRAM
+ * and MMU shut-off will be mapped virtual == physical
+ */
+ mrc p15, 0, r2, c2, c0, 0 @ TTB 0
+ mov32 r3, ~PAGE_MASK
+ and r2, r2, r3
+ ldr r3, tegra_pgd_phys_address
+ ldr r3, [r3]
+ orr r3, r3, r2
+ mov r2, #0
+ mcr p15, 0, r2, c13, c0, 1 @ reserved context
+ isb
+ mcr p15, 0, r3, c2, c0, 0 @ TTB 0
+ isb
+
+ mov r2, #0
+ mcr p15, 0, r2, c8, c3, 0 @ invalidate TLB
+ mcr p15, 0, r2, c7, c5, 6 @ flush BTAC
+ mcr p15, 0, r2, c7, c5, 0 @ flush instruction cache
+
mov32 r3, tegra_shut_off_mmu
add r3, r3, r0
mov r0, r1