summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJack Halpin <jack.halpin@gmail.com>2009-09-25 01:38:51 +0000
committerJack Halpin <jack.halpin@gmail.com>2009-09-25 01:38:51 +0000
commit68089db6db83e78fa6637984612c81226a33b02b (patch)
tree12db95b82f09ab29fa34e9f1bb82d7400a6326f0 /firmware
parentf2cd5ec6af19f7ab438c770c3383c3a1741d8e4f (diff)
downloadrockbox-68089db6db83e78fa6637984612c81226a33b02b.tar.gz
rockbox-68089db6db83e78fa6637984612c81226a33b02b.tar.bz2
rockbox-68089db6db83e78fa6637984612c81226a33b02b.zip
AMS Sansa: Add delay for µSD writes to fix CRC failures with class 6 µSD cards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22825 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 995bf932ca..fc5e2f880f 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -735,6 +735,14 @@ 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");
+ }
+
if(!transfer_error[drive])
{
if(!write)