From: Lukas Auer Date: Wed, 21 Aug 2019 19:14:40 +0000 (+0200) Subject: fdtdec: make CONFIG_OF_PRIOR_STAGE available in SPL X-Git-Tag: v2019.10-rc3~2^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4f603f7233230879d91e9115b8f2730ec9be499;p=platform%2Fkernel%2Fu-boot.git 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 Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Anup Patel --- diff --git a/include/fdtdec.h b/include/fdtdec.h index e6c22dd..635f530 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -54,7 +54,7 @@ struct bd_info; #define SPL_BUILD 0 #endif -#if CONFIG_IS_ENABLED(OF_PRIOR_STAGE) +#ifdef CONFIG_OF_PRIOR_STAGE extern phys_addr_t prior_stage_fdt_address; #endif diff --git a/lib/fdtdec.c b/lib/fdtdec.c index ef5e548..74525c8 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)