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 <mbrugger@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
#ifndef __ASM_ARM_MMU_H
#define __ASM_ARM_MMU_H
-void init_addr_map(void);
+int init_addr_map(void);
#endif
#include <addr_map.h>
#include <asm/system.h>
-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,
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
}
#ifdef CONFIG_ADDR_MAP
-void init_addr_map(void)
+int init_addr_map(void)
{
int i;
unsigned int num_cam = mfspr(SPRN_TLB1CFG) & 0xfff;
addrmap_set_entry(epn, rpn, TSIZE_TO_BYTES(tsize), i);
}
- return ;
+ return 0;
}
#endif
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 {
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)
{
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)