aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@amd.com>2012-07-10 04:55:37 -0400
committerChris Ball <cjb@laptop.org>2012-07-22 15:25:53 -0400
commit108ecc4cf9c46a4caabaf18efc42d19818c95b70 (patch)
treeb28bc7b718318b54fcdb22fd3c58833a971ac9c9 /drivers/mmc/core/core.c
parent55c4665ea0a42fd6427826bfce96eb4b0389262a (diff)
mmc: core: reset signal voltage on power up
Add a call to mmc_set_signal_voltage() to set signal voltage to 3.3v in mmc_power_up so that we do not need to touch signal voltage setting in mmc/sd/sdio init functions and rescan function. For mmc/sd cards, when doing a suspend/resume cycle, consider the unsafe resume case, the card will lose its power and when powered on again, we will set signal voltage to 3.3v in mmc_power_up before its resume function gets called, which will re-init the card. And for sdio cards, when doing a suspend/resume cycle, consider the unsafe resume case, the card will either lose its power or not depending on if it wants to wakeup the host. If power is not maintained, it is the same case as mmc/sd cards. If power is maintained, mmc_power_up will not be called and the card's signal voltage will remain at the last setting. Signed-off-by: Aaron Lu <aaron.lu@amd.com> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 9503cabc96f1..8ac5246e2ab2 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1212,6 +1212,9 @@ static void mmc_power_up(struct mmc_host *host)
1212 host->ios.timing = MMC_TIMING_LEGACY; 1212 host->ios.timing = MMC_TIMING_LEGACY;
1213 mmc_set_ios(host); 1213 mmc_set_ios(host);
1214 1214
1215 /* Set signal voltage to 3.3V */
1216 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false);
1217
1215 /* 1218 /*
1216 * This delay should be sufficient to allow the power supply 1219 * This delay should be sufficient to allow the power supply
1217 * to reach the minimum voltage. 1220 * to reach the minimum voltage.
@@ -1963,9 +1966,6 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
1963 */ 1966 */
1964 mmc_hw_reset_for_init(host); 1967 mmc_hw_reset_for_init(host);
1965 1968
1966 /* Initialization should be done at 3.3 V I/O voltage. */
1967 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
1968
1969 /* 1969 /*
1970 * sdio_reset sends CMD52 to reset card. Since we do not know 1970 * sdio_reset sends CMD52 to reset card. Since we do not know
1971 * if the card is being re-initialized, just send it. CMD52 1971 * if the card is being re-initialized, just send it. CMD52