summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.h
diff options
context:
space:
mode:
authorJohan Rudholm <johan.rudholm@axis.com>2014-11-06 14:46:54 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-26 14:30:57 +0100
commit2d079c43bc5ade7b41610b356bf117e14037a584 (patch)
tree0e9989d510abb38ee1da09154b18c1701ba20c1d /drivers/mmc/core/core.h
parent80412ca8abf087354891108d2f888ad3de56e73c (diff)
downloadlinux-2d079c43bc5ade7b41610b356bf117e14037a584.tar.bz2
mmc: core: consistent handling of initial values
mmc_do_hw_reset(), mmc_power_up() and mmc_power_off() all set similar initial values for bus_mode, bus_width, chip_select and timing. Let's make this handling simpler and more consistent by sticking them together in a common function. This will introduce small changes in behavior in the following places: mmc_power_off(): For SPI hosts, explicitly set bus_mode = MMC_BUSMODE_PUSHPULL and chip_select = MMC_CS_HIGH, before we left them as they were. For non-SPI hosts, set bus_mode = MMC_BUSMODE_PUSHPULL instead of MMC_BUSMODE_OPENDRAIN as before. These two changes should not be a problem since the device will be powered off anyway. mmc_do_hw_reset(): Always set bus_mode = MMC_BUSMODE_PUSHPULL, as required by SD/SDIO cards. MMC cards require MMC_BUSMODE_OPENDRAIN, but this is taken care of by mmc_init_card() and mmc_attach_mmc(). Signed-off-by: Johan Rudholm <johanru@axis.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/core.h')
-rw-r--r--drivers/mmc/core/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index 443a584660f0..d76597c65e3a 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -49,6 +49,7 @@ void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type);
void mmc_power_up(struct mmc_host *host, u32 ocr);
void mmc_power_off(struct mmc_host *host);
void mmc_power_cycle(struct mmc_host *host, u32 ocr);
+void mmc_set_initial_state(struct mmc_host *host);
static inline void mmc_delay(unsigned int ms)
{