The arch-specific details of the cache being off are best handled inside
the reserve_mmu(). This cleans up the init sequence a little.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
return 0;
}
-#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) && \
- defined(CONFIG_ARM)
+#ifdef CONFIG_ARM
static int reserve_mmu(void)
{
+#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
/* reserve TLB table */
gd->arch.tlb_size = PGTABLE_SIZE;
gd->relocaddr -= gd->arch.tlb_size;
* with location within secure ram.
*/
gd->arch.tlb_allocated = gd->arch.tlb_addr;
+#endif
#endif
return 0;
reserve_pram,
#endif
reserve_round_4k,
-#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) && \
- defined(CONFIG_ARM)
+#ifdef CONFIG_ARM
reserve_mmu,
#endif
#ifdef CONFIG_DM_VIDEO