Skip to content

Commit 68539e2

Browse files
Avri AltmanUlf Hansson
authored andcommitted
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>
1 parent 01904ff commit 68539e2

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/mmc/core/sd.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ static int mmc_decode_scr(struct mmc_card *card)
209209
/* Check if Physical Layer Spec v3.0 is supported */
210210
scr->sda_spec3 = UNSTUFF_BITS(resp, 47, 1);
211211

212+
if (scr->sda_spec3) {
213+
scr->sda_spec4 = UNSTUFF_BITS(resp, 42, 1);
214+
scr->sda_specx = UNSTUFF_BITS(resp, 38, 4);
215+
}
216+
212217
if (UNSTUFF_BITS(resp, 55, 1))
213218
card->erased_byte = 0xFF;
214219
else

‎include/linux/mmc/card.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ struct mmc_ext_csd {
133133
struct sd_scr {
134134
unsigned char sda_vsn;
135135
unsigned char sda_spec3;
136+
unsigned char sda_spec4;
137+
unsigned char sda_specx;
136138
unsigned char bus_widths;
137139
#define SD_SCR_BUS_WIDTH_1 (1<<0)
138140
#define SD_SCR_BUS_WIDTH_4 (1<<2)

0 commit comments

Comments
 (0)