Commit af9e6ad4ab29ffed5d4e08a5ccf75f3f28a83ab7
Committed by
Tom Rini
1 parent
80364a42c1
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
board_f: Add new function to allow runtime DTB selection
Runtime U-boot dtb selection is generally a two step process. First step is to simply use an initial generic dtb. The second step is to select the dtb and perhaps execute additional code ones U-boot knows what board it is running on. Embedded_dtb_select handles the second step by allowing board specific code to run and perform what ever necessary configuration that is needed. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 3 changed files with 16 additions and 0 deletions Side-by-side Diff
common/Kconfig
... | ... | @@ -437,6 +437,15 @@ |
437 | 437 | |
438 | 438 | endmenu |
439 | 439 | |
440 | +config DTB_RESELECT | |
441 | + bool "Support swapping dtbs at a later point in boot" | |
442 | + depends on FIT_EMBED | |
443 | + help | |
444 | + It is possible during initial boot you may need to use a generic | |
445 | + dtb until you can fully determine the board your running on. This | |
446 | + config allows boards to implement a function at a later point | |
447 | + during boot to switch to the "correct" dtb. | |
448 | + | |
440 | 449 | config FIT_EMBED |
441 | 450 | bool "Support a FIT image embedded in the U-boot image" |
442 | 451 | help |
common/board_f.c
... | ... | @@ -809,6 +809,9 @@ |
809 | 809 | #if defined(CONFIG_DISPLAY_CPUINFO) |
810 | 810 | print_cpuinfo, /* display cpu info (and speed) */ |
811 | 811 | #endif |
812 | +#if defined(CONFIG_DTB_RESELECT) | |
813 | + embedded_dtb_select, | |
814 | +#endif | |
812 | 815 | #if defined(CONFIG_DISPLAY_BOARDINFO) |
813 | 816 | show_board_info, |
814 | 817 | #endif |
include/common.h