mmc: tmio: fix .set_ios(MMC_POWER_UP) handling
The aggressive clock gating for TMIO MMC patch has broken switching interface power on, using MFD or platform callbacks. Restore the ios->power_mode == MMC_POWER_UP && ios->clock == 0 case handling. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
26fc8775b5
commit
c919c2a073
@ -728,15 +728,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
|||||||
tmio_mmc_set_clock(host, ios->clock);
|
tmio_mmc_set_clock(host, ios->clock);
|
||||||
|
|
||||||
/* Power sequence - OFF -> UP -> ON */
|
/* Power sequence - OFF -> UP -> ON */
|
||||||
if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
|
if (ios->power_mode == MMC_POWER_UP) {
|
||||||
|
/* power up SD bus */
|
||||||
|
if (host->set_pwr)
|
||||||
|
host->set_pwr(host->pdev, 1);
|
||||||
|
} else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
|
||||||
/* power down SD bus */
|
/* power down SD bus */
|
||||||
if (ios->power_mode == MMC_POWER_OFF && host->set_pwr)
|
if (ios->power_mode == MMC_POWER_OFF && host->set_pwr)
|
||||||
host->set_pwr(host->pdev, 0);
|
host->set_pwr(host->pdev, 0);
|
||||||
tmio_mmc_clk_stop(host);
|
tmio_mmc_clk_stop(host);
|
||||||
} else if (ios->power_mode == MMC_POWER_UP) {
|
|
||||||
/* power up SD bus */
|
|
||||||
if (host->set_pwr)
|
|
||||||
host->set_pwr(host->pdev, 1);
|
|
||||||
} else {
|
} else {
|
||||||
/* start bus clock */
|
/* start bus clock */
|
||||||
tmio_mmc_clk_start(host);
|
tmio_mmc_clk_start(host);
|
||||||
|
Loading…
Reference in New Issue
Block a user