summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMaya Erez <merez@codeaurora.org>2014-12-04 09:37:48 +0200
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:25:38 -0700
commit45af9e56df24904bad335486b1dc2bf6dcff3535 (patch)
tree59961227038c12cfed530f491715a576357973b3 /drivers
parent3c0d768b709658651db5f9ff72c70714b546e4f1 (diff)
mmc: sdio: fix sdio_reset_comm() to take care of UHS card reset
sdio_reset_comm() function may be invoked by the SDIO card function driver to execute soft reset of the card but this function currently fails to reset the UHS SDIO cards. This change fixes this issue by simply invoking SDIO power restore function which is capable of resetting both UHS and non-UHS SDIO cards. CRs-Fixed: 424685 Change-Id: I4f1d76a6bfc4bfec16661aedba85c45b601f24ac Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> [merez@codeaurora.org: fix trivial conflicts] Signed-off-by: Maya Erez <merez@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/sdio.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 434d2b7a794f..0aa19ac04091 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -1241,38 +1241,6 @@ err:
int sdio_reset_comm(struct mmc_card *card)
{
- struct mmc_host *host = card->host;
- u32 ocr;
- u32 rocr;
- int err;
-
- printk("%s():\n", __func__);
- mmc_claim_host(host);
-
- mmc_go_idle(host);
-
- mmc_set_clock(host, host->f_min);
-
- err = mmc_send_io_op_cond(host, 0, &ocr);
- if (err)
- goto err;
-
- rocr = mmc_select_voltage(host, ocr);
- if (!rocr) {
- err = -EINVAL;
- goto err;
- }
-
- err = mmc_sdio_init_card(host, rocr, card, 0);
- if (err)
- goto err;
-
- mmc_release_host(host);
- return 0;
-err:
- printk("%s: Error resetting SDIO communications (%d)\n",
- mmc_hostname(host), err);
- mmc_release_host(host);
- return err;
+ return mmc_power_restore_host(card->host);
}
EXPORT_SYMBOL(sdio_reset_comm);