diff options
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index a9ac0b457313..8718432751c5 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/pm_runtime.h> | ||
25 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
27 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
@@ -1621,10 +1622,16 @@ static void dw_mci_init_card(struct mmc_host *mmc, struct mmc_card *card) | |||
1621 | 1622 | ||
1622 | if (card->type == MMC_TYPE_SDIO || | 1623 | if (card->type == MMC_TYPE_SDIO || |
1623 | card->type == MMC_TYPE_SD_COMBO) { | 1624 | card->type == MMC_TYPE_SD_COMBO) { |
1624 | set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); | 1625 | if (!test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { |
1626 | pm_runtime_get_noresume(mmc->parent); | ||
1627 | set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); | ||
1628 | } | ||
1625 | clk_en_a = clk_en_a_old & ~clken_low_pwr; | 1629 | clk_en_a = clk_en_a_old & ~clken_low_pwr; |
1626 | } else { | 1630 | } else { |
1627 | clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); | 1631 | if (test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { |
1632 | pm_runtime_put_noidle(mmc->parent); | ||
1633 | clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); | ||
1634 | } | ||
1628 | clk_en_a = clk_en_a_old | clken_low_pwr; | 1635 | clk_en_a = clk_en_a_old | clken_low_pwr; |
1629 | } | 1636 | } |
1630 | 1637 | ||