[U-Boot] [PATCH v2 01/11] fdtdec: make CONFIG_OF_PRIOR_STAGE available in SPL
Anup Patel
anup at brainfault.org
Mon Jul 29 08:14:16 UTC 2019
On Sun, Jul 28, 2019 at 9:27 PM Lukas Auer
<lukas.auer at aisec.fraunhofer.de> wrote:
>
> 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 at aisec.fraunhofer.de>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> Tested-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> Changes in v2: None
>
> include/fdtdec.h | 2 +-
> lib/fdtdec.c | 6 ++----
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/include/fdtdec.h b/include/fdtdec.h
> index e6c22dd5cd..635f53083b 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 3ee786b579..569ffd5987 100644
> --- a/lib/fdtdec.c
> +++ b/lib/fdtdec.c
> @@ -1533,16 +1533,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)
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
Reviewed-by: Anup Patel <anup.patel at wdc.com>
Regards,
Anup
More information about the U-Boot
mailing list