aboutsummaryrefslogtreecommitdiff
path: root/lib/fdtdec.c
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2021-10-26 09:12:33 +0300
committerTom Rini <trini@konsulko.com>2021-10-27 16:38:26 -0400
commite7fb789612e39653f9f20ad08ad40896c7f61742 (patch)
tree2a16e7d6ebd67449b5c0fca8f7841d879564889f /lib/fdtdec.c
parent670d657dfb6ede2957043dd0ac868297ac093857 (diff)
downloadu-boot-e7fb789612e39653f9f20ad08ad40896c7f61742.zip
u-boot-e7fb789612e39653f9f20ad08ad40896c7f61742.tar.gz
u-boot-e7fb789612e39653f9f20ad08ad40896c7f61742.tar.bz2
sandbox: Remove OF_HOSTFILEWIP/27Oct2021
OF_HOSTFILE is used on sandbox configs only. Although it's pretty unique and not causing any confusions, we are better of having simpler config options for the DTB. So let's replace that with the existing OF_BOARD. U-Boot would then have only three config options for the DTB origin. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r--lib/fdtdec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 959b337..7681f27 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1213,9 +1213,11 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
* For CONFIG_OF_SEPARATE, the board may optionally implement this to
* provide and/or fixup the fdt.
*/
-__weak void *board_fdt_blob_setup(void)
+__weak void *board_fdt_blob_setup(int *err)
{
void *fdt_blob = NULL;
+
+ *err = 0;
#ifdef CONFIG_SPL_BUILD
/* FDT is at end of BSS unless it is in a different memory region */
if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS))
@@ -1226,6 +1228,7 @@ __weak void *board_fdt_blob_setup(void)
/* FDT is at end of image */
fdt_blob = (ulong *)&_end;
#endif
+
return fdt_blob;
}
#endif
@@ -1607,12 +1610,9 @@ int fdtdec_setup(void)
# endif
# elif defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE)
/* Allow the board to override the fdt address. */
- gd->fdt_blob = board_fdt_blob_setup();
-# elif defined(CONFIG_OF_HOSTFILE)
- if (sandbox_read_fdt_from_file()) {
- puts("Failed to read control FDT\n");
- return -1;
- }
+ gd->fdt_blob = board_fdt_blob_setup(&ret);
+ if (ret)
+ return ret;
# endif
# ifndef CONFIG_SPL_BUILD
/* Allow the early environment to override the fdt address */