diff options
-rw-r--r-- | drivers/mmc/core/core.c | 8 | ||||
-rw-r--r-- | drivers/mmc/core/core.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 39f28af34cb6..789056fbfc93 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -1470,6 +1470,14 @@ void mmc_power_off(struct mmc_host *host) | |||
1470 | mmc_host_clk_release(host); | 1470 | mmc_host_clk_release(host); |
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | void mmc_power_cycle(struct mmc_host *host) | ||
1474 | { | ||
1475 | mmc_power_off(host); | ||
1476 | /* Wait at least 1 ms according to SD spec */ | ||
1477 | mmc_delay(1); | ||
1478 | mmc_power_up(host); | ||
1479 | } | ||
1480 | |||
1473 | /* | 1481 | /* |
1474 | * Cleanup when the last reference to the bus operator is dropped. | 1482 | * Cleanup when the last reference to the bus operator is dropped. |
1475 | */ | 1483 | */ |
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 0272b3284b5e..9007de74d8a9 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h | |||
@@ -45,6 +45,7 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, | |||
45 | void mmc_set_timing(struct mmc_host *host, unsigned int timing); | 45 | void mmc_set_timing(struct mmc_host *host, unsigned int timing); |
46 | void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type); | 46 | void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type); |
47 | void mmc_power_off(struct mmc_host *host); | 47 | void mmc_power_off(struct mmc_host *host); |
48 | void mmc_power_cycle(struct mmc_host *host); | ||
48 | 49 | ||
49 | static inline void mmc_delay(unsigned int ms) | 50 | static inline void mmc_delay(unsigned int ms) |
50 | { | 51 | { |