summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>2019-08-21 22:14:40 +0300
committerAndes <uboot@andestech.com>2019-08-26 11:07:42 +0300
commitc4f603f7233230879d91e9115b8f2730ec9be499 (patch)
tree3583e85d484f1f1922f3f0a7d6c05d6fb929df13 /lib
parent50b4b80f597b9f59b98adbdbad691b1027bd501a (diff)
downloadu-boot-c4f603f7233230879d91e9115b8f2730ec9be499.tar.xz
fdtdec: make CONFIG_OF_PRIOR_STAGE available in SPL
The current preprocessor logic prevents CONFIG_OF_PRIOR_STAGE from being used in U-Boot SPL. Change the logic to also make it available in U-Boot SPL. Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/fdtdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index ef5e54875c..74525c84e7 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1535,16 +1535,14 @@ int fdtdec_setup(void)
puts("Failed to read control FDT\n");
return -1;
}
+# elif defined(CONFIG_OF_PRIOR_STAGE)
+ gd->fdt_blob = (void *)prior_stage_fdt_address;
# 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 = map_sysmem
(env_get_ulong("fdtcontroladdr", 16,
(unsigned long)map_to_sysmem(gd->fdt_blob)), 0);
-# endif
# endif
# if CONFIG_IS_ENABLED(MULTI_DTB_FIT)