aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/sdhci-of-esdhc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 5d876ff86f37..2ef52f47def8 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -114,6 +114,20 @@ static unsigned int esdhc_of_get_min_clock(struct sdhci_host *host)
114 return pltfm_host->clock / 256 / 16; 114 return pltfm_host->clock / 256 / 16;
115} 115}
116 116
117#ifdef CONFIG_PM
118static u32 esdhc_proctl;
119static void esdhc_of_suspend(struct sdhci_host *host)
120{
121 esdhc_proctl = sdhci_be32bs_readl(host, SDHCI_HOST_CONTROL);
122}
123
124static void esdhc_of_resume(struct sdhci_host *host)
125{
126 esdhc_of_enable_dma(host);
127 sdhci_be32bs_writel(host, esdhc_proctl, SDHCI_HOST_CONTROL);
128}
129#endif
130
117static struct sdhci_ops sdhci_esdhc_ops = { 131static struct sdhci_ops sdhci_esdhc_ops = {
118 .read_l = sdhci_be32bs_readl, 132 .read_l = sdhci_be32bs_readl,
119 .read_w = esdhc_readw, 133 .read_w = esdhc_readw,
@@ -125,6 +139,10 @@ static struct sdhci_ops sdhci_esdhc_ops = {
125 .enable_dma = esdhc_of_enable_dma, 139 .enable_dma = esdhc_of_enable_dma,
126 .get_max_clock = esdhc_of_get_max_clock, 140 .get_max_clock = esdhc_of_get_max_clock,
127 .get_min_clock = esdhc_of_get_min_clock, 141 .get_min_clock = esdhc_of_get_min_clock,
142#ifdef CONFIG_PM
143 .platform_suspend = esdhc_of_suspend,
144 .platform_resume = esdhc_of_resume,
145#endif
128}; 146};
129 147
130static struct sdhci_pltfm_data sdhci_esdhc_pdata = { 148static struct sdhci_pltfm_data sdhci_esdhc_pdata = {