summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fdtdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index fc92082b0bd..1b0c430945a 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1324,8 +1324,12 @@ int fdtdec_setup(void)
# endif
# ifndef CONFIG_SPL_BUILD
/* Allow the early environment to override the fdt address */
+# if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
+ gd->fdt_blob = (void *)prior_stage_fdt_address;
+# else
gd->fdt_blob = (void *)env_get_ulong("fdtcontroladdr", 16,
(uintptr_t)gd->fdt_blob);
+# endif
# endif
# if CONFIG_IS_ENABLED(MULTI_DTB_FIT)