mmc: edmac: reinit pll30 slave channel when resume
authorlintao <lintao@rock-chips.com>
Fri, 19 Sep 2014 02:18:37 +0000 (10:18 +0800)
committerlintao <lintao@rock-chips.com>
Fri, 19 Sep 2014 02:20:18 +0000 (10:20 +0800)
Signed-off-by: lintao <lintao@rock-chips.com>
drivers/mmc/host/rk_sdmmc.c

index fd72bcac5e7639c25a3fa8cd0200a2b8c5e2ebd2..c956f9f8f6e3bc0e068860dbb8288dea7b836fa6 100755 (executable)
@@ -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);