[U-Boot] [PATCH V2] mmc: Fix mmc_send_status()
Lei Wen
adrian.wenl at gmail.com
Wed Aug 10 16:11:18 CEST 2011
Hi Marek,
On Wed, Aug 10, 2011 at 3:24 PM, Marek Vasut <marek.vasut at gmail.com> wrote:
> The mmc_send_status() function sets cmd.arg = 0. That's incorrect, so fix it.
>
> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> ---
> 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.
Best regards,
Lei
More information about the U-Boot
mailing list