From: Kever Yang Date: Sat, 20 Jan 2018 10:00:26 +0000 (+0800) Subject: spl: use different BOARD_INIT MACRO for spl and tpl X-Git-Tag: v2018.03-rc1~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=af2f44267;p=u-boot spl: use different BOARD_INIT MACRO for spl and tpl SPL and TPL may not always need spl_board_init() at the same time. Signed-off-by: Kever Yang Reviewed-by: Philipp Tomsich --- diff --git a/common/spl/Kconfig b/common/spl/Kconfig index d686b1ecbd..e1b91f5d89 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -757,6 +757,13 @@ config TPL if TPL +config TPL_BOARD_INIT + bool "Call board-specific initialization in TPL" + help + If this option is enabled, U-Boot will call the function + spl_board_init() from board_init_r(). This function should be + provided by the board. + config TPL_LDSCRIPT string "Linker script for the TPL stage" depends on TPL diff --git a/common/spl/spl.c b/common/spl/spl.c index 76c1963611..1566acdbc3 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -407,7 +407,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) timer_init(); #endif -#ifdef CONFIG_SPL_BOARD_INIT +#if CONFIG_IS_ENABLED(BOARD_INIT) spl_board_init(); #endif