aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorJonathan Austin <jonathan.austin@arm.com>2016-08-30 12:31:22 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2016-09-06 10:51:08 -0400
commitbc0ee9d24ad21a5c2b5944f66623a02e9c8831aa (patch)
tree8bcff63e1b50e2d1c7211935092cff827867cded /arch/arm/kernel
parent9a1af5f2206bd303ed201c6895c42ac3ac120a20 (diff)
ARM: 8607/1: V7M: Wire up caches for V7M processors with cache support.
This patch does the plumbing required to invoke the V7M cache code added in earlier patches in this series, although there is no users for that yet. In order to honour the I/D cache disable config options, this patch changes the mechanism by which the CCR is set on boot, to be more like V7A/R. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Tested-by: Andras Szemzo <sza@esh.hu> Tested-by: Joachim Eastwood <manabian@gmail.com> Tested-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/head-nommu.S16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index fb1a69eb49c1..6b4eb27b8758 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -158,7 +158,21 @@ __after_proc_init:
158 bic r0, r0, #CR_V 158 bic r0, r0, #CR_V
159#endif 159#endif
160 mcr p15, 0, r0, c1, c0, 0 @ write control reg 160 mcr p15, 0, r0, c1, c0, 0 @ write control reg
161#endif /* CONFIG_CPU_CP15 */ 161#elif defined (CONFIG_CPU_V7M)
162 /* For V7M systems we want to modify the CCR similarly to the SCTLR */
163#ifdef CONFIG_CPU_DCACHE_DISABLE
164 bic r0, r0, #V7M_SCB_CCR_DC
165#endif
166#ifdef CONFIG_CPU_BPREDICT_DISABLE
167 bic r0, r0, #V7M_SCB_CCR_BP
168#endif
169#ifdef CONFIG_CPU_ICACHE_DISABLE
170 bic r0, r0, #V7M_SCB_CCR_IC
171#endif
172 movw r3, #:lower16:(BASEADDR_V7M_SCB + V7M_SCB_CCR)
173 movt r3, #:upper16:(BASEADDR_V7M_SCB + V7M_SCB_CCR)
174 str r0, [r3]
175#endif /* CONFIG_CPU_CP15 elif CONFIG_CPU_V7M */
162 ret lr 176 ret lr
163ENDPROC(__after_proc_init) 177ENDPROC(__after_proc_init)
164 .ltorg 178 .ltorg