From 130845bac11ecd542587b2d2ce2b2fe87f112f1d Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Sat, 28 Nov 2020 10:43:18 +0200 Subject: 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//lib/traps.c Default implementation is a nop stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck --- common/board_r.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'common') 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 -- cgit v1.1