From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Fri, 31 Mar 2017 08:40:29 -0600 Subject: [U-Boot] [PATCH 06/16] board_f: Move the extra #ifdef condition into reserve_mmu() In-Reply-To: <20170331144039.14587-1-sjg@chromium.org> References: <20170331144039.14587-1-sjg@chromium.org> Message-ID: <20170331144039.14587-7-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- common/board_f.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index c7b5e0af9e..1fc73a70fe 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -380,10 +380,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; @@ -402,6 +402,7 @@ static int reserve_mmu(void) */ gd->arch.tlb_allocated = gd->arch.tlb_addr; #endif +#endif return 0; } @@ -904,8 +905,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 -- 2.12.2.564.g063fe858b8-goog