From: Detlev Zundel Date: Wed, 10 Aug 2011 21:26:09 +0200 Subject: [U-Boot] [PATCH V2] mmc: Fix mmc_send_status() In-Reply-To: (Lei Wen's message of "Wed, 10 Aug 2011 22:11:18 +0800") References: <1312961088-16794-1-git-send-email-marek.vasut@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Lei, > Hi Marek, > > On Wed, Aug 10, 2011 at 3:24 PM, Marek Vasut wrote: >> The mmc_send_status() function sets cmd.arg = 0. That's incorrect, so fix it. >> >> Signed-off-by: Marek Vasut >> --- >> ?drivers/mmc/mmc.c | ? ?3 ++- >> ?1 files changed, 2 insertions(+), 1 deletions(-) >> >> V2: Take SPI mode into account >> >> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c >> index cbd7567..00687d6 100644 >> --- a/drivers/mmc/mmc.c >> +++ b/drivers/mmc/mmc.c >> @@ -115,7 +115,8 @@ int mmc_send_status(struct mmc *mmc, int timeout) >> >> ? ? ? ?cmd.cmdidx = MMC_CMD_SEND_STATUS; >> ? ? ? ?cmd.resp_type = MMC_RSP_R1; >> - ? ? ? cmd.cmdarg = 0; >> + ? ? ? if (!mmc_host_is_spi(mmc)) >> + ? ? ? ? ? ? ? cmd.cmdarg = mmc->rca << 16; >> ? ? ? ?cmd.flags = 0; >> >> ? ? ? ?do { >> -- >> 1.7.5.4 >> > > This patch works fine on my MMP3 board. We have a formal way of saying that which as a bonus gets you into the commit-logs ;) Tested-by: Lei Wen Cheers Detlev -- I shall be telling this with a sigh / Somewhere ages and ages hence: / Two roads diverged in a wood, and I-- / I took the one less traveled by, / And that has made all the difference. -- Robert Frost -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de