[PATCH v1 3/3] board: toradex: aquila-imx95: add SPL quick boot autosave support

Stefan Eichenberger <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <20260807114200.271420-4-eichest__46466.1867286608$1786112314$gmane$org@gmail.com>
From: Stefan Eichenberger <[email protected]>

Add support for the QuickBoot save feature in the SPL for Aquila iMX95
modules to speed up boot time by skipping DDR training if a valid
QuickBoot save is found. When CONFIG_SPL_IMX_QB is enabled, the settings
will be stored automatically from the SPL. Otherwise, the command 'qb save
mmc 0:1' must be used.

Signed-off-by: Stefan Eichenberger <[email protected]>
---
 board/toradex/aquila-imx95/spl.c | 4 ++++
 configs/aquila-imx95_defconfig   | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/board/toradex/aquila-imx95/spl.c b/board/toradex/aquila-imx95/spl.c
index 9f501c11c1d..93e76be6145 100644
--- a/board/toradex/aquila-imx95/spl.c
+++ b/board/toradex/aquila-imx95/spl.c
@@ -6,6 +6,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>
 #include <asm/sections.h>
 #include <asm/global_data.h>
 #include <clk.h>
@@ -40,6 +41,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))
+		spl_imx_qb_save();
 }
 
 void board_init_f(ulong dummy)
diff --git a/configs/aquila-imx95_defconfig b/configs/aquila-imx95_defconfig
index bb3d475ef4d..ee66cebfa4f 100644
--- a/configs/aquila-imx95_defconfig
+++ b/configs/aquila-imx95_defconfig
@@ -26,6 +26,7 @@ CONFIG_SYS_LOAD_ADDR=0x90400000
 CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
 CONFIG_SPL=y
 CONFIG_SPL_RECOVER_DATA_SECTION=y
+CONFIG_SPL_IMX_QB=y
 CONFIG_PCI=y
 CONFIG_SYS_MEMTEST_START=0x90000000
 CONFIG_SYS_MEMTEST_END=0xA0000000
@@ -59,6 +60,7 @@ CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040
 CONFIG_SPL_I2C=y
 CONFIG_SPL_DM_MAILBOX=y
+CONFIG_SPL_MMC_WRITE=y
 CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_THERMAL=y
 CONFIG_SPL_WATCHDOG=y
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.