summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-07-01 19:13:01 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-07-01 19:13:01 +0000
commit93f6e3df246ff50c24524c9d329f27a06e1845db (patch)
tree9a625a9dd00b34fc8cd317840c41f27e0f33ea00 /firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
parent7ab33f165ca92c5cbaa76c57cf861fd4c72b1930 (diff)
downloadrockbox-93f6e3df246ff50c24524c9d329f27a06e1845db.tar.gz
rockbox-93f6e3df246ff50c24524c9d329f27a06e1845db.tar.bz2
rockbox-93f6e3df246ff50c24524c9d329f27a06e1845db.zip
card_extract_bits() take the start bit argument as defined in public SanDisk specifications for SD and MMC, i.e. bit 0 is the lsb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21600 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
index 31a9f7d2b0..6e7f62a2e5 100644
--- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
@@ -1675,12 +1675,12 @@ tCardInfo* card_get_info_target(int card_no)
card.csd[i] = ((unsigned long*)&mmcinfo.csd)[i];
for(i=0; i<4; i++)
card.cid[i] = ((unsigned long*)&mmcinfo.cid)[i];
- temp = card_extract_bits(card.csd, 29, 3);
- card.speed = sd_mantissa[card_extract_bits(card.csd, 25, 4)]
+ temp = card_extract_bits(card.csd, 98, 3);
+ card.speed = sd_mantissa[card_extract_bits(card.csd, 102, 4)]
* sd_exponent[temp > 2 ? 7 : temp + 4];
- card.nsac = 100 * card_extract_bits(card.csd, 16, 8);
- temp = card_extract_bits(card.csd, 13, 3);
- card.taac = sd_mantissa[card_extract_bits(card.csd, 9, 4)]
+ card.nsac = 100 * card_extract_bits(card.csd, 111, 8);
+ temp = card_extract_bits(card.csd, 114, 3);
+ card.taac = sd_mantissa[card_extract_bits(card.csd, 118, 4)]
* sd_exponent[temp] / 10;
card.numblocks = mmcinfo.block_num;
card.blocksize = mmcinfo.block_len;