summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJack Halpin <jack.halpin@gmail.com>2009-09-29 16:32:24 +0000
committerJack Halpin <jack.halpin@gmail.com>2009-09-29 16:32:24 +0000
commit37265d308b13dc8ef573b2191acd3952cd6ed0e2 (patch)
tree54ebcdc6090c85e5bc73ff92e7e7752b058ae39c /firmware
parent065e8e082a62a04c99bba0032f2faaabf9a6b7cf (diff)
downloadrockbox-37265d308b13dc8ef573b2191acd3952cd6ed0e2.tar.gz
rockbox-37265d308b13dc8ef573b2191acd3952cd6ed0e2.tar.bz2
rockbox-37265d308b13dc8ef573b2191acd3952cd6ed0e2.zip
AMS Sansa: Replace simple write delay with a smarter check on status of MCI FIFO.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22850 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 8260c48a30..f6dd8385b1 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -735,12 +735,8 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK);
- /* Higher speed class cards need a write delay here for some reason */
- if((drive == SD_SLOT_AS3525) && write)
- {
- int delay = 3500;
- while(delay--) asm volatile ("nop\n");
- }
+ /* Wait for FIFO to empty */
+ while(MCI_STATUS(drive) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE));
if(!transfer_error[drive])
{