diff options
author | Jack Halpin <jack.halpin@gmail.com> | 2009-09-29 16:32:24 +0000 |
---|---|---|
committer | Jack Halpin <jack.halpin@gmail.com> | 2009-09-29 16:32:24 +0000 |
commit | 37265d308b13dc8ef573b2191acd3952cd6ed0e2 (patch) | |
tree | 54ebcdc6090c85e5bc73ff92e7e7752b058ae39c /firmware | |
parent | 065e8e082a62a04c99bba0032f2faaabf9a6b7cf (diff) | |
download | rockbox-37265d308b13dc8ef573b2191acd3952cd6ed0e2.tar.gz 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.c | 8 |
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, | |||
735 | 735 | ||
736 | wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK); | 736 | wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK); |
737 | 737 | ||
738 | /* Higher speed class cards need a write delay here for some reason */ | 738 | /* Wait for FIFO to empty */ |
739 | if((drive == SD_SLOT_AS3525) && write) | 739 | while(MCI_STATUS(drive) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE)); |
740 | { | ||
741 | int delay = 3500; | ||
742 | while(delay--) asm volatile ("nop\n"); | ||
743 | } | ||
744 | 740 | ||
745 | if(!transfer_error[drive]) | 741 | if(!transfer_error[drive]) |
746 | { | 742 | { |