[PATCH v2 4/5] board: nxp: imx9{4,5}_evk: Add qb save option in SPL

Simona Toaca simona.toaca at oss.nxp.com
Tue Mar 17 13:40:46 CET 2026


On Mon, Mar 16, 2026 at 01:22:55PM +0100, Marek Vasut wrote:
> On 3/16/26 9:15 AM, Simona Toaca (OSS) wrote:
> 
> [...]
> 
> > +++ b/arch/arm/mach-imx/imx9/qb.c
> > @@ -428,3 +428,12 @@ int qb(int qb_dev, int qb_bootdev, bool save)
> >   	return 0;
> >   }
> > +
> > +void spl_qb_save(void)
> > +{
> > +	int dev = spl_boot_device();
> > +
> > +	/* Save QB data on current boot device */
> > +	if (qb(dev, dev, true))
> > +		printf("QB save failed\n");
> > +}
> 
> Should be in 1/5 ?
>

I thought it would make sense that all the SPL-related changes should be in
a separate patch.

> > diff --git a/board/nxp/imx94_evk/spl.c b/board/nxp/imx94_evk/spl.c
> > index cc5b7f9ef0f..1d25795eb17 100644
> > --- a/board/nxp/imx94_evk/spl.c
> > +++ b/board/nxp/imx94_evk/spl.c
> > @@ -1,6 +1,6 @@
> >   // SPDX-License-Identifier: GPL-2.0+
> >   /*
> > - * Copyright 2025 NXP
> > + * Copyright 2025-2026 NXP
> >    */
> >   #include <hang.h>
> > @@ -14,6 +14,7 @@
> >   #include <asm/arch/sys_proto.h>
> >   #include <asm/mach-imx/boot_mode.h>
> >   #include <asm/mach-imx/ele_api.h>
> > +#include <asm/mach-imx/qb.h>
> >   DECLARE_GLOBAL_DATA_PTR;
> > @@ -44,6 +45,9 @@ void spl_board_init(void)
> >   	ret = ele_start_rng();
> >   	if (ret)
> >   		printf("Fail to start RNG: %d\n", ret);
> 
> Use CONFIG_IS_ENABLED() if this is meant to be enabled in different U-Boot
> stages.
> 

As far as I know, spl.o is only compiled if the U-Boot stage is SPL, so
there can't be any other stage for this file.

> > +	if (IS_ENABLED(CONFIG_SPL_IMX_QB))
> > +		spl_qb_save();

[ ... ]



More information about the U-Boot mailing list