Skip to content

Commit

Permalink
fdt: get FDT from bloblist
Browse files Browse the repository at this point in the history
Get device tree from a bloblist if it exists.
If not, fallback to traditional way.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
  • Loading branch information
raymo200915 committed Jan 15, 2024
1 parent 2e656c8 commit 391a45e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/fdtdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,24 +1685,24 @@ int fdtdec_setup(void)
}
}

/* Otherwise, the devicetree is typically appended to U-Boot */
if (ret) {
/* Otherwise, the devicetree is typically appended to U-Boot */
if (IS_ENABLED(CONFIG_OF_SEPARATE)) {
gd->fdt_blob = fdt_find_separate();
gd->fdt_src = FDTSRC_SEPARATE;
} else { /* embed dtb in ELF file for testing / development */
gd->fdt_blob = dtb_dt_embedded();
gd->fdt_src = FDTSRC_EMBED;
}
}

/* Allow the board to override the fdt address. */
if (IS_ENABLED(CONFIG_OF_BOARD)) {
gd->fdt_blob = board_fdt_blob_setup(&ret);
if (!ret)
gd->fdt_src = FDTSRC_BOARD;
else if (ret != -EEXIST)
return ret;
/* Allow the board to override the fdt address. */
if (IS_ENABLED(CONFIG_OF_BOARD)) {
gd->fdt_blob = board_fdt_blob_setup(&ret);
if (!ret)
gd->fdt_src = FDTSRC_BOARD;
else if (ret != -EEXIST)
return ret;
}
}

/* Allow the early environment to override the fdt address */
Expand Down

0 comments on commit 391a45e

Please sign in to comment.