[PATCH 4/5] spl: call ft_board_setup() and ft_system_setup() if enabled

Simon Glass sjg at chromium.org
Mon May 4 14:09:01 CEST 2026


Hi Francesco,

On 2026-04-28T20:24:41, Francesco Valla <francesco at valla.it> wrote:
> spl: call ft_board_setup() and ft_system_setup() if enabled
>
> If board and system FDT setups are enabled by the corresponding
> configuration options, perform them also in SPL. This aligns the
> behavior of FIT loading from SPL and U-Boot proper in this aspect,
> reducing the need for custom code in falcon boot setups.
>
> Signed-off-by: Francesco Valla <francesco at valla.it>
>
> common/spl/spl.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

> diff --git a/common/spl/spl.c b/common/spl/spl.c
> @@ -156,6 +156,22 @@ void spl_fixup_fdt(void *fdt_blob)
> +     if (IS_ENABLED(CONFIG_OF_BOARD_SETUP)) {
> +             err = ft_board_setup(fdt_blob, gd->bd);
> +             if (err) {
> +                     printf(PHASE_PROMPT "ft_board_setup err - %d\n", err);
> +                     return;
> +             }
> +     }
> +
> +     if (IS_ENABLED(CONFIG_OF_SYSTEM_SETUP)) {
> +             err = ft_system_setup(fdt_blob, gd->bd);
> +             if (err) {
> +                     printf(PHASE_PROMPT "ft_system_setup err - %d\n", err);
> +                     return;
> +             }
> +     }

CONFIG_OF_BOARD_SETUP / CONFIG_OF_SYSTEM_SETUP are not SPL-aware, so
any board that has them set today will start call ft_board_setup() /
ft_system_setup() in SPL with this patch. Can you use
CONFIG_IS_ENABLED() and add new SPL_... options for your board to
enable?

If we're aligning with image_setup_libfdt(),
CONFIG_OF_BOARD_SETUP_EXTENDED / ft_board_setup_ex() is also part of
that flow. Is leaving it out deliberate, or should it be handled here
too? A note in the commit message would help.

Regards,
Simon


More information about the U-Boot mailing list