RAW mode ARGS sector doesn't have to be used for all falcon boot. Skip
loading ARGS sectors if not defined.

Signed-off-by: York Sun <york....@nxp.com>
---
 common/spl/spl_mmc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index db5be3d..0b2f059 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -191,9 +191,11 @@ static int mmc_load_image_raw_partition(struct 
spl_image_info *spl_image,
 static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
                                 struct mmc *mmc)
 {
-       unsigned long count;
        int ret;
 
+#if defined(CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR)
+       unsigned long count;
+
        count = blk_dread(mmc_get_blk_desc(mmc),
                CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
                CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS,
@@ -204,6 +206,7 @@ static int mmc_load_image_raw_os(struct spl_image_info 
*spl_image,
 #endif
                return -1;
        }
+#endif /* CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR */
 
        ret = mmc_load_image_raw_sector(spl_image, mmc,
                CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR);
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to