summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv8
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-03-04 01:09:55 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 15:13:11 -0400
commit19503c3117ace4bfab86d317ee459812387e983b (patch)
treefd38129e7268097dfd8ede64704265aceacd3a1f /arch/arm/cpu/armv8
parent7985cdf74b280f86a1c7440298a84f1fb2876fd9 (diff)
downloadtalos-obmc-uboot-19503c3117ace4bfab86d317ee459812387e983b.tar.gz
talos-obmc-uboot-19503c3117ace4bfab86d317ee459812387e983b.zip
arm64: Only allow dcache disabled in SPL builds
Now that we have an easy way to describe memory regions and enable the MMU, there really shouldn't be anything holding people back from running with caches enabled on AArch64. To make sure people catch early if they're missing on the caching fun, give them a compile error. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/arm/cpu/armv8')
-rw-r--r--arch/arm/cpu/armv8/cache_v8.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index df15e0066d..d1bd06bedf 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -566,6 +566,15 @@ void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
#else /* CONFIG_SYS_DCACHE_OFF */
+/*
+ * For SPL builds, we may want to not have dcache enabled. Any real U-Boot
+ * running however really wants to have dcache and the MMU active. Check that
+ * everything is sane and give the developer a hint if it isn't.
+ */
+#ifndef CONFIG_SPL_BUILD
+#error Please describe your MMU layout in CONFIG_SYS_MEM_MAP and enable dcache.
+#endif
+
void invalidate_dcache_all(void)
{
}
OpenPOWER on IntegriCloud