summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJack Halpin <jack.halpin@gmail.com>2009-10-01 03:54:36 +0000
committerJack Halpin <jack.halpin@gmail.com>2009-10-01 03:54:36 +0000
commit1c36835b807c50587e660568327e73e3067a4356 (patch)
treec976c83b426e497e042d3fb5ca225e58553c7f08 /firmware
parent29c06f6c63ebcd52ec60ecfa0bbb08a46cfc96fe (diff)
downloadrockbox-1c36835b807c50587e660568327e73e3067a4356.tar.gz
rockbox-1c36835b807c50587e660568327e73e3067a4356.tar.bz2
rockbox-1c36835b807c50587e660568327e73e3067a4356.zip
AMS Sansa: Replace another simple delay with a more intelligent MCI FIFO status check.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22864 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 9d395ad084..96b10c258a 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -611,9 +611,10 @@ static int sd_select_bank(signed char bank)
wakeup_wait(&transfer_completion_signal, TIMEOUT_BLOCK);
- dma_release();
+ /* Wait for FIFO to empty */
+ while(MCI_STATUS(INTERNAL_AS3525) & (MCI_TX_ACTIVE | MCI_RX_ACTIVE));
- mci_delay();
+ dma_release();
ret = sd_wait_for_state(INTERNAL_AS3525, SD_TRAN);
if (ret < 0)