summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2021-05-04 18:12:21 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2021-06-14 13:57:36 +0200
commit4e6306e0b83c6251699c2202e859b55ddf7b8c5f (patch)
treee8530ac73b15b0b698a2b7a21b4230136f4e5457 /include/linux/mmc
parentc784f92769ae8eafb2eb489408757528ff7525df (diff)
mmc: core: Read performance enhancements registers for SD cards
In SD spec v6.x the SD function extension registers for performance enhancements were introduced. These registers let the SD card announce supports for various performance related features, like "self-maintenance", "cache" and "command queuing". Let's extend the parsing of SD function extension registers and store the information in the struct mmc_card. This prepares for subsequent changes to implement the complete support for new the performance enhancement features. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Avri Altman <avri.altman@wdc.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Link: https://lore.kernel.org/r/20210504161222.101536-11-ulf.hansson@linaro.org
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/card.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 03a862e93594..2867af0635f8 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -201,6 +201,12 @@ struct sd_ext_reg {
#define SD_EXT_POWER_OFF_NOTIFY (1<<0)
#define SD_EXT_POWER_SUSTENANCE (1<<1)
#define SD_EXT_POWER_DOWN_MODE (1<<2)
+/* Performance Enhancement Function. */
+#define SD_EXT_PERF_FX_EVENT (1<<0)
+#define SD_EXT_PERF_CARD_MAINT (1<<1)
+#define SD_EXT_PERF_HOST_MAINT (1<<2)
+#define SD_EXT_PERF_CACHE (1<<3)
+#define SD_EXT_PERF_CMD_QUEUE (1<<4)
};
struct sdio_cccr {
@@ -305,6 +311,7 @@ struct mmc_card {
struct sd_ssr ssr; /* yet more SD information */
struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
struct sd_ext_reg ext_power; /* SD extension reg for PM */
+ struct sd_ext_reg ext_perf; /* SD extension reg for PERF */
unsigned int sdio_funcs; /* number of SDIO functions */
atomic_t sdio_funcs_probed; /* number of probed SDIO funcs */