]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/armv8/cache_v8.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[u-boot] / arch / arm / cpu / armv8 / cache_v8.c
index df15e0066d70ae421b7a187d92472f6dadff946d..1615542a99f3f62c4228100d70e700c5eb5506ed 100644 (file)
@@ -320,7 +320,7 @@ static int count_required_pts(u64 addr, int level, u64 maxaddr)
 }
 
 /* Returns the estimated required size of all page tables */
-u64 get_page_table_size(void)
+__weak u64 get_page_table_size(void)
 {
        u64 one_pt = MAX_PTE_ENTRIES * sizeof(u64);
        u64 size = 0;
@@ -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)
 {
 }