mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-04 02:32:32 +00:00
rockchip: spl-boot-order: do not attempt to access fdt if OF_PLATDATA
gd->fdt_blob is null if using OF_PLATDATA in SPL, which causes a hang
after f0921f5098
("fdt: Sync up to the latest libfdt").
We use the same test that is used in spl_common_init on whether to call
fdtdec_setup to unconditionally avoid linking in the fdt-using code
when not necessary and thus reduce SPL size.
Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
fffdf7290c
commit
e68a843601
1 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,12 @@ __weak const char *board_spl_was_booted_from(void)
|
||||||
|
|
||||||
void board_boot_order(u32 *spl_boot_list)
|
void board_boot_order(u32 *spl_boot_list)
|
||||||
{
|
{
|
||||||
|
/* In case of no fdt (or only platdata), use spl_boot_device() */
|
||||||
|
if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) {
|
||||||
|
spl_boot_list[0] = spl_boot_device();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const void *blob = gd->fdt_blob;
|
const void *blob = gd->fdt_blob;
|
||||||
int chosen_node = fdt_path_offset(blob, "/chosen");
|
int chosen_node = fdt_path_offset(blob, "/chosen");
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue