summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata_mmc.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-06-07 21:27:05 +0000
committerJens Arnold <amiconn@rockbox.org>2009-06-07 21:27:05 +0000
commit1d6df54df27cb41c02226678a2c8f9feddd1a1e0 (patch)
tree5fdc6dd98ac0208f5c3351b062063af6914cbefb /firmware/drivers/ata_mmc.c
parentc3182ec333982e961d3babfbdb1125fd5bac7fb8 (diff)
downloadrockbox-1d6df54df27cb41c02226678a2c8f9feddd1a1e0.tar.gz
rockbox-1d6df54df27cb41c02226678a2c8f9feddd1a1e0.zip
Convert a number of places in core and plugins to use the BIT_N() macro instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata_mmc.c')
-rw-r--r--firmware/drivers/ata_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index 5104f8cf97..3396149602 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -450,7 +450,7 @@ static int initialize_card(int card_no)
450 card->tsac = card->tsac * exponent[taac_exp] / 10; 450 card->tsac = card->tsac * exponent[taac_exp] / 10;
451 451
452 /* r2w_factor, write timeout */ 452 /* r2w_factor, write timeout */
453 card->r2w_factor = 1 << card_extract_bits(card->csd, 99, 3); 453 card->r2w_factor = BIT_N(card_extract_bits(card->csd, 99, 3));
454 card->write_timeout = card->read_timeout * card->r2w_factor; 454 card->write_timeout = card->read_timeout * card->r2w_factor;
455 455
456 if (card->r2w_factor > 32) /* Such cards often need extra read delay */ 456 if (card->r2w_factor > 32) /* Such cards often need extra read delay */