aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorw12.lee <w12.lee@samsung.com>2010-09-28 12:40:31 -0700
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:46:43 -0800
commit6d71a39521a58fef6e510234c82406ce420d2d61 (patch)
tree81d3aa1e238e52b8bd88d15eadbb9979a76a6dc2 /drivers/mmc
parentf23c05330d3534e2c33a1eb7fc518ee25c3be09b (diff)
downloadkernel_samsung_crespo-6d71a39521a58fef6e510234c82406ce420d2d61.zip
kernel_samsung_crespo-6d71a39521a58fef6e510234c82406ce420d2d61.tar.gz
kernel_samsung_crespo-6d71a39521a58fef6e510234c82406ce420d2d61.tar.bz2
mmc: sdhci: Skip mmc suspend/resume ops for SDIO device,
enable/disable sdc irq instead of request/free, mask all sdc interrupts on suspend merged from project kernel/tegra by Change-Id: I40e12bf414cb4b107c687aa7256b4b8f3e2cd926 Change-Id: If8706a6f469df11036c80811b16162db3a0bb988 Signed-off-by: w12.lee <w12.lee@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rwxr-xr-x[-rw-r--r--]drivers/mmc/host/sdhci.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index cd2833f..19d6ccc 100644..100755
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -25,6 +25,7 @@
#include <linux/mmc/mmc.h>
#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
#include <plat/regs-sdhci.h>
@@ -2313,7 +2314,8 @@ out:
int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
{
- int ret;
+ int ret = 0;
+ struct mmc_host *mmc = host->mmc;
sdhci_disable_card_detection(host);
@@ -2325,13 +2327,15 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
host->tuning_count * HZ);
}
- ret = mmc_suspend_host(host->mmc);
- if (ret)
- return ret;
+ if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO))
+ ret = mmc_suspend_host(host->mmc);
+
+ sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK);
del_timer(&host->busy_check_timer);
- free_irq(host->irq, host);
+ if (host->irq)
+ disable_irq(host->irq);
if (host->vmmc)
ret = regulator_disable(host->vmmc);
@@ -2343,7 +2347,8 @@ EXPORT_SYMBOL_GPL(sdhci_suspend_host);
int sdhci_resume_host(struct sdhci_host *host)
{
- int ret;
+ int ret = 0;
+ struct mmc_host *mmc = host->mmc;
if (host->vmmc) {
int ret = regulator_enable(host->vmmc);
@@ -2357,15 +2362,15 @@ int sdhci_resume_host(struct sdhci_host *host)
host->ops->enable_dma(host);
}
- ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED,
- mmc_hostname(host->mmc), host);
- if (ret)
- return ret;
+ if (host->irq)
+ enable_irq(host->irq);
sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER));
mmiowb();
- ret = mmc_resume_host(host->mmc);
+ if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO))
+ ret = mmc_resume_host(host->mmc);
+
sdhci_enable_card_detection(host);
/* Set the re-tuning expiration flag */