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

Francesco Valla francesco at valla.it
Mon May 4 19:39:11 CEST 2026


Hi Simon,

On Mon, May 04, 2026 at 06:09:01AM -0600, Simon Glass wrote:
> 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?
>

Ok, I was not sure new config options would have been accepted here.
I'll do this on the V2.

> 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.
> 

I missed ft_board_setup_ex() TBH. I'll take a look and do the
evaluation.

> Regards,
> Simon

Regards,
Francesco


More information about the U-Boot mailing list