summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Kconfig7
-rw-r--r--common/board_r.c3
2 files changed, 8 insertions, 2 deletions
diff --git a/common/Kconfig b/common/Kconfig
index be517b80eb5..17539079f90 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -727,6 +727,13 @@ config BOARD_EARLY_INIT_R
relocation. With this option, U-Boot calls board_early_init_r()
in the post-relocation init sequence.
+config BOARD_INIT
+ bool "Call board-specific init board_init() during init-calls"
+ default y if ARM || RISCV || SANDBOX
+ help
+ Some boards need an board_init() function called during the initcall
+ phase of startup.
+
config BOARD_POSTCLK_INIT
bool "Call board_postclk_init"
help
diff --git a/common/board_r.c b/common/board_r.c
index b90a4d9ff69..65ff5fb595c 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -649,8 +649,7 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(ADDR_MAP)
INITCALL(init_addr_map);
#endif
-#if CONFIG_IS_ENABLED(ARM) || CONFIG_IS_ENABLED(RISCV) || \
- CONFIG_IS_ENABLED(SANDBOX)
+#if CONFIG_IS_ENABLED(BOARD_INIT)
INITCALL(board_init); /* Setup chipselects */
#endif
/*