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>
This commit is contained in:
@@ -40,6 +40,7 @@ obj-y += interrupts.o
|
||||
obj-$(CONFIG_CMD_KGDB) += kgdb.o
|
||||
obj-y += stack.o
|
||||
obj-y += time.o
|
||||
obj-y += traps.o
|
||||
endif # not minimal
|
||||
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
|
||||
19
arch/powerpc/lib/traps.c
Normal file
19
arch/powerpc/lib/traps.c
Normal file
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2003
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
void trap_init(unsigned long reloc_addr);
|
||||
|
||||
int arch_initr_trap(void)
|
||||
{
|
||||
trap_init(gd->relocaddr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user