aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2015-05-21 15:57:16 -0700
committerStefano Babic <sbabic@denx.de>2015-05-26 14:26:27 +0200
commit9d3b56544137b1390b235ed0991a3b5740ceb208 (patch)
treeafe40c29dbb6be07c00d726c691100a087080549
parent6122f0d556c7d2ba54c5d61f4ef2453d993aa8eb (diff)
downloadu-boot-9d3b56544137b1390b235ed0991a3b5740ceb208.zip
u-boot-9d3b56544137b1390b235ed0991a3b5740ceb208.tar.gz
u-boot-9d3b56544137b1390b235ed0991a3b5740ceb208.tar.bz2
spl: spl_mmc: fix mmc Falcon mode regression
91199f4a5a21a7cf9dd9e7c05e295a042f8c2b7e broke mmc based Falcon mode. The block_read function returns the number of blocks read thus the error check needs to look for a return of 0 blocks read. Cc: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--common/spl/spl_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 5d688d6..c96345e 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -76,7 +76,7 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS,
(void *)CONFIG_SYS_SPL_ARGS_ADDR);
- if (err) {
+ if (err == 0) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
printf("spl: mmc block read error\n");
#endif