提交 5fd01579 编写于 作者: G Guennadi Liakhovetski 提交者: Chris Ball

mmc: tmio: support aggressive clock gating

Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: NPaul Mundt <lethal@linux-sh.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 a7edbe39
...@@ -747,19 +747,18 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -747,19 +747,18 @@ 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 */
switch (ios->power_mode) { if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
case MMC_POWER_OFF: /* power down SD bus */ /* power down SD bus */
if (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);
break; } else if (ios->power_mode == MMC_POWER_UP) {
case MMC_POWER_ON: /* start bus clock */ /* power up SD bus */
tmio_mmc_clk_start(host);
break;
case MMC_POWER_UP: /* power up SD bus */
if (host->set_pwr) if (host->set_pwr)
host->set_pwr(host->pdev, 1); host->set_pwr(host->pdev, 1);
break; } else {
/* start bus clock */
tmio_mmc_clk_start(host);
} }
switch (ios->bus_width) { switch (ios->bus_width) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册