summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-11-21 22:17:08 -0800
committerYe Li <ye.li@nxp.com>2018-11-22 17:33:54 -0800
commit7843ab1b619d53c24a11f7db10b277287dcd1b11 (patch)
tree72480d6113e1731179cee11ac70fae2ddd161925 /common
parentc89c493cd8657f5d520647c3a9a61861b3f267e0 (diff)
MLK-20442 imx8qm/qxp: Fix SPL crash when authentication is failed
When booting SPL from SD/MMC, the codes load and parse container image first, if its authentication is failed, the flow continues to load and parse for FIT image and cause crash in SPL. The correct way should stop the booting if authentication is failed, avoid trying the FIT image since FIT does not support AHAB on 8QM/QXP. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 785bbd5338..ec56f11fdb 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -185,7 +185,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image,
err = part_get_info(mmc_get_blk_desc(mmc), type_part, &info);
if (err)
continue;
- if (info.sys_ind ==
+ if (info.sys_ind ==
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE) {
partition = type_part;
break;
@@ -400,13 +400,11 @@ int spl_mmc_load_image(struct spl_image_info *spl_image,
#ifdef CONFIG_PARSE_CONTAINER
err = mmc_load_image_parse_container(spl_image, mmc,
spl_mmc_get_uboot_raw_sector(mmc));
-
- if (!err)
- return err;
-#endif
+#else
err = mmc_load_image_raw_sector(spl_image, mmc,
spl_mmc_get_uboot_raw_sector(mmc));
#endif
+#endif
if (!err)
return err;
#endif