* PATCH: mmc.c DDR print of card type not correct @ 2010-10-29 8:13 ` Philip Rakity 2010-11-01 18:11 ` Linus Walleij 2010-11-07 21:28 ` Chris Ball 0 siblings, 2 replies; 4+ messages in thread From: Philip Rakity @ 2010-10-29 8:13 UTC (permalink / raw) To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Adrian Hunter 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); } } ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: PATCH: mmc.c DDR print of card type not correct 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 1 sibling, 1 reply; 4+ messages in thread From: Linus Walleij @ 2010-11-01 18:11 UTC (permalink / raw) To: Philip Rakity; +Cc: linux-mmc@vger.kernel.org, Chris Ball, Adrian Hunter 2010/10/29 Philip Rakity <prakity@marvell.com>: > 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> Acked-by: Linus Walleij <linus.walleij@stericsson.com> This looks correct to me and my immediate colleagues. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: mmc.c DDR print of card type not correct 2010-11-01 18:11 ` Linus Walleij @ 2010-11-04 5:55 ` Kyungmin Park 0 siblings, 0 replies; 4+ messages in thread From: Kyungmin Park @ 2010-11-04 5:55 UTC (permalink / raw) To: Linus Walleij Cc: Philip Rakity, linux-mmc@vger.kernel.org, Chris Ball, Adrian Hunter Acked-by: Kyungmin Park <kyungmin.park@samsung.com> It should be fixed. Thank you, Kyungmin Park On Tue, Nov 2, 2010 at 3:11 AM, Linus Walleij <linus.ml.walleij@gmail.com> wrote: > 2010/10/29 Philip Rakity <prakity@marvell.com>: > >> 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> > > Acked-by: Linus Walleij <linus.walleij@stericsson.com> > > This looks correct to me and my immediate colleagues. > > Yours, > Linus Walleij > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: mmc.c DDR print of card type not correct 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-07 21:28 ` Chris Ball 1 sibling, 0 replies; 4+ messages in thread From: Chris Ball @ 2010-11-07 21:28 UTC (permalink / raw) To: Philip Rakity; +Cc: linux-mmc@vger.kernel.org, Adrian Hunter 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-07 21:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 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.