summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorChris Ball2012-02-06 06:43:59 +0100
committerChris Ball2012-03-26 01:33:44 +0200
commita1b13b4e18d62ea60aad9554f35d79c51328b8b6 (patch)
tree78e00a547bc10c3849cd74b44954a239b0f6890c /drivers/mmc/host/sdhci.c
parentmmc: dw_mmc: Override blk_settings with platdata on IDMAC (diff)
downloadkernel-qcow2-linux-a1b13b4e18d62ea60aad9554f35d79c51328b8b6.tar.gz
kernel-qcow2-linux-a1b13b4e18d62ea60aad9554f35d79c51328b8b6.tar.xz
kernel-qcow2-linux-a1b13b4e18d62ea60aad9554f35d79c51328b8b6.zip
mmc: sdhci: Add platform suspend/resume hooks.
Some platforms require saving/restoring registers across suspend/resume; this hook allows them to do that inside their driver. Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 8d66706824a6..1f5888b42b2c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2379,6 +2379,9 @@ int sdhci_suspend_host(struct sdhci_host *host)
int ret;
bool has_tuning_timer;
+ if (host->ops->platform_suspend)
+ host->ops->platform_suspend(host);
+
sdhci_disable_card_detection(host);
/* Disable tuning since we are suspending */
@@ -2429,6 +2432,9 @@ int sdhci_resume_host(struct sdhci_host *host)
ret = mmc_resume_host(host->mmc);
sdhci_enable_card_detection(host);
+ if (host->ops->platform_resume)
+ host->ops->platform_resume(host);
+
/* Set the re-tuning expiration flag */
if ((host->version >= SDHCI_SPEC_300) && host->tuning_count &&
(host->tuning_mode == SDHCI_TUNING_MODE_1))