From: Ryan QIAN Date: Wed, 29 Feb 2012 05:59:07 +0000 (+0800) Subject: ENGR00175692-01 [MX6DL] SD3.0: can not recognize SD3.0 cards on some boards. X-Git-Tag: v3.0.35-fsl_4.1.0~1562 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dad17adcee117f56275f33bd489432e7f6b22934;p=karo-tx-linux.git ENGR00175692-01 [MX6DL] SD3.0: can not recognize SD3.0 cards on some boards. Improve compatibility by doing the following: - Change DSE to 34ohm for 200MHz - Reset host controller before changing clk tuning ctrl reg Signed-off-by: Ryan QIAN --- diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index b7291e0444f6..5d9d7529e130 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -637,11 +637,13 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card) min += card->host->tuning_step; } - max = min; + max = min + card->host->tuning_step; while (max < card->host->tuning_max) { mmc_set_tuning(card->host, max); - if (!mmc_send_tuning_cmd(card)) + if (mmc_send_tuning_cmd(card)) { + max -= card->host->tuning_step; break; + } max += card->host->tuning_step; }