summaryrefslogtreecommitdiff
path: root/firmware/drivers/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/sd.c')
-rw-r--r--firmware/drivers/sd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/drivers/sd.c b/firmware/drivers/sd.c
index 6185d5382d..ca83498087 100644
--- a/firmware/drivers/sd.c
+++ b/firmware/drivers/sd.c
@@ -49,6 +49,13 @@ void sd_parse_csd(tCardInfo *card)
49 c_size = card_extract_bits(card->csd, 69, 22) + 1; 49 c_size = card_extract_bits(card->csd, 69, 22) + 1;
50 card->numblocks = c_size << 10; 50 card->numblocks = c_size << 10;
51 } 51 }
52 else if(csd_version == 2)
53 {
54 /* CSD version 3.0 */
55 c_size = card_extract_bits(card->csd, 75, 28) + 1;
56 card->numblocks = c_size << 10;
57 }
58 card->sd2plus = csd_version >= 1;
52 59
53 card->blocksize = 512; /* Always use 512 byte blocks */ 60 card->blocksize = 512; /* Always use 512 byte blocks */
54 61
@@ -62,7 +69,9 @@ void sd_parse_csd(tCardInfo *card)
62 69
63 card->r2w_factor = card_extract_bits(card->csd, 28, 3); 70 card->r2w_factor = card_extract_bits(card->csd, 28, 3);
64 71
65 logf("CSD%d.0 numblocks:%ld speed:%ld", csd_version+1, card->numblocks, card->speed); 72
73
74 logf("CSD%d.0 numblocks:%lld speed:%ld", csd_version+1, card->numblocks, card->speed);
66 logf("nsac: %d taac: %ld r2w: %d", card->nsac, card->taac, card->r2w_factor); 75 logf("nsac: %d taac: %ld r2w: %d", card->nsac, card->taac, card->r2w_factor);
67} 76}
68 77
@@ -99,4 +108,3 @@ void sd_get_info(IF_MD(int drive,) struct storage_info *info)
99 info->revision="0.00"; 108 info->revision="0.00";
100} 109}
101#endif 110#endif
102