]> git.baikalelectronics.ru Git - uboot.git/commitdiff
spl: mmc: Skip RAW mode ARGS sectors if not defined
authorYork Sun <york.sun@nxp.com>
Tue, 26 Jun 2018 16:44:39 +0000 (09:44 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 20 Jul 2018 12:55:14 +0000 (08:55 -0400)
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.sun@nxp.com>
common/spl/spl_mmc.c

index db5be3dfa5f67bc9d652a549e9c1bc632b1c828e..0b2f0595702e1c3f567ae2db920413ef1ee4effd 100644 (file)
@@ -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);