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:
Ovidiu Panait
2020-11-28 10:43:18 +02:00
committed by Tom Rini
parent c65abc70fb
commit 130845bac1
6 changed files with 47 additions and 17 deletions

View File

@@ -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
View 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;
}