From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 26 May 2015 14:27:22 +0200 Subject: [U-Boot] [PATCH] spl: spl_mmc: fix mmc Falcon mode regression In-Reply-To: <1432249036-2785-1-git-send-email-tharvey@gateworks.com> References: <1432249036-2785-1-git-send-email-tharvey@gateworks.com> Message-ID: <556466AA.8090508@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 22/05/2015 00:57, Tim Harvey wrote: > 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 > Signed-off-by: Tim Harvey > --- > common/spl/spl_mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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 > Applied to u-boot-imx, thanks! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================