From 37265d308b13dc8ef573b2191acd3952cd6ed0e2 Mon Sep 17 00:00:00 2001 From: Jack Halpin Date: Tue, 29 Sep 2009 16:32:24 +0000 Subject: 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 --- firmware/target/arm/as3525/ata_sd_as3525.c | 8 ++------ 1 file 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]) { -- cgit v1.2.3