diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2020-11-28 10:43:18 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-15 14:36:12 -0500 |
commit | 130845bac11ecd542587b2d2ce2b2fe87f112f1d (patch) | |
tree | b8b58b35b13065cd391428b5608316b03d05b303 /common/board_r.c | |
parent | c65abc70fb7212301b70c6ab05ba2aa22c31c69e (diff) | |
download | u-boot-130845bac11ecd542587b2d2ce2b2fe87f112f1d.zip u-boot-130845bac11ecd542587b2d2ce2b2fe87f112f1d.tar.gz u-boot-130845bac11ecd542587b2d2ce2b2fe87f112f1d.tar.bz2 |
common: board_r: Drop arch-specific ifdefs around initr_trap
In order to remove the arch-specific ifdefs around initr_trap, introduce
arch_initr_trap weak initcall. Implementations for ppc/m68k/mips have
been moved to arch/<arch>/lib/traps.c
Default implementation is a nop stub.
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/common/board_r.c b/common/board_r.c index c083eb0..9fa4d4b 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -182,20 +182,10 @@ static int initr_reloc_global_data(void) return 0; } -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) -static int initr_trap(void) +__weak int arch_initr_trap(void) { - /* - * Setup trap handlers - */ -#if defined(CONFIG_PPC) - trap_init(gd->relocaddr); -#else - trap_init(CONFIG_SYS_SDRAM_BASE); -#endif return 0; } -#endif #ifdef CONFIG_ADDR_MAP static int initr_addr_map(void) @@ -669,9 +659,7 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_NEEDS_MANUAL_RELOC initr_manual_reloc_cmdtable, #endif -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) - initr_trap, -#endif + arch_initr_trap, #ifdef CONFIG_ADDR_MAP initr_addr_map, #endif |