linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Implement cpu_v7_reset.
@ 2010-09-01 14:01 Linus Walleij
  2010-09-01 21:18 ` Stephen Boyd
  2010-09-01 23:23 ` Russell King - ARM Linux
  0 siblings, 2 replies; 17+ messages in thread
From: Linus Walleij @ 2010-09-01 14:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Per Fransson <per.xx.fransson@stericsson.com>

This implementation of cpu_v7_reset flushes the L1 cache
and turns off the MMU.

Signed-off-by: Per Fransson <per.xx.fransson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
 arch/arm/mm/proc-v7.S |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index d5d9b58..f2e2c92 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -63,7 +63,18 @@ ENDPROC(cpu_v7_proc_fin)
  */
 	.align	5
 ENTRY(cpu_v7_reset)
-	mov	pc, r0
+	mov     r4, r0
+	mov     ip, #0
+	bl      v7_flush_kern_cache_all         @ invalidate I,D caches
+	dsb                                     @ drain WB
+#ifdef CONFIG_MMU
+	mcr     p15, 0, ip, c8, c7, 0           @ invalidate I & D TLBs
+#endif
+	mrc     p15, 0, ip, c1, c0, 0           @ ctrl register
+	bic     ip, ip, #0x000f                 @ ............wcam
+	bic     ip, ip, #0x1100                 @ ...i...s........
+	mcr     p15, 0, ip, c1, c0, 0           @ ctrl register
+	mov     pc, r4
 ENDPROC(cpu_v7_reset)
 
 /*
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-09-06 17:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 14:01 [PATCH] ARM: Implement cpu_v7_reset Linus Walleij
2010-09-01 21:18 ` Stephen Boyd
2010-09-02  5:03   ` Uwe Kleine-König
2010-09-02  8:43     ` Russell King - ARM Linux
2010-09-01 23:23 ` Russell King - ARM Linux
2010-09-02  8:34   ` Mika Westerberg
2010-09-02  8:41     ` Russell King - ARM Linux
2010-09-02  8:53       ` Mika Westerberg
2010-09-02 10:39         ` Russell King - ARM Linux
2010-09-02 11:52           ` Mika Westerberg
2010-09-02 12:18             ` Russell King - ARM Linux
2010-09-02 13:48               ` Mika Westerberg
2010-09-03  6:04                 ` Mika Westerberg
2010-09-06  8:58                   ` Per Fransson
2010-09-06 17:24                     ` Mika Westerberg
2010-09-02 13:30           ` Per Fransson
2010-09-03 18:17             ` Per Fransson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).