aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorAvri Altman2019-02-06 13:28:05 +0200
committerUlf Hansson2019-02-25 08:40:58 +0100
commit01904ff77676ca6c88e972906ed204a2dfbabab6 (patch)
tree713125d74fbb619d07ef3271a24a22688cbf80d6 /include/linux/mmc
parenta2b760a60194aaa754dc78dd037d81ee6c3508a1 (diff)
mmc: core: Calculate the discard arg only once
In MMC, the discard arg is a read-only ext_csd parameter - set it once on card init. To be consistent, do that for SD as well even though its discard arg is always 0x0. Signed-off-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/card.h1
-rw-r--r--include/linux/mmc/sd.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 8ef330027b13..e2bbceb80725 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -277,6 +277,7 @@ struct mmc_card {
unsigned int erase_shift; /* if erase unit is power 2 */
unsigned int pref_erase; /* in sectors */
unsigned int eg_boundary; /* don't cross erase-group boundaries */
+ unsigned int erase_arg; /* erase / trim / discard */
u8 erased_byte; /* value of erased bytes */
u32 raw_cid[4]; /* raw card CID */
diff --git a/include/linux/mmc/sd.h b/include/linux/mmc/sd.h
index 1ebcf9ba1256..1a6d10fdf682 100644
--- a/include/linux/mmc/sd.h
+++ b/include/linux/mmc/sd.h
@@ -91,4 +91,9 @@
#define SD_SWITCH_ACCESS_DEF 0
#define SD_SWITCH_ACCESS_HS 1
+/*
+ * Erase/discard
+ */
+#define SD_ERASE_ARG 0x00000000
+
#endif /* LINUX_MMC_SD_H */