提交 25d5c699 编写于 作者: P Philip Rakity 提交者: Chris Ball

mmc: Fix printing of card DDR type

We should not call mmc_card_set_ddr_mode() if we are in single data
mode.  This sets DDR and causes the kernel 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: NPhilip Rakity <prakity@marvell.com>
Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
Acked-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 151f52f0
...@@ -375,7 +375,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -375,7 +375,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
struct mmc_card *oldcard) struct mmc_card *oldcard)
{ {
struct mmc_card *card; struct mmc_card *card;
int err, ddr = MMC_SDR_MODE; int err, ddr = 0;
u32 cid[4]; u32 cid[4];
unsigned int max_dtr; unsigned int max_dtr;
...@@ -562,7 +562,11 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -562,7 +562,11 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
1 << bus_width, ddr); 1 << bus_width, ddr);
err = 0; err = 0;
} else { } 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); mmc_set_bus_width_ddr(card->host, bus_width, ddr);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册