diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-02-12 23:09:00 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-02-12 23:09:00 +0000 |
commit | b3017c8701b9b4e4ed041e224d163e82f198c10c (patch) | |
tree | ec0f4302e728d8fe6de3d726b8df2c50aa8bd1a8 /firmware | |
parent | c5d00d82b0905edb13310d9713919674c2172e6a (diff) |
Fixed calculation of MMC sector count. Display sector count instead of (rough) size info for debugging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5937 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/ata_mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index b528bdb1e3..7149e111cd 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c @@ -477,8 +477,8 @@ static int initialize_card(int card_no) card->write_timeout = card->read_timeout * card->r2w_factor; /* card size */ - card->numsectors = mmc_extract_bits(card->csd, 54, 12) - * (1 << (mmc_extract_bits(card->csd, 78, 3)+2)); + card->numsectors = (mmc_extract_bits(card->csd, 54, 12) + 1) + * (1 << (mmc_extract_bits(card->csd, 78, 3)+2)); /* switch to full speed */ setup_sci1(card->bitrate_register); |