Skip to content
Snippets Groups Projects
Commit 80d4bcd3 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent b56db486
No related branches found
No related tags found
No related merge requests found
...@@ -372,10 +372,10 @@ static int reserve_round_4k(void) ...@@ -372,10 +372,10 @@ static int reserve_round_4k(void)
return 0; return 0;
} }
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) && \ #ifdef CONFIG_ARM
defined(CONFIG_ARM)
static int reserve_mmu(void) static int reserve_mmu(void)
{ {
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
/* reserve TLB table */ /* reserve TLB table */
gd->arch.tlb_size = PGTABLE_SIZE; gd->arch.tlb_size = PGTABLE_SIZE;
gd->relocaddr -= gd->arch.tlb_size; gd->relocaddr -= gd->arch.tlb_size;
...@@ -393,6 +393,7 @@ static int reserve_mmu(void) ...@@ -393,6 +393,7 @@ static int reserve_mmu(void)
* with location within secure ram. * with location within secure ram.
*/ */
gd->arch.tlb_allocated = gd->arch.tlb_addr; gd->arch.tlb_allocated = gd->arch.tlb_addr;
#endif
#endif #endif
return 0; return 0;
...@@ -897,8 +898,7 @@ static const init_fnc_t init_sequence_f[] = { ...@@ -897,8 +898,7 @@ static const init_fnc_t init_sequence_f[] = {
reserve_pram, reserve_pram,
#endif #endif
reserve_round_4k, reserve_round_4k,
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) && \ #ifdef CONFIG_ARM
defined(CONFIG_ARM)
reserve_mmu, reserve_mmu,
#endif #endif
#ifdef CONFIG_DM_VIDEO #ifdef CONFIG_DM_VIDEO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment