summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2020-06-09 16:44:13 +0800
committerJi Luo <ji.luo@nxp.com>2020-06-10 10:03:48 +0800
commit5648323ae3680cd9990c9243162aa2941a1e8d66 (patch)
tree60f8bf34e233891629b110d959f78d1574973ef3 /common
parent855618665e3cb2ff18fb68a79bf382b8d80afe18 (diff)
MA-17342 Fix dual bootloader fail on imx8m
Dual bootloader is also enabled on imx8m, return 'part' as 0 in the default spl_mmc_emmc_boot_partition() implementation. Test: boots dual bootloader on imx8mm_evk. Signed-off-by: Ji Luo <ji.luo@nxp.com> Change-Id: Id7753f72b5eedc0a5e8011c8950aaced3fece9a9
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 586c4e2490..2efbcfaeb3 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -339,6 +339,12 @@ int __weak spl_mmc_emmc_boot_partition(struct mmc *mmc)
{
int part = 0;
+#ifdef CONFIG_DUAL_BOOTLOADER
+ /* Bootloader is stored in eMMC user partition for
+ * dual bootloader.
+ */
+ part = 0;
+#else
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
part = CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION;
#else
@@ -352,6 +358,7 @@ int __weak spl_mmc_emmc_boot_partition(struct mmc *mmc)
if (part == 7)
part = 0;
#endif
+#endif
return part;
}