aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/sleep.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/sleep.S')
-rw-r--r--arch/arm/mach-tegra/sleep.S42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index 91548a77dd95..88f4de986a52 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -25,6 +25,7 @@
25#include <linux/linkage.h> 25#include <linux/linkage.h>
26 26
27#include <asm/assembler.h> 27#include <asm/assembler.h>
28#include <asm/cache.h>
28#include <asm/cp15.h> 29#include <asm/cp15.h>
29 30
30#include "iomap.h" 31#include "iomap.h"
@@ -59,4 +60,45 @@ ENTRY(tegra_disable_clean_inv_dcache)
59 ldmfd sp!, {r0, r4-r5, r7, r9-r11, pc} 60 ldmfd sp!, {r0, r4-r5, r7, r9-r11, pc}
60ENDPROC(tegra_disable_clean_inv_dcache) 61ENDPROC(tegra_disable_clean_inv_dcache)
61 62
63/*
64 * tegra_sleep_cpu_finish(unsigned long v2p)
65 *
66 * enters suspend in LP2 by turning off the mmu and jumping to
67 * tegra?_tear_down_cpu
68 */
69ENTRY(tegra_sleep_cpu_finish)
70 /* Flush and disable the L1 data cache */
71 bl tegra_disable_clean_inv_dcache
72
73 mov32 r6, tegra_tear_down_cpu
74 ldr r1, [r6]
75 add r1, r1, r0
76
77 mov32 r3, tegra_shut_off_mmu
78 add r3, r3, r0
79 mov r0, r1
80
81 mov pc, r3
82ENDPROC(tegra_sleep_cpu_finish)
83
84/*
85 * tegra_shut_off_mmu
86 *
87 * r0 = physical address to jump to with mmu off
88 *
89 * called with VA=PA mapping
90 * turns off MMU, icache, dcache and branch prediction
91 */
92 .align L1_CACHE_SHIFT
93 .pushsection .idmap.text, "ax"
94ENTRY(tegra_shut_off_mmu)
95 mrc p15, 0, r3, c1, c0, 0
96 movw r2, #CR_I | CR_Z | CR_C | CR_M
97 bic r3, r3, r2
98 dsb
99 mcr p15, 0, r3, c1, c0, 0
100 isb
101 mov pc, r0
102ENDPROC(tegra_shut_off_mmu)
103 .popsection
62#endif 104#endif