summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2014-12-04 21:42:45 +0200
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:25:48 -0700
commit83d95c50fb7c138177290641436a926ed4700e9b (patch)
treeaa087b9fb555880efbd43af9d3abb190908aac35 /include
parent2023cd8d36564268d3859b64a61b94e9791b2d5f (diff)
mmc: sdio: enable asynchronous interrupt support in 4-bit mode
SDIO 3.0 specification has added the support for asynchronous interrupt period during which card allows the clock to be gated off. Host needs to first read the "Support Asynchronous Interrupt" bit in CCCR register space to check if the card supports the feature or not. If yes and if the host wants to enable the feature, host needs to write '1' to "Enable Asynchronous Interrupt" bit in CCCR register space. This change allows the host controller driver to control whether to enable the asynchronous interrupt in card or not and if the asynchronous interrupt is enabled then clock gating feature would be enabled for such cards. Change-Id: I678cffb63af6a2013640a5eafa6ce9bfad8a51d6 Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> [merez@codeaurora.org: fix CAPS2 index] Signed-off-by: Maya Erez <merez@codeaurora.org> [subhashj@codeaurora.org: fixed trivial merge conflicts] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h3
-rw-r--r--include/linux/mmc/host.h2
-rw-r--r--include/linux/mmc/sdio.h4
3 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 04a6c02d7b32..968bf8b113e6 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -189,7 +189,8 @@ struct sdio_cccr {
wide_bus:1,
high_power:1,
high_speed:1,
- disable_cd:1;
+ disable_cd:1,
+ async_intr_sup:1;
};
struct sdio_cis {
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 959d52b324ec..8b459bdcc797 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -310,6 +310,8 @@ struct mmc_host {
#define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
#define MMC_CAP2_PACKED_WR_CONTROL (1 << 19) /* Allow write packing control */
#define MMC_CAP2_CLK_SCALE (1 << 20) /* Allow dynamic clk scaling */
+/* Allows Asynchronous SDIO irq while card is in 4-bit mode */
+#define MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE (1 << 21)
#define MMC_CAP2_NONHOTPLUG (1 << 25) /*Don't support hotplug*/
mmc_pm_flag_t pm_caps; /* supported pm features */
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h
index 2c274d0530d2..3fc07d701cd1 100644
--- a/include/linux/mmc/sdio.h
+++ b/include/linux/mmc/sdio.h
@@ -164,6 +164,10 @@
#define SDIO_DTSx_SET_TYPE_A (1 << SDIO_DRIVE_DTSx_SHIFT)
#define SDIO_DTSx_SET_TYPE_C (2 << SDIO_DRIVE_DTSx_SHIFT)
#define SDIO_DTSx_SET_TYPE_D (3 << SDIO_DRIVE_DTSx_SHIFT)
+
+#define SDIO_CCCR_INTERRUPT_EXTENSION 0x16
+#define SDIO_SUPPORT_ASYNC_INTR (1<<0)
+#define SDIO_ENABLE_ASYNC_INTR (1<<1)
/*
* Function Basic Registers (FBR)
*/