aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1fe77ad..349f073 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -36,10 +36,12 @@
#define DBG(f, x...) \
pr_debug(DRIVER_NAME " [%s()]: " f, __func__, ## x)
+#ifndef CONFIG_FAST_RESUME
#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \
defined(CONFIG_MMC_SDHCI_MODULE))
#define SDHCI_USE_LEDS_CLASS
#endif
+#endif
#define MAX_TUNING_LOOP 40
@@ -1966,6 +1968,10 @@ static void sdhci_tasklet_finish(unsigned long param)
controllers do not like that. */
sdhci_reset(host, SDHCI_RESET_CMD);
sdhci_reset(host, SDHCI_RESET_DATA);
+#ifdef CONFIG_MACH_PX
+ printk(KERN_DEBUG "%s: Controller is resetted!\n",
+ mmc_hostname(host->mmc));
+#endif
}
host->mrq = NULL;
@@ -2062,6 +2068,10 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
if (host->cmd->error) {
tasklet_schedule(&host->finish_tasklet);
+#ifdef CONFIG_MACH_PX
+ printk(KERN_DEBUG "%s: finish tasklet schedule\n",
+ mmc_hostname(host->mmc));
+#endif
return;
}
@@ -2346,6 +2356,28 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
EXPORT_SYMBOL_GPL(sdhci_suspend_host);
+void sdhci_shutdown_host(struct sdhci_host *host)
+{
+ sdhci_disable_card_detection(host);
+
+ free_irq(host->irq, host);
+
+ if (host->vmmc) {
+ if (regulator_is_enabled(host->vmmc)) {
+#ifdef CONFIG_MIDAS_COMMON
+ if (host->ops->set_power)
+ host->ops->set_power(0);
+#endif
+ regulator_disable(host->vmmc);
+ pr_info("%s : MMC Card OFF\n", __func__);
+#if defined(CONFIG_TARGET_LOCALE_KOR)
+ mdelay(5);
+#endif
+ }
+ }
+}
+EXPORT_SYMBOL_GPL(sdhci_shutdown_host);
+
int sdhci_resume_host(struct sdhci_host *host)
{
int ret;
@@ -2660,6 +2692,9 @@ int sdhci_add_host(struct sdhci_host *host)
if (caps[1] & SDHCI_DRIVER_TYPE_D)
mmc->caps |= MMC_CAP_DRIVER_TYPE_D;
+ if (mmc->pm_flags & MMC_PM_IGNORE_SUSPEND_RESUME)
+ mmc->pm_caps |= MMC_PM_KEEP_POWER;
+
/*
* If Power Off Notify capability is enabled by the host,
* set notify to short power off notify timeout value.