summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@wdc.com>2019-02-06 12:28:06 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2019-02-25 08:40:58 +0100
commit68539e2bc34437d8c5fbcc234dddcc40bd6bb1cb (patch)
tree27a82ede7323877ee4892da0991371845d0d8bf1 /drivers/mmc/core
parentmmc: core: Calculate the discard arg only once (diff)
downloadlinux-68539e2bc34437d8c5fbcc234dddcc40bd6bb1cb.tar.xz
linux-68539e2bc34437d8c5fbcc234dddcc40bd6bb1cb.zip
mmc: core: Indicate SD specs higher than 4.0
SD specs version 4.x and 5.x have a dedicated slices in the SCR register. Higher versions will rely on a combination of the existing fields. Signed-off-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/sd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index bd48b28d641b..c2db94dab711 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -209,6 +209,11 @@ static int mmc_decode_scr(struct mmc_card *card)
/* Check if Physical Layer Spec v3.0 is supported */
scr->sda_spec3 = UNSTUFF_BITS(resp, 47, 1);
+ if (scr->sda_spec3) {
+ scr->sda_spec4 = UNSTUFF_BITS(resp, 42, 1);
+ scr->sda_specx = UNSTUFF_BITS(resp, 38, 4);
+ }
+
if (UNSTUFF_BITS(resp, 55, 1))
card->erased_byte = 0xFF;
else