diff options
author | Ovidiu Panait | 2020-11-28 10:43:18 +0200 |
---|---|---|
committer | Tom Rini | 2021-01-15 14:36:12 -0500 |
commit | 130845bac11ecd542587b2d2ce2b2fe87f112f1d (patch) | |
tree | b8b58b35b13065cd391428b5608316b03d05b303 /arch/mips | |
parent | c65abc70fb7212301b70c6ab05ba2aa22c31c69e (diff) |
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 'arch/mips')
-rw-r--r-- | arch/mips/lib/traps.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index df8b63f383b..540ea48e32f 100644 --- a/arch/mips/lib/traps.c +++ b/arch/mips/lib/traps.c @@ -99,7 +99,7 @@ static void set_handler(unsigned long offset, void *addr, unsigned long size) flush_cache(ebase + offset, size); } -void trap_init(ulong reloc_addr) +static void trap_init(ulong reloc_addr) { unsigned long ebase = gd->irq_sp; @@ -131,3 +131,10 @@ void trap_restore(void) clear_c0_status(ST0_BEV); execution_hazard_barrier(); } + +int arch_initr_trap(void) +{ + trap_init(CONFIG_SYS_SDRAM_BASE); + + return 0; +} |