aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2018-06-26 09:44:39 -0700
committerTom Rini <trini@konsulko.com>2018-07-20 08:55:14 -0400
commit7267fbf734486e585243cf3142b4159b296bdd16 (patch)
treec9511dfe54e63118d22faf3aa1837a73649f763a
parent992c1db45591b891935a6da5c3f14d8af5def05b (diff)
downloadu-boot-7267fbf734486e585243cf3142b4159b296bdd16.zip
u-boot-7267fbf734486e585243cf3142b4159b296bdd16.tar.gz
u-boot-7267fbf734486e585243cf3142b4159b296bdd16.tar.bz2
spl: mmc: Skip RAW mode ARGS sectors if not defined
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>
-rw-r--r--common/spl/spl_mmc.c5
1 files changed, 4 insertions, 1 deletions
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);