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>
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