Re: [PATCH] mmc: Test bus-width for old MMC devices (v2)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: zhangfei gao
Date: Tuesday, December 21, 2010 - 3:59 am

On Fri, Dec 17, 2010 at 3:11 AM, Takashi Iwai <tiwai@suse.de> wrote:

Could you help adding this modification?
We found error happen since bus_width is not set at these condition:
1. ddr=0
2. not set MMC_CAP_BUS_WIDTH_TEST

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 1d8409f..86cac0d 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -586,7 +586,11 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 		} else if (ddr) {
 			mmc_card_set_ddr_mode(card);
 			mmc_set_bus_width_ddr(card->host, bus_width, ddr);
-		}
+
+		} else
+			mmc_set_bus_width(card->host,
+					bus_widths[idx]);
+
 	}

 	if (!oldcard)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] mmc: Test bus-width for old MMC devices (v2), Takashi Iwai, (Wed Dec 15, 12:14 am)
[PATCH] mmc: Enable bus-width tests on SDHCI host, Takashi Iwai, (Wed Dec 15, 6:17 am)
Re: [PATCH] mmc: Enable bus-width tests on SDHCI host, Takashi Iwai, (Wed Dec 15, 12:40 pm)
Re: [PATCH] mmc: Test bus-width for old MMC devices (v2), Philip Rakity, (Thu Dec 16, 7:33 pm)
Re: [PATCH] mmc: Test bus-width for old MMC devices (v2), zhangfei gao, (Tue Dec 21, 3:59 am)
Re: [PATCH] mmc: Test bus-width for old MMC devices (v2), Philip Rakity, (Tue Dec 21, 9:36 am)
Re: [PATCH] mmc: Test bus-width for old MMC devices (v2), Philip Rakity, (Tue Dec 21, 12:35 pm)