[PATCH v2] config: imx: Define CFG_SYS_UBOOT_BASE for Phytec's imx8mm SoM QSPI boot

Lukasz Majewski lukma at denx.de
Tue Aug 20 16:59:44 CEST 2024


The image offset when booting from SPI-NOR (QSPI, FSPI driver) is
different than one for SD card / eMMC as extra space (0x1000) is consumed
by FSPI configuration header (CONFIG_FSPI_CONF_HEADER).

Signed-off-by: Lukasz Majewski <lukma at denx.de>
---
Changes for v2:
- Avoid line breaks with defines
---
 include/configs/phycore_imx8mm.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index 0910ae2d87..a445d842ac 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -11,8 +11,15 @@
 #include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
+#define UBOOT_ITB_OFFSET			0x57C00
+#define FSPI_CONF_BLOCK_SIZE		0x1000
+#define UBOOT_ITB_OFFSET_FSPI (UBOOT_ITB_OFFSET + FSPI_CONF_BLOCK_SIZE)
+#ifdef CONFIG_FSPI_CONF_HEADER
+#define CFG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + UBOOT_ITB_OFFSET_FSPI)
+#else
 #define CFG_SYS_UBOOT_BASE \
 		(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
+#endif
 
 #ifdef CONFIG_SPL_BUILD
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
-- 
2.39.2



More information about the U-Boot mailing list