aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2011-10-03 08:33:34 -0400
committerChris Ball <cjb@laptop.org>2011-10-26 16:32:20 -0400
commit66fd8ad5100b5003046aa744a4f12fa31bb831f9 (patch)
treec71aa6ff8b5c4c2919b93630a2315017f4610986 /include/linux/mmc
parent08a7e1dfaa63bf5132b5b7231fcf9a33473c78f5 (diff)
mmc: sdhci-pci: add runtime pm support
Ths patch allows runtime PM for sdhci-pci, runtime suspending after inactivity of 50ms and ensuring runtime resume before SDHC registers are accessed. During runtime suspend, interrupts are masked. The host controller state is restored at runtime resume. For Medfield, the host controller's card detect mechanism is supplanted by an always-on GPIO which provides for card detect wake-up. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/sdhci.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index 5666f3abfab7..e4b69353678d 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -88,6 +88,10 @@ struct sdhci_host {
88/* The read-only detection via SDHCI_PRESENT_STATE register is unstable */ 88/* The read-only detection via SDHCI_PRESENT_STATE register is unstable */
89#define SDHCI_QUIRK_UNSTABLE_RO_DETECT (1<<31) 89#define SDHCI_QUIRK_UNSTABLE_RO_DETECT (1<<31)
90 90
91 unsigned int quirks2; /* More deviations from spec. */
92
93#define SDHCI_QUIRK2_OWN_CARD_DETECTION (1<<0)
94
91 int irq; /* Device IRQ */ 95 int irq; /* Device IRQ */
92 void __iomem *ioaddr; /* Mapped address */ 96 void __iomem *ioaddr; /* Mapped address */
93 97
@@ -115,6 +119,8 @@ struct sdhci_host {
115#define SDHCI_NEEDS_RETUNING (1<<5) /* Host needs retuning */ 119#define SDHCI_NEEDS_RETUNING (1<<5) /* Host needs retuning */
116#define SDHCI_AUTO_CMD12 (1<<6) /* Auto CMD12 support */ 120#define SDHCI_AUTO_CMD12 (1<<6) /* Auto CMD12 support */
117#define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ 121#define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */
122#define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */
123#define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */
118 124
119 unsigned int version; /* SDHCI spec. version */ 125 unsigned int version; /* SDHCI spec. version */
120 126
@@ -125,6 +131,8 @@ struct sdhci_host {
125 unsigned int clock; /* Current clock (MHz) */ 131 unsigned int clock; /* Current clock (MHz) */
126 u8 pwr; /* Current voltage */ 132 u8 pwr; /* Current voltage */
127 133
134 bool runtime_suspended; /* Host is runtime suspended */
135
128 struct mmc_request *mrq; /* Current request */ 136 struct mmc_request *mrq; /* Current request */
129 struct mmc_command *cmd; /* Current command */ 137 struct mmc_command *cmd; /* Current command */
130 struct mmc_data *data; /* Current data request */ 138 struct mmc_data *data; /* Current data request */