mmc: unnecessary to dynamic request and release slave chn.
authorlintao <lintao@rock-chips.com>
Fri, 19 Sep 2014 06:17:09 +0000 (14:17 +0800)
committerlintao <lintao@rock-chips.com>
Fri, 19 Sep 2014 06:23:51 +0000 (14:23 +0800)
drivers/mmc/host/rk_sdmmc.c

index c956f9f8f6e3bc0e068860dbb8288dea7b836fa6..a20fec90a7c740cae84f1c366eb1d2dc382f8480 100755 (executable)
@@ -4053,9 +4053,6 @@ int dw_mci_suspend(struct dw_mci *host)
         if(host->vmmc)
                 regulator_disable(host->vmmc);
 
-        if(host->use_dma && host->dma_ops->exit)
-                host->dma_ops->exit(host);
-
         /*only for sdmmc controller*/
         if (host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SD) {
                 host->mmc->rescan_disable = 1;
@@ -4089,13 +4086,8 @@ int dw_mci_resume(struct dw_mci *host)
     
         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;
-               }
         }
 
        /*only for sdmmc controller*/
@@ -4132,8 +4124,9 @@ int dw_mci_resume(struct dw_mci *host)
                return ret;
        }
 
-       if(host->use_dma && host->dma_ops->init)
-               host->dma_ops->init(host);
+       if(!(cpu_is_rk3036() || cpu_is_rk312x()))
+               if(host->use_dma && host->dma_ops->init)
+                       host->dma_ops->init(host);
 
        /*
         * Restore the initial value at FIFOTH register