diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 719769c..fb6dfe3 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -27,6 +27,15 @@ config IMX8MP config SYS_SOC default "imx8m" +config SECONDARY_BOOT_SECTOR_OFFSET + hex "SD/MMC sector offset used for ROM secondary boot" + default 0x0 + depends on IMX8MQ || IMX8MM + help + Set the sector offset to non-zero value in SPL used for + secondary boot image. This value should be same as the + firstSectorNumber in secondary image table. + config SECURE_STICKY_BITS_LOCKUP bool "Enable workaround to fix sticky bits lock up issue" depends on IMX8MQ && IMX_HAB diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index b6dfe0a..0f0c1b2 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -13,7 +13,7 @@ #define CONFIG_SPL_MAX_SIZE (148 * 1024) #define CONFIG_SYS_MONITOR_LEN SZ_512K #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (0x300 + CONFIG_SECONDARY_BOOT_SECTOR_OFFSET) #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #define CONFIG_SYS_UBOOT_BASE \ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) diff --git a/include/configs/imx8mm_val.h b/include/configs/imx8mm_val.h index 8c1b4e4b..3cbd03a 100644 --- a/include/configs/imx8mm_val.h +++ b/include/configs/imx8mm_val.h @@ -14,7 +14,7 @@ #define CONFIG_SPL_MAX_SIZE (148 * 1024) #define CONFIG_SYS_MONITOR_LEN SZ_512K #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (0x300 + CONFIG_SECONDARY_BOOT_SECTOR_OFFSET) #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #define CONFIG_SYS_UBOOT_BASE \ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index c84a698..1769c8c 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -13,7 +13,7 @@ #define CONFIG_SPL_MAX_SIZE (148 * 1024) #define CONFIG_SYS_MONITOR_LEN (512 * 1024) #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (0x300 + CONFIG_SECONDARY_BOOT_SECTOR_OFFSET) #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #ifdef CONFIG_SPL_BUILD diff --git a/include/configs/imx8mq_val.h b/include/configs/imx8mq_val.h index ee40b15..dbaa1f8 100644 --- a/include/configs/imx8mq_val.h +++ b/include/configs/imx8mq_val.h @@ -14,7 +14,7 @@ #define CONFIG_SPL_MAX_SIZE (148 * 1024) #define CONFIG_SYS_MONITOR_LEN (512 * 1024) #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (0x300 + CONFIG_SECONDARY_BOOT_SECTOR_OFFSET) #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #ifdef CONFIG_SPL_BUILD