diff options
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r-- | drivers/mmc/core/sd.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index d90a6de7901d..ad4d43eae99d 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -660,15 +660,10 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card) | |||
660 | * SPI mode doesn't define CMD19 and tuning is only valid for SDR50 and | 660 | * SPI mode doesn't define CMD19 and tuning is only valid for SDR50 and |
661 | * SDR104 mode SD-cards. Note that tuning is mandatory for SDR104. | 661 | * SDR104 mode SD-cards. Note that tuning is mandatory for SDR104. |
662 | */ | 662 | */ |
663 | if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning && | 663 | if (!mmc_host_is_spi(card->host) && |
664 | (card->sd_bus_speed == UHS_SDR50_BUS_SPEED || | 664 | (card->sd_bus_speed == UHS_SDR50_BUS_SPEED || |
665 | card->sd_bus_speed == UHS_SDR104_BUS_SPEED)) { | 665 | card->sd_bus_speed == UHS_SDR104_BUS_SPEED)) |
666 | mmc_host_clk_hold(card->host); | 666 | err = mmc_execute_tuning(card); |
667 | err = card->host->ops->execute_tuning(card->host, | ||
668 | MMC_SEND_TUNING_BLOCK); | ||
669 | mmc_host_clk_release(card->host); | ||
670 | } | ||
671 | |||
672 | out: | 667 | out: |
673 | kfree(status); | 668 | kfree(status); |
674 | 669 | ||
@@ -933,6 +928,12 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | |||
933 | } | 928 | } |
934 | 929 | ||
935 | /* | 930 | /* |
931 | * Call the optional HC's init_card function to handle quirks. | ||
932 | */ | ||
933 | if (host->ops->init_card) | ||
934 | host->ops->init_card(host, card); | ||
935 | |||
936 | /* | ||
936 | * For native busses: get card RCA and quit open drain mode. | 937 | * For native busses: get card RCA and quit open drain mode. |
937 | */ | 938 | */ |
938 | if (!mmc_host_is_spi(host)) { | 939 | if (!mmc_host_is_spi(host)) { |
@@ -1191,6 +1192,12 @@ static int mmc_sd_power_restore(struct mmc_host *host) | |||
1191 | return ret; | 1192 | return ret; |
1192 | } | 1193 | } |
1193 | 1194 | ||
1195 | static int mmc_sd_reset(struct mmc_host *host) | ||
1196 | { | ||
1197 | mmc_power_cycle(host, host->card->ocr); | ||
1198 | return mmc_sd_power_restore(host); | ||
1199 | } | ||
1200 | |||
1194 | static const struct mmc_bus_ops mmc_sd_ops = { | 1201 | static const struct mmc_bus_ops mmc_sd_ops = { |
1195 | .remove = mmc_sd_remove, | 1202 | .remove = mmc_sd_remove, |
1196 | .detect = mmc_sd_detect, | 1203 | .detect = mmc_sd_detect, |
@@ -1201,6 +1208,7 @@ static const struct mmc_bus_ops mmc_sd_ops = { | |||
1201 | .power_restore = mmc_sd_power_restore, | 1208 | .power_restore = mmc_sd_power_restore, |
1202 | .alive = mmc_sd_alive, | 1209 | .alive = mmc_sd_alive, |
1203 | .shutdown = mmc_sd_suspend, | 1210 | .shutdown = mmc_sd_suspend, |
1211 | .reset = mmc_sd_reset, | ||
1204 | }; | 1212 | }; |
1205 | 1213 | ||
1206 | /* | 1214 | /* |
@@ -1271,4 +1279,3 @@ err: | |||
1271 | 1279 | ||
1272 | return err; | 1280 | return err; |
1273 | } | 1281 | } |
1274 | |||