summaryrefslogtreecommitdiff
path: root/board/armltd/vexpress/vexpress_common.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2025-07-12 20:52:27 +0200
committerTom Rini <trini@konsulko.com>2025-07-16 10:56:28 -0600
commit3b4604a40b9fd61b87e9d059fc56f04d36f1a380 (patch)
treeb8338bc847f719f9bf2c395af082d8526694a1a2 /board/armltd/vexpress/vexpress_common.c
parentf1c03778a4be8e08decf88f6b2018b90f6662090 (diff)
board: vexpress_ca9x4: Enable D-cache and MMUHEADmaster
Enable the D-cache, which will also enable the MMU. The latter make sure we don't do unaligned access on Strongly-ordered memory, which has UNPREDICTABLE behaviour according the architecture definition. This fixes using U-Boot with recent versions of QEMU's vexpress-ca9 emulation. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Diffstat (limited to 'board/armltd/vexpress/vexpress_common.c')
-rw-r--r--board/armltd/vexpress/vexpress_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index 6c374e25e32..3833af59b09 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -165,3 +165,11 @@ void smp_set_core_boot_addr(unsigned long addr, int corenr)
writel(addr, CONFIG_SYSFLAGS_ADDR);
}
#endif
+
+#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
+void enable_caches(void)
+{
+ /* Enable D-cache. I-cache is already enabled in start.S */
+ dcache_enable();
+}
+#endif