Commit d002168
authored
drivers/storage/sdcard: updating sector calculation for CSD v2.0
C_SIZE is 22 bits[69:48], which is the low 6 bits of csd[7], 8bits from csd[8], and 8 bits from csd[9]. the high 2 bits of csd[7] are required to be 0, currently, so i'm not masking them off.
The max value for C_SIZE is 0x3FFEFF, so (0x3FFEFF + 1) * 1024 would be 0xFFFC0000, which is still a 32-bit number.
Signed-off-by: Ben Wynn <bwynn@glowie.com>1 parent 3eaf027 commit d002168
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments