diff options
author | Fredrik Soderstedt <fredrik.soderstedt@stericsson.com> | 2013-04-17 13:50:53 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-05-26 14:23:11 -0400 |
commit | 810e08ee425f8d7327e4b30069a9b2b3dccfc67d (patch) | |
tree | 0cc4264fa30f9fb5c31c420d34bc97b4e1b64e0b /drivers/mmc/core/sdio.c | |
parent | 4a29b5591faf25555fdf2b717594d50f70c15066 (diff) | |
download | kernel_goldelico_gta04-810e08ee425f8d7327e4b30069a9b2b3dccfc67d.zip kernel_goldelico_gta04-810e08ee425f8d7327e4b30069a9b2b3dccfc67d.tar.gz kernel_goldelico_gta04-810e08ee425f8d7327e4b30069a9b2b3dccfc67d.tar.bz2 |
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>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r-- | drivers/mmc/core/sdio.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 6889a82..444668c 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) if (err) goto out; - /* Initialize and start re-tuning timer */ - if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning) + /* + * SPI mode doesn't define CMD19 and tuning is only valid for SDR50 and + * SDR104 mode SD-cards. Note that tuning is mandatory for SDR104. + */ + if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning && + ((card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR50) || + (card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR104))) { + mmc_host_clk_hold(card->host); err = card->host->ops->execute_tuning(card->host, MMC_SEND_TUNING_BLOCK); + mmc_host_clk_release(card->host); + } out: |