summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2020-05-27 03:33:38 -0700
committerYe Li <ye.li@nxp.com>2020-05-28 06:46:12 -0700
commit1f3aebcd52850235a29065c6a1d364907c5f9c80 (patch)
tree994dc8213980db204aa8c3ba1a5965f4a270c007 /include
parentcb72301d6598af97da392bfd590b369c0a5837d5 (diff)
MLK-23820 imx8mq/mm: Add config to support secondary image boot
When primary image boot is failed, ROM will select secondary image to boot if SIT (secondary image table) exists. However, SPL does not know the secondary boot, still loads the FIT from the position of primary image. Introduce a config to add secondary image sector offset to FIT sector offset. This config is default set to 0. Secondary image should configure it to the same value of firstSectorNumber field in SIT. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 665972355dfe8156b3aa7bce52845722b15d9922)
Diffstat (limited to 'include')
-rw-r--r--include/configs/imx8mm_evk.h2
-rw-r--r--include/configs/imx8mm_val.h2
-rw-r--r--include/configs/imx8mq_evk.h2
-rw-r--r--include/configs/imx8mq_val.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index b6dfe0a185..0f0c1b2f11 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 8c1b4e4bdf..3cbd03a4ed 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 c84a698b69..1769c8c790 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 ee40b15545..dbaa1f850d 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