summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2011-10-03 15:33:34 +0300
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-10-09 21:50:07 +0200
commitbbb72fe0df531d2fe744e746d670572c551fdc57 (patch)
tree609c1b90af5beed9e0320a9f1a33ccae6e0df898 /include
parent995e5cb4b2e6b96af4b63c8ebc3f4f6c6e5c8d0d (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> (cherry picked from commit 66fd8ad5100b5003046aa744a4f12fa31bb831f9)
Diffstat (limited to 'include')
-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 db86304e1c28..a8b3e54755d1 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -96,6 +96,10 @@ struct sdhci_host {
/* The system physically doesn't support 1.8v, even if the host does */
#define SDHCI_QUIRK2_NO_1_8_V (1ULL<<35)
+ unsigned int quirks2; /* More deviations from spec. */
+
+#define SDHCI_QUIRK2_OWN_CARD_DETECTION (1<<0)
+
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
@@ -123,6 +127,8 @@ struct sdhci_host {
#define SDHCI_NEEDS_RETUNING (1<<5) /* Host needs retuning */
#define SDHCI_AUTO_CMD12 (1<<6) /* Auto CMD12 support */
#define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */
+#define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */
+#define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */
unsigned int version; /* SDHCI spec. version */
@@ -133,6 +139,8 @@ struct sdhci_host {
unsigned int clock; /* Current clock (MHz) */
u8 pwr; /* Current voltage */
+ bool runtime_suspended; /* Host is runtime suspended */
+
struct mmc_request *mrq; /* Current request */
struct mmc_command *cmd; /* Current command */
struct mmc_data *data; /* Current data request */