aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc_pio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_pio.c')
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 69772ab3ca22..e35e17992e38 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -747,19 +747,18 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
747 tmio_mmc_set_clock(host, ios->clock); 747 tmio_mmc_set_clock(host, ios->clock);
748 748
749 /* Power sequence - OFF -> UP -> ON */ 749 /* Power sequence - OFF -> UP -> ON */
750 switch (ios->power_mode) { 750 if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
751 case MMC_POWER_OFF: /* power down SD bus */ 751 /* power down SD bus */
752 if (host->set_pwr) 752 if (ios->power_mode == MMC_POWER_OFF && host->set_pwr)
753 host->set_pwr(host->pdev, 0); 753 host->set_pwr(host->pdev, 0);
754 tmio_mmc_clk_stop(host); 754 tmio_mmc_clk_stop(host);
755 break; 755 } else if (ios->power_mode == MMC_POWER_UP) {
756 case MMC_POWER_ON: /* start bus clock */ 756 /* power up SD bus */
757 tmio_mmc_clk_start(host);
758 break;
759 case MMC_POWER_UP: /* power up SD bus */
760 if (host->set_pwr) 757 if (host->set_pwr)
761 host->set_pwr(host->pdev, 1); 758 host->set_pwr(host->pdev, 1);
762 break; 759 } else {
760 /* start bus clock */
761 tmio_mmc_clk_start(host);
763 } 762 }
764 763
765 switch (ios->bus_width) { 764 switch (ios->bus_width) {