aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2017-04-19 16:41:43 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2017-06-20 04:30:13 -0400
commit0eebf9b9084f97905f77bb5d6d9ea7aa17427509 (patch)
tree01ec67893f0a3aec705b50484eedf1794178badb /drivers/mmc/host/dw_mmc.c
parentca8971ca5753e95da978e7941f0228120b6bbb96 (diff)
Revert "mmc: dw_mmc: Don't allow Runtime PM for SDIO cards"
This reverts commit a6db2c86033b ("mmc: dw_mmc: Don't allow Runtime PM for SDIO cards")' As dw_mmc now is capable of preventing runtime PM suspend while SDIO IRQs are enabled, let's drop the less fine-grained method, which is preventing runtime PM suspend for all SDIO cards - no matter of whether SDIO IRQs are being enabled or not. In this way we don't keep the host runtime PM resumed, unless it's really needed, thus avoiding to waste power. Especially when SDIO IRQs is supported via a separate out-of-band IRQ line, which isn't defined by the SDIO standard, typically the SDIO func driver doesn't enable SDIO IRQs via sdio_claim_irq(). So, for these cases we can now allow the dwmmc device to be runtime PM suspended in-between requests. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 454b847062b3..0e2d6f7de469 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1621,16 +1621,10 @@ static void dw_mci_init_card(struct mmc_host *mmc, struct mmc_card *card)
1621 1621
1622 if (card->type == MMC_TYPE_SDIO || 1622 if (card->type == MMC_TYPE_SDIO ||
1623 card->type == MMC_TYPE_SD_COMBO) { 1623 card->type == MMC_TYPE_SD_COMBO) {
1624 if (!test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { 1624 set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags);
1625 pm_runtime_get_noresume(mmc->parent);
1626 set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags);
1627 }
1628 clk_en_a = clk_en_a_old & ~clken_low_pwr; 1625 clk_en_a = clk_en_a_old & ~clken_low_pwr;
1629 } else { 1626 } else {
1630 if (test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { 1627 clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags);
1631 pm_runtime_put_noidle(mmc->parent);
1632 clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags);
1633 }
1634 clk_en_a = clk_en_a_old | clken_low_pwr; 1628 clk_en_a = clk_en_a_old | clken_low_pwr;
1635 } 1629 }
1636 1630