aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index ecbc52981ba5..f417adc9feb1 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -541,6 +541,15 @@ out:
541 return err; 541 return err;
542} 542}
543 543
544static void mmc_sdio_resend_if_cond(struct mmc_host *host,
545 struct mmc_card *card)
546{
547 sdio_reset(host);
548 mmc_go_idle(host);
549 mmc_send_if_cond(host, host->ocr_avail);
550 mmc_remove_card(card);
551}
552
544/* 553/*
545 * Handle the detection and initialisation of a card. 554 * Handle the detection and initialisation of a card.
546 * 555 *
@@ -630,10 +639,7 @@ try_again:
630 err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180, 639 err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180,
631 ocr_card); 640 ocr_card);
632 if (err == -EAGAIN) { 641 if (err == -EAGAIN) {
633 sdio_reset(host); 642 mmc_sdio_resend_if_cond(host, card);
634 mmc_go_idle(host);
635 mmc_send_if_cond(host, host->ocr_avail);
636 mmc_remove_card(card);
637 retries--; 643 retries--;
638 goto try_again; 644 goto try_again;
639 } else if (err) { 645 } else if (err) {