diff options
author | Simon Glass <sjg@chromium.org> | 2021-12-16 20:59:28 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-12-23 10:24:39 -0500 |
commit | 931511d0897ea1f63102b134733e3a71d3545f64 (patch) | |
tree | d077792e10e7b9db8f3a6cd0728a3b86fa769eae /lib | |
parent | 66cd511f133a2f0e5f38d3c92317c851e42b01c0 (diff) | |
download | u-boot-931511d0897ea1f63102b134733e3a71d3545f64.zip u-boot-931511d0897ea1f63102b134733e3a71d3545f64.tar.gz u-boot-931511d0897ea1f63102b134733e3a71d3545f64.tar.bz2 |
fdt: Use if() for fdtcontroladdr check
Change this to use if() instead of #if
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fdtdec.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 299a2c3..659aeff 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1634,12 +1634,11 @@ int fdtdec_setup(void) if (ret) return ret; # endif -# ifndef CONFIG_SPL_BUILD - /* Allow the early environment to override the fdt address */ - gd->fdt_blob = map_sysmem - (env_get_ulong("fdtcontroladdr", 16, + if (!IS_ENABLED(CONFIG_SPL_BUILD)) { + /* Allow the early environment to override the fdt address */ + gd->fdt_blob = map_sysmem(env_get_ulong("fdtcontroladdr", 16, (unsigned long)map_to_sysmem(gd->fdt_blob)), 0); -# endif + } if (CONFIG_IS_ENABLED(MULTI_DTB_FIT)) setup_multi_dtb_fit(); |