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.
Unified · Split
| @@ -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 | else | 219 | else |
| @@ -133,6 +133,8 @@ struct mmc_ext_csd { · 132 unmodified lines | |||
| 133 | struct sd_scr { | 133 | struct 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) |