summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2020-05-27 03:33:38 -0700
committerYe Li <ye.li@nxp.com>2022-04-06 18:03:56 +0800
commit8b3ea2ad3e53f6d4d1c1b2a0f27342c54914ec9c (patch)
tree8613a0e6dafc86f9873007f44d91a0f133359681 /common
parenta27ec0cf1c1161f3a8c732fcbb1cb3c0ba9d3bcf (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 7caa7682a8e3ba765c513127fa2a15e335617a65) (cherry picked from commit fc88ace3e14761984b5c24c831dfdfc1840ec376) (cherry picked from commit a9c09cc034b37b7c82d0db5df0e82a2a56aca145)
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 163e3c6f7d..1cda447fe4 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -497,7 +497,11 @@ int spl_mmc_load_image(struct spl_image_info *spl_image,
0,
#endif
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
+ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+#ifdef CONFIG_SECONDARY_BOOT_SECTOR_OFFSET
+ + CONFIG_SECONDARY_BOOT_SECTOR_OFFSET
+#endif
+ );
#else
0);
#endif