diff --git a/common/Kconfig b/common/Kconfig index a5e3a6b418a37439a898af6c6956eb15ac1602e7..086b6769376b15661df9afb4f747028d1bee0a0a 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -437,6 +437,15 @@ config SYS_STDIO_DEREGISTER endmenu +config DTB_RESELECT + bool "Support swapping dtbs at a later point in boot" + depends on FIT_EMBED + help + It is possible during initial boot you may need to use a generic + dtb until you can fully determine the board your running on. This + config allows boards to implement a function at a later point + during boot to switch to the "correct" dtb. + config FIT_EMBED bool "Support a FIT image embedded in the U-boot image" help diff --git a/common/board_f.c b/common/board_f.c index 2cdd12a503ae57b40cf635247b12375caa89f7e5..ffa84e356614b61c198145909769544db263e25b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -809,6 +809,9 @@ static const init_fnc_t init_sequence_f[] = { #if defined(CONFIG_DISPLAY_CPUINFO) print_cpuinfo, /* display cpu info (and speed) */ #endif +#if defined(CONFIG_DTB_RESELECT) + embedded_dtb_select, +#endif #if defined(CONFIG_DISPLAY_BOARDINFO) show_board_info, #endif diff --git a/include/common.h b/include/common.h index 1a98512ab618db28bbe67bac1c2794888203501d..751665f8a437e67a0921d9cb2ed8f17444bd6579 100644 --- a/include/common.h +++ b/include/common.h @@ -359,6 +359,10 @@ int get_env_id (void); void pci_init (void); void pci_init_board(void); +#if defined(CONFIG_DTB_RESELECT) +int embedded_dtb_select(void); +#endif + int misc_init_f (void); int misc_init_r (void);