diff options
| author | David Peyer <David.Peyer@motorola.com> | 2014-06-16 14:04:44 -0500 |
|---|---|---|
| committer | David.Peyer <David.Peyer@motorola.com> | 2014-06-17 18:23:35 +0000 |
| commit | c322f46be78f5fb254ddf3adb5f12d69e77e8eb3 (patch) | |
| tree | 74c65e61356ca673ce304387dc92eebf324f7a8a | |
| parent | 84646fdfb7fc337e53846201c81dae0d1553ebde (diff) | |
| download | olio-linux-3.10-c322f46be78f5fb254ddf3adb5f12d69e77e8eb3.tar.xz olio-linux-3.10-c322f46be78f5fb254ddf3adb5f12d69e77e8eb3.zip | |
IKXCLOCK-1432 mmc: remove hard coded delays in resume path
Remove the hard coded delays in mmc_power_up() when they are not needed.
This is being done to speed up the resume path for devices which do not
need these delays.
Change-Id: I64521c25ce91a450e24955f728fdb7722c607024
| -rw-r--r-- | drivers/mmc/core/core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 7bc7d5ba5b3..a08820cfb37 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1470,6 +1470,7 @@ void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type) static void mmc_power_up(struct mmc_host *host) { int bit; + int signal_voltage; if (host->ios.power_mode == MMC_POWER_ON) return; @@ -1493,6 +1494,7 @@ static void mmc_power_up(struct mmc_host *host) host->ios.timing = MMC_TIMING_LEGACY; mmc_set_ios(host); + signal_voltage = host->ios.signal_voltage; /* Set signal voltage to 3.3V */ __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330); @@ -1500,7 +1502,8 @@ static void mmc_power_up(struct mmc_host *host) * This delay should be sufficient to allow the power supply * to reach the minimum voltage. */ - mmc_delay(10); + if (signal_voltage != host->ios.signal_voltage) + mmc_delay(10); host->ios.clock = host->f_init; @@ -1511,7 +1514,8 @@ static void mmc_power_up(struct mmc_host *host) * This delay must be at least 74 clock sizes, or 1 ms, or the * time required to reach a stable voltage. */ - mmc_delay(10); + if (host->caps & MMC_CAP_POWER_OFF_CARD) + mmc_delay(10); mmc_host_clk_release(host); } |