Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Avri Altman and committed by
Ulf Hansson
68539e2b 01904ff7

+7
+5
drivers/mmc/core/sd.c
··· 209 209 /* Check if Physical Layer Spec v3.0 is supported */ 210 210 scr->sda_spec3 = UNSTUFF_BITS(resp, 47, 1); 211 211 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 + 212 217 if (UNSTUFF_BITS(resp, 55, 1)) 213 218 card->erased_byte = 0xFF; 214 219 else
+2
include/linux/mmc/card.h
··· 133 133 struct sd_scr { 134 134 unsigned char sda_vsn; 135 135 unsigned char sda_spec3; 136 + unsigned char sda_spec4; 137 + unsigned char sda_specx; 136 138 unsigned char bus_widths; 137 139 #define SD_SCR_BUS_WIDTH_1 (1<<0) 138 140 #define SD_SCR_BUS_WIDTH_4 (1<<2)