Commit 7488e924 authored by Girish K S's avatar Girish K S Committed by Chris Ball

mmc: core: Fix low speed mmc card detection failure

This patch fixes the failure of low speed mmc card detection.
Signed-off-by: default avatarGirish K S <girish.shivananjappa@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 147c3b33
...@@ -1006,7 +1006,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1006,7 +1006,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
err = mmc_select_hs200(card); err = mmc_select_hs200(card);
else if (host->caps & MMC_CAP_MMC_HIGHSPEED) else if (host->caps & MMC_CAP_MMC_HIGHSPEED)
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_HS_TIMING, 1, 0); EXT_CSD_HS_TIMING, 1,
card->ext_csd.generic_cmd6_time);
if (err && err != -EBADMSG) if (err && err != -EBADMSG)
goto free_card; goto free_card;
...@@ -1116,7 +1117,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1116,7 +1117,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
* Activate wide bus and DDR (if supported). * Activate wide bus and DDR (if supported).
*/ */
if (!mmc_card_hs200(card) && if (!mmc_card_hs200(card) &&
(card->csd.mmca_vsn >= CSD_SPEC_VER_3) && (card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&
(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) { (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {
static unsigned ext_csd_bits[][2] = { static unsigned ext_csd_bits[][2] = {
{ EXT_CSD_BUS_WIDTH_8, EXT_CSD_DDR_BUS_WIDTH_8 }, { EXT_CSD_BUS_WIDTH_8, EXT_CSD_DDR_BUS_WIDTH_8 },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment