From: Ovidiu Panait Date: Sat, 1 Jan 2022 17:13:28 +0000 (+0200) Subject: common: board_r: drop initr_addr_map wrapper X-Git-Tag: v2025.01-rc5-pxa1908~1577^2~7 X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=1b212bb9f4bf55f58ed230a444e51204f1fa8b02;p=u-boot.git common: board_r: drop initr_addr_map wrapper Add a return value to init_addr_map and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Reviewed-by: Matthias Brugger Reviewed-by: Simon Glass Signed-off-by: Ovidiu Panait --- diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index 9ac16f599e..8449720fad 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h @@ -3,6 +3,6 @@ #ifndef __ASM_ARM_MMU_H #define __ASM_ARM_MMU_H -void init_addr_map(void); +int init_addr_map(void); #endif diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c index 9803499985..183650a90a 100644 --- a/arch/arm/mach-bcm283x/init.c +++ b/arch/arm/mach-bcm283x/init.c @@ -152,7 +152,7 @@ int mach_cpu_init(void) #include #include -void init_addr_map(void) +int init_addr_map(void) { mmu_set_region_dcache_behaviour_phys(BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT, BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS, @@ -165,6 +165,8 @@ void init_addr_map(void) addrmap_set_entry(BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT, BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS, BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE, 1); + + return 0; } #endif diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index 973b6fbe4b..aa9b59d487 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -219,7 +219,7 @@ int find_tlb_idx(void *addr, u8 tlbsel) } #ifdef CONFIG_ADDR_MAP -void init_addr_map(void) +int init_addr_map(void) { int i; unsigned int num_cam = mfspr(SPRN_TLB1CFG) & 0xfff; @@ -235,7 +235,7 @@ void init_addr_map(void) addrmap_set_entry(epn, rpn, TSIZE_TO_BYTES(tsize), i); } - return ; + return 0; } #endif diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index 353dc4e874..cb5b26cd77 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h @@ -138,7 +138,7 @@ extern void _tlbie(unsigned long va); /* invalidate a TLB entry */ extern void _tlbia(void); /* invalidate all TLB entries */ #ifdef CONFIG_ADDR_MAP -extern void init_addr_map(void); +extern int init_addr_map(void); #endif typedef enum { diff --git a/common/board_r.c b/common/board_r.c index f12e2458ec..de6a20b0b2 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -186,15 +186,6 @@ __weak int arch_initr_trap(void) return 0; } -#ifdef CONFIG_ADDR_MAP -static int initr_addr_map(void) -{ - init_addr_map(); - - return 0; -} -#endif - #if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) static int initr_unlock_ram_in_cache(void) { @@ -646,7 +637,7 @@ static init_fnc_t init_sequence_r[] = { initr_dm, #endif #ifdef CONFIG_ADDR_MAP - initr_addr_map, + init_addr_map, #endif #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \ defined(CONFIG_SANDBOX)