From: Shaohui Xie Date: Thu, 29 Dec 2011 08:33:00 +0000 (+0800) Subject: mmc: sdhci: restore the enabled dma when do reset all X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3abc1e804253add41990cbe1461e79c1165108e0;p=mv-sheeva.git mmc: sdhci: restore the enabled dma when do reset all If dma is enabled, it'll be cleared when reset all is performed, this can be observed on some platforms, such as P2041 which has a version 2.3 controller, but platform like P4080 which has a version 2.2 controller, does not suffer this, so we will check if the dma is enabled, we should restore it after reset all. Signed-off-by: Shaohui Xie Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 96f4e548ba2..8d66706824a 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -212,6 +212,11 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET) sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier); + + if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { + if ((host->ops->enable_dma) && (mask & SDHCI_RESET_ALL)) + host->ops->enable_dma(host); + } } static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios);