]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board_f: Move the extra #ifdef condition into reserve_mmu()
authorSimon Glass <sjg@chromium.org>
Fri, 31 Mar 2017 14:40:29 +0000 (08:40 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 20:36:49 +0000 (16:36 -0400)
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>
common/board_f.c

index d76aab763346a4eabae410b64f454c8276114fa4..45d3235ad6c2490f62ce28504401f323578f52a1 100644 (file)
@@ -372,10 +372,10 @@ static int reserve_round_4k(void)
        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;
@@ -393,6 +393,7 @@ static int reserve_mmu(void)
         * with location within secure ram.
         */
        gd->arch.tlb_allocated = gd->arch.tlb_addr;
+#endif
 #endif
 
        return 0;
@@ -897,8 +898,7 @@ static const init_fnc_t init_sequence_f[] = {
        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