From: lintao Date: Fri, 19 Sep 2014 02:18:37 +0000 (+0800) Subject: mmc: edmac: reinit pll30 slave channel when resume X-Git-Tag: firefly_0821_release~4661 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=40b8aabbaeb14ae582975f986a69bc224981dae9;p=firefly-linux-kernel-4.4.55.git mmc: edmac: reinit pll30 slave channel when resume Signed-off-by: lintao --- diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index fd72bcac5e76..c956f9f8f6e3 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -4087,14 +4087,19 @@ int dw_mci_resume(struct dw_mci *host) u32 regs; struct dw_mci_slot *slot; - if (host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO){ + if (host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO) { slot = mmc_priv(host->mmc); + if (!test_bit(DW_MMC_CARD_PRESENT, &slot->flags)) { + /* edmac contains exit function call when suspend*/ + if(host->use_dma && host->dma_ops->init && host->dma_ops->exit) + host->dma_ops->init(host); - if(!test_bit(DW_MMC_CARD_PRESENT, &slot->flags)) - return 0; + return 0; + } } + /*only for sdmmc controller*/ - if(host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SD) { + if (host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SD) { /* Soc rk3126 already in gpio_cd mode */ if (!(cpu_is_rk312x() && soc_is_rk3126())) { disable_irq_wake(host->mmc->slot.cd_irq);