Commit af9e6ad4ab29ffed5d4e08a5ccf75f3f28a83ab7

Authored by Cooper Jr., Franklin
Committed by Tom Rini
1 parent 80364a42c1

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

... ... @@ -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
... ... @@ -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
... ... @@ -359,6 +359,10 @@
359 359 void pci_init (void);
360 360 void pci_init_board(void);
361 361  
  362 +#if defined(CONFIG_DTB_RESELECT)
  363 +int embedded_dtb_select(void);
  364 +#endif
  365 +
362 366 int misc_init_f (void);
363 367 int misc_init_r (void);
364 368