From 3453d482d52a2dd44e4020f15a42fe67881d8fc8 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 11 May 2023 12:02:54 +0200 Subject: ARM: drop cache function initialization We need a call to arm_set_cache_functions() before the cache maintenance functions can be used. Drop this call and just pick the correct functions on the first call. Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum --- arch/arm/cpu/start.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/arm/cpu/start.c') diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c index 62b2054dd6..4841ee6043 100644 --- a/arch/arm/cpu/start.c +++ b/arch/arm/cpu/start.c @@ -170,9 +170,7 @@ __noreturn __no_sanitize_address void barebox_non_pbl_start(unsigned long membas if (IS_ENABLED(CONFIG_MMU_EARLY)) { unsigned long ttb = arm_mem_ttb(endmem); - if (IS_ENABLED(CONFIG_PBL_IMAGE)) { - arm_set_cache_functions(); - } else { + if (!IS_ENABLED(CONFIG_PBL_IMAGE)) { pr_debug("enabling MMU, ttb @ 0x%08lx\n", ttb); arm_early_mmu_cache_invalidate(); mmu_early_enable(membase, memsize - OPTEE_SIZE, ttb); -- cgit v1.2.3