diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2021-05-04 19:12:19 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-06-14 14:57:36 +0300 |
commit | dbea8ae9febdea11cb74d094e6b730987079679e (patch) | |
tree | e522077955039827daae01274d4f03c23b77e1e0 /drivers/mmc/core | |
parent | 41e84fe1647e0d6ec309882bc247667e304c351f (diff) | |
download | linux-dbea8ae9febdea11cb74d094e6b730987079679e.tar.xz |
mmc: core: Parse the SD SCR register for support of CMD48/49 and CMD58/59
In SD spec v4.x the support for CMD48/49 and CMD58/59 were introduced as
optional features. To let the card announce whether it supports the
commands, the SCR register has been extended with corresponding support
bits. Let's parse and store this information for later use.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20210504161222.101536-9-ulf.hansson@linaro.org
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/sd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 2c48d6504101..de7b5f8df550 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -222,7 +222,9 @@ static int mmc_decode_scr(struct mmc_card *card) else card->erased_byte = 0x0; - if (scr->sda_spec3) + if (scr->sda_spec4) + scr->cmds = UNSTUFF_BITS(resp, 32, 4); + else if (scr->sda_spec3) scr->cmds = UNSTUFF_BITS(resp, 32, 2); /* SD Spec says: any SD Card shall set at least bits 0 and 2 */ |