diff options
author | Johan Rudholm <johan.rudholm@axis.com> | 2014-11-06 14:46:54 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-26 14:30:57 +0100 |
commit | 2d079c43bc5ade7b41610b356bf117e14037a584 (patch) | |
tree | 0e9989d510abb38ee1da09154b18c1701ba20c1d /mm/mprotect.c | |
parent | 80412ca8abf087354891108d2f888ad3de56e73c (diff) | |
download | talos-obmc-linux-2d079c43bc5ade7b41610b356bf117e14037a584.tar.gz talos-obmc-linux-2d079c43bc5ade7b41610b356bf117e14037a584.zip |
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 'mm/mprotect.c')
0 files changed, 0 insertions, 0 deletions