History

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.

Avri Altman committed 7 years ago

Commit 68539e21 parent 01904ff2 files · +7 −0Browse files

Unified · Split

2 files
  1. drivers/mmc/core/sd.c +5 −0
  2. include/linux/mmc/card.h +2 −0
drivers/mmc/core/sd.c+5−0
@@ -209,6 +209,11 @@ static int mmc_decode_scr(struct mmc_card *card) · 208 unmodified lines
209 /* Check if Physical Layer Spec v3.0 is supported */209 /* Check if Physical Layer Spec v3.0 is supported */
210 scr->sda_spec3 = UNSTUFF_BITS(resp, 47, 1);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 if (UNSTUFF_BITS(resp, 55, 1))217 if (UNSTUFF_BITS(resp, 55, 1))
213 card->erased_byte = 0xFF;218 card->erased_byte = 0xFF;
214 else219 else
include/linux/mmc/card.h+2−0
@@ -133,6 +133,8 @@ struct mmc_ext_csd { · 132 unmodified lines
133struct sd_scr {133struct sd_scr {
134 unsigned char sda_vsn;134 unsigned char sda_vsn;
135 unsigned char sda_spec3;135 unsigned char sda_spec3;
136 unsigned char sda_spec4;
137 unsigned char sda_specx;
136 unsigned char bus_widths;138 unsigned char bus_widths;
137#define SD_SCR_BUS_WIDTH_1 (1<<0)139#define SD_SCR_BUS_WIDTH_1 (1<<0)
138#define SD_SCR_BUS_WIDTH_4 (1<<2)140#define SD_SCR_BUS_WIDTH_4 (1<<2)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t