[PATCH v2 4/5] board: nxp: imx9{4,5}_evk: Add qb save option in SPL
Marek Vasut
marex at nabladev.com
Mon Mar 16 13:22:55 CET 2026
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 ?
> 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.
> + if (IS_ENABLED(CONFIG_SPL_IMX_QB))
> + spl_qb_save();
> }
>
> /* SCMI support by default */
> diff --git a/board/nxp/imx95_evk/spl.c b/board/nxp/imx95_evk/spl.c
> index 761a1a4a0f6..35e4458f2b7 100644
> --- a/board/nxp/imx95_evk/spl.c
> +++ b/board/nxp/imx95_evk/spl.c
> @@ -1,6 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0+
> /*
> - * Copyright 2025 NXP
> + * Copyright 2025-2026 NXP
> */
>
> #include <hang.h>
> @@ -13,6 +13,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;
>
> @@ -41,6 +42,9 @@ void spl_board_init(void)
> ret = ele_start_rng();
> if (ret)
> printf("Fail to start RNG: %d\n", ret);
> +
> + if (IS_ENABLED(CONFIG_SPL_IMX_QB))
CONFIG_IS_ENABLED() ?
> + spl_qb_save();
> }
>
> void board_init_f(ulong dummy)
More information about the U-Boot
mailing list