From: Chris Ball <cjb@laptop.org>
To: Philip Rakity <prakity@marvell.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Adrian Hunter <adrian.hunter@nokia.com>
Subject: Re: PATCH: mmc.c DDR print of card type not correct
Date: Sun, 7 Nov 2010 21:28:16 +0000 [thread overview]
Message-ID: <20101107212816.GA13608@void.printf.net> (raw)
In-Reply-To: <24C0629C-F7E8-4D4A-A42A-2B6578B5AE2D@marvell.com>
Hi Philip,
On Fri, Oct 29, 2010 at 01:13:38AM -0700, Philip Rakity wrote:
> we should not call mmc_card_set_ddr_mode if we are in single data mode. This sets DDR and causes
> the print out in the log to say the card is DDR when it is not.
>
> Explicitly set ddr to 0 rather then rely on MMC_SDR_MODE being 0 when doing the checks.
>
> Signed-off-by: Philip Rakity <prakity@marvell.com>
>
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 995261f..37ddb0d 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -375,7 +375,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> struct mmc_card *oldcard)
> {
> struct mmc_card *card;
> - int err, ddr = MMC_SDR_MODE;
> + int err, ddr = 0 ;
> u32 cid[4];
> unsigned int max_dtr;
>
> @@ -562,7 +562,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> 1 << bus_width, ddr);
> err = 0;
> } else {
> - mmc_card_set_ddr_mode(card);
> + if (ddr)
> + mmc_card_set_ddr_mode(card);
> + else
> + ddr = MMC_SDR_MODE;
> mmc_set_bus_width_ddr(card->host, bus_width, ddr);
> }
> }
Thanks, pushed and queued for 2.6.37.
(Note, this patch was corrupt -- please fix your mailer and check that
patches apply successfully.)
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2010-11-07 21:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Act3QTFHJtPJMcP5Qf2uwZskt324LQ==>
2010-10-29 8:13 ` PATCH: mmc.c DDR print of card type not correct Philip Rakity
2010-11-01 18:11 ` Linus Walleij
2010-11-04 5:55 ` Kyungmin Park
2010-11-07 21:28 ` Chris Ball [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101107212816.GA13608@void.printf.net \
--to=cjb@laptop.org \
--cc=adrian.hunter@nokia.com \
--cc=linux-mmc@vger.kernel.org \
--cc=prakity@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.