mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 05:33:09 +00:00
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>
This commit is contained in:
parent
4a29b5591f
commit
810e08ee42
@ -646,8 +646,13 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card)
|
|||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* SPI mode doesn't define CMD19 */
|
/*
|
||||||
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->sd_bus_speed == UHS_SDR50_BUS_SPEED ||
|
||||||
|
card->sd_bus_speed == UHS_SDR104_BUS_SPEED)) {
|
||||||
mmc_host_clk_hold(card->host);
|
mmc_host_clk_hold(card->host);
|
||||||
err = card->host->ops->execute_tuning(card->host,
|
err = card->host->ops->execute_tuning(card->host,
|
||||||
MMC_SEND_TUNING_BLOCK);
|
MMC_SEND_TUNING_BLOCK);
|
||||||
|
@ -563,10 +563,18 @@ static int mmc_sdio_init_uhs_card(struct mmc_card *card)
|
|||||||
if (err)
|
if (err)
|
||||||
goto out;
|
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,
|
err = card->host->ops->execute_tuning(card->host,
|
||||||
MMC_SEND_TUNING_BLOCK);
|
MMC_SEND_TUNING_BLOCK);
|
||||||
|
mmc_host_clk_release(card->host);
|
||||||
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user