summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2021-05-04 18:12:22 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2021-06-14 13:57:37 +0200
commit2c5d42769038045b92160a849aad43c4b3170e2a (patch)
treee2f1d1d0afa53bd7387950840a3c5e0a214e043d /include/linux/mmc
parent4e6306e0b83c6251699c2202e859b55ddf7b8c5f (diff)
mmc: core: Add support for Power Off Notification for SD cards
Rather than only deselecting the SD card via a CMD7, before we cut power to it at system suspend, at runtime suspend or at shutdown, let's add support for a graceful power off sequence via enabling the SD Power Off Notification feature. Note that, the Power Off Notification feature was added in the SD spec v4.x, which is several years ago. However, it's still a bit unclear how often the SD card vendors decides to implement support for it. To validate these changes a Sandisk Extreme PRO A2 64GB has been used, which seems to work nicely. 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-12-ulf.hansson@linaro.org
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/sd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/sd.h b/include/linux/mmc/sd.h
index 43bfc5c39ad4..6727576a8755 100644
--- a/include/linux/mmc/sd.h
+++ b/include/linux/mmc/sd.h
@@ -31,6 +31,7 @@
/* class 11 */
#define SD_READ_EXTR_SINGLE 48 /* adtc [31:0] R1 */
+#define SD_WRITE_EXTR_SINGLE 49 /* adtc [31:0] R1 */
/* OCR bit definitions */
#define SD_OCR_S18R (1 << 24) /* 1.8V switching request */