diff options
| -rw-r--r-- | drivers/mmc/core/core.c | 3 | ||||
| -rw-r--r-- | drivers/mmc/core/mmc.c | 3 | ||||
| -rw-r--r-- | drivers/mmc/core/sd.c | 8 | ||||
| -rw-r--r-- | drivers/mmc/core/sdio.c | 8 |
4 files changed, 17 insertions, 5 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 690255c7d4dc..132378b89d76 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
| @@ -2068,6 +2068,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq) | |||
| 2068 | */ | 2068 | */ |
| 2069 | mmc_hw_reset_for_init(host); | 2069 | mmc_hw_reset_for_init(host); |
| 2070 | 2070 | ||
| 2071 | /* Initialization should be done at 3.3 V I/O voltage. */ | ||
| 2072 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 2073 | |||
| 2071 | /* | 2074 | /* |
| 2072 | * sdio_reset sends CMD52 to reset card. Since we do not know | 2075 | * sdio_reset sends CMD52 to reset card. Since we do not know |
| 2073 | * if the card is being re-initialized, just send it. CMD52 | 2076 | * if the card is being re-initialized, just send it. CMD52 |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a48066344fa8..2b9ed1401dc4 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
| @@ -816,6 +816,9 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | |||
| 816 | if (!mmc_host_is_spi(host)) | 816 | if (!mmc_host_is_spi(host)) |
| 817 | mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); | 817 | mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); |
| 818 | 818 | ||
| 819 | /* Initialization should be done at 3.3 V I/O voltage. */ | ||
| 820 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 821 | |||
| 819 | /* | 822 | /* |
| 820 | * Since we're changing the OCR value, we seem to | 823 | * Since we're changing the OCR value, we seem to |
| 821 | * need to tell some cards to go back to the idle | 824 | * need to tell some cards to go back to the idle |
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 5017f9354ce2..c272c6868ecf 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
| @@ -911,6 +911,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | |||
| 911 | BUG_ON(!host); | 911 | BUG_ON(!host); |
| 912 | WARN_ON(!host->claimed); | 912 | WARN_ON(!host->claimed); |
| 913 | 913 | ||
| 914 | /* The initialization should be done at 3.3 V I/O voltage. */ | ||
| 915 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 916 | |||
| 914 | err = mmc_sd_get_cid(host, ocr, cid, &rocr); | 917 | err = mmc_sd_get_cid(host, ocr, cid, &rocr); |
| 915 | if (err) | 918 | if (err) |
| 916 | return err; | 919 | return err; |
| @@ -1156,11 +1159,6 @@ int mmc_attach_sd(struct mmc_host *host) | |||
| 1156 | BUG_ON(!host); | 1159 | BUG_ON(!host); |
| 1157 | WARN_ON(!host->claimed); | 1160 | WARN_ON(!host->claimed); |
| 1158 | 1161 | ||
| 1159 | /* Make sure we are at 3.3V signalling voltage */ | ||
| 1160 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false); | ||
| 1161 | if (err) | ||
| 1162 | return err; | ||
| 1163 | |||
| 1164 | /* Disable preset value enable if already set since last time */ | 1162 | /* Disable preset value enable if already set since last time */ |
| 1165 | if (host->ops->enable_preset_value) { | 1163 | if (host->ops->enable_preset_value) { |
| 1166 | mmc_host_clk_hold(host); | 1164 | mmc_host_clk_hold(host); |
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 12cde6ee17f5..2c7c83f832d2 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c | |||
| @@ -585,6 +585,9 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, | |||
| 585 | * Inform the card of the voltage | 585 | * Inform the card of the voltage |
| 586 | */ | 586 | */ |
| 587 | if (!powered_resume) { | 587 | if (!powered_resume) { |
| 588 | /* The initialization should be done at 3.3 V I/O voltage. */ | ||
| 589 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 590 | |||
| 588 | err = mmc_send_io_op_cond(host, host->ocr, &ocr); | 591 | err = mmc_send_io_op_cond(host, host->ocr, &ocr); |
| 589 | if (err) | 592 | if (err) |
| 590 | goto err; | 593 | goto err; |
| @@ -996,6 +999,11 @@ static int mmc_sdio_power_restore(struct mmc_host *host) | |||
| 996 | * With these steps taken, mmc_select_voltage() is also required to | 999 | * With these steps taken, mmc_select_voltage() is also required to |
| 997 | * restore the correct voltage setting of the card. | 1000 | * restore the correct voltage setting of the card. |
| 998 | */ | 1001 | */ |
| 1002 | |||
| 1003 | /* The initialization should be done at 3.3 V I/O voltage. */ | ||
| 1004 | if (!mmc_card_keep_power(host)) | ||
| 1005 | mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0); | ||
| 1006 | |||
| 999 | sdio_reset(host); | 1007 | sdio_reset(host); |
| 1000 | mmc_go_idle(host); | 1008 | mmc_go_idle(host); |
| 1001 | mmc_send_if_cond(host, host->ocr_avail); | 1009 | mmc_send_if_cond(host, host->ocr_avail); |
