summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-03-31 14:40:29 (GMT)
committerTom Rini <trini@konsulko.com>2017-04-05 20:36:49 (GMT)
commit80d4bcd3ec775ea69f832ecffcda3e7f49fba476 (patch)
tree3a4919df5de978c387a61bfed3754d1478977ab6 /common/board_f.c
parentb56db48615a86b4e4dc36827c499e779af98304f (diff)
downloadu-boot-80d4bcd3ec775ea69f832ecffcda3e7f49fba476.tar.xz
board_f: Move the extra #ifdef condition into reserve_mmu()
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>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c
index d76aab7..45d3235 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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;
@@ -394,6 +394,7 @@ static int reserve_mmu(void)
*/
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