summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsinghome_lee <singhome_lee@asus.com>2012-09-20 13:54:43 +0800
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-02-03 16:46:22 +0100
commitba18f86d405f3188eb2656dbf629845aa5b4759f (patch)
tree6d43e07781936dd4fbe06910bf92af4f2a1060d0 /include
parentdadec4519ba16fa9fd4d95270d009f08a1811577 (diff)
mmc: core: new discard feature support at Samsung eMMC v4.41+.
Support discard feature if MID field in the CID register is 0x15, EXT.CSD[192] (device version) is 5 and Bit 0 in the EXT.CSD[64] is 1. Also removed REQ_SECURE flag check to avoid kernel hang. This patch is released from samsung. Change-Id: I4023a900680e9bca10c40311b09ed077a22617db (cherry picked from commit 4acc227edfb631d377e14911287c1b73682fc9c2) Conflicts: drivers/mmc/card/block.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h3
-rw-r--r--include/linux/mmc/core.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 85f17ff14e7e..ff194e553634 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -88,6 +88,9 @@ struct mmc_ext_csd {
__kernel_time_t last_tv_sec; /* last time a block was refreshed */
__kernel_time_t last_bkops_tv_sec; /* last time bkops was done */
unsigned int sec_count;
+
+ unsigned int feature_support;
+#define MMC_DISCARD_FEATURE BIT(0)
};
struct sd_scr {
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 0c4472eff796..921c4f6a2e0e 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -154,6 +154,7 @@ extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
#define MMC_ERASE_ARG 0x00000000
#define MMC_SECURE_ERASE_ARG 0x80000000
#define MMC_TRIM_ARG 0x00000001
+#define MMC_DISCARD_ARG 0x00000003
#define MMC_SECURE_TRIM1_ARG 0x80000001
#define MMC_SECURE_TRIM2_ARG 0x80008000
@@ -164,6 +165,7 @@ extern int mmc_erase(struct mmc_card *card, unsigned int from, unsigned int nr,
unsigned int arg);
extern int mmc_can_erase(struct mmc_card *card);
extern int mmc_can_trim(struct mmc_card *card);
+extern int mmc_can_discard(struct mmc_card *card);
extern int mmc_can_secure_erase_trim(struct mmc_card *card);
extern int mmc_erase_group_aligned(struct mmc_card *card, unsigned int from,
unsigned int nr);