summaryrefslogtreecommitdiff
path: root/include/linux/mmc/mmc.h
diff options
context:
space:
mode:
authorShridhar Rasal <srasal@nvidia.com>2012-01-25 17:54:30 +0530
committerSimone Willett <swillett@nvidia.com>2012-02-10 13:12:17 -0800
commit506e63fcfb563581c4a0417d424e36a75cf51acf (patch)
treee9bf67c45323f25b73c60418c8a2b68b7355182d /include/linux/mmc/mmc.h
parent9c5ce68dd28bb7d750c47181ebcca6ac6c071eab (diff)
mmc: core: Add support for BKOPS and HPI interrupt
Added support for starting BKOPS and issuing HPI commands which are supported by eMMC v4.41 and eMMC v4.5 cards. Enable BKOPS and HPI interrupt if the host and card support it. Originally reviewed on: http://git-master/r/69778 Bug 919232 Change-Id: I09b33ddc18013e2eeb505fdb28dd8357fa75b569 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/77319 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'include/linux/mmc/mmc.h')
-rw-r--r--include/linux/mmc/mmc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 5a794cb503ea..6c5fc36827fe 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -138,6 +138,7 @@ static inline bool mmc_op_multi(u32 opcode)
#define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */
#define R1_READY_FOR_DATA (1 << 8) /* sx, a */
#define R1_SWITCH_ERROR (1 << 7) /* sx, c */
+#define R1_URGENT_BKOPS (1 << 6) /* sr, a */
#define R1_APP_CMD (1 << 5) /* sr, c */
#define R1_STATE_IDLE 0
@@ -151,6 +152,11 @@ static inline bool mmc_op_multi(u32 opcode)
#define R1_STATE_DIS 8
/*
+ * MMC/SD card state
+ */
+#define R1_STATE_PRG 0x7
+
+/*
* MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS
* R1 is the low order byte; R2 is the next highest byte, when present.
*/
@@ -272,6 +278,9 @@ struct _mmc_csd {
#define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */
#define EXT_CSD_PARTITION_SUPPORT 160 /* RO */
+#define EXT_CSD_HPI_MGMT 161 /* R/W */
+#define EXT_CSD_BKOPS_EN 163 /* R/W */
+#define EXT_CSD_BKOPS_START 164 /* R/W */
#define EXT_CSD_WR_REL_PARAM 166 /* RO */
#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */
#define EXT_CSD_PART_CONFIG 179 /* R/W */
@@ -281,6 +290,7 @@ struct _mmc_csd {
#define EXT_CSD_REV 192 /* RO */
#define EXT_CSD_STRUCTURE 194 /* RO */
#define EXT_CSD_CARD_TYPE 196 /* RO */
+#define EXT_CSD_OUT_OF_INTERRUPT_TIME 198 /* RO */
#define EXT_CSD_PART_SWITCH_TIME 199 /* RO */
#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */
#define EXT_CSD_S_A_TIMEOUT 217 /* RO */
@@ -293,6 +303,9 @@ struct _mmc_csd {
#define EXT_CSD_SEC_ERASE_MULT 230 /* RO */
#define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */
#define EXT_CSD_TRIM_MULT 232 /* RO */
+#define EXT_CSD_BKOPS_STATUS 246 /* RO */
+#define EXT_CSD_BKOPS_SUPPORT 502 /* RO */
+#define EXT_CSD_HPI_FEATURES 503 /* RO */
/*
* EXT_CSD field definitions