diff mbox series

[U-Boot] spl: mmc: Skip RAW mode ARGS sectors if not defined

Message ID 1530031479-19641-1-git-send-email-york.sun@nxp.com
State Accepted
Commit 7267fbf734486e585243cf3142b4159b296bdd16
Delegated to: Tom Rini
Headers show
Series [U-Boot] spl: mmc: Skip RAW mode ARGS sectors if not defined | expand

Commit Message

York Sun June 26, 2018, 4:44 p.m. UTC
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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Tom Rini July 20, 2018, 10:34 p.m. UTC | #1
On Tue, Jun 26, 2018 at 09:44:39AM -0700, York Sun wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

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);