aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
authorFredrik Soderstedt <fredrik.soderstedt@stericsson.com>2013-04-17 07:50:53 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:47:27 -0400
commit44cad0e78b2040b2985b6a35e3936528afa81daa (patch)
tree69205755b03625375734b3d924b90798d86146c8 /drivers/mmc/core/sdio.c
parent1c2640f074885276e90e6ab226228bb509fb9d8c (diff)
mmc: core: Only execute tuning for SDR50 and SDR104
Only execute tuning for sd and sdio devices that are using SDR50 or SDR104. Make sure clock is hold during tuning for sdio devices. Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com> Acked-by: Johan Rudholm <jrudholm@gmail.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org> (cherry picked from commit 810e08ee425f8d7327e4b30069a9b2b3dccfc67d)
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 6889a821c1da..444668c210b2 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -563,10 +563,18 @@ static int mmc_sdio_init_uhs_card(struct mmc_card *card)
563 if (err) 563 if (err)
564 goto out; 564 goto out;
565 565
566 /* Initialize and start re-tuning timer */ 566 /*
567 if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning) 567 * SPI mode doesn't define CMD19 and tuning is only valid for SDR50 and
568 * SDR104 mode SD-cards. Note that tuning is mandatory for SDR104.
569 */
570 if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning &&
571 ((card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR50) ||
572 (card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR104))) {
573 mmc_host_clk_hold(card->host);
568 err = card->host->ops->execute_tuning(card->host, 574 err = card->host->ops->execute_tuning(card->host,
569 MMC_SEND_TUNING_BLOCK); 575 MMC_SEND_TUNING_BLOCK);
576 mmc_host_clk_release(card->host);
577 }
570 578
571out: 579out:
572 580