mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-30 16:13:27 +08:00
fdt: Correct condition for bloblist existing
On some boards, the bloblist is created in SPL once SDRAM is ready. It
cannot be accessed until that point, so is not available early in SPL.
Add a condition to avoid a hang in this case.
This fixes a hang in chromebook_coral
Fixes: 70fe238594
("fdt: Allow the devicetree to come from a bloblist")
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Raymond Mao <raymond.mao@linaro.org>
This commit is contained in:
parent
cbf3d274cf
commit
cafde93ec0
12
lib/fdtdec.c
12
lib/fdtdec.c
@ -1668,8 +1668,16 @@ int fdtdec_setup(void)
|
||||
{
|
||||
int ret = -ENOENT;
|
||||
|
||||
/* If allowing a bloblist, check that first */
|
||||
if (CONFIG_IS_ENABLED(BLOBLIST)) {
|
||||
/*
|
||||
* If allowing a bloblist, check that first. There was discussion about
|
||||
* adding an OF_BLOBLIST Kconfig, but this was rejected.
|
||||
*
|
||||
* The necessary test is whether the previous phase passed a bloblist,
|
||||
* not whether this phase creates one.
|
||||
*/
|
||||
if (CONFIG_IS_ENABLED(BLOBLIST) &&
|
||||
(spl_prev_phase() != PHASE_TPL ||
|
||||
!IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
|
||||
ret = bloblist_maybe_init();
|
||||
if (!ret) {
|
||||
gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user