summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-20 04:34:21 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-20 04:34:21 +0000
commitc6b838695ccd141596140dfc9612a1fb07c1c832 (patch)
tree43e7ad902029192cb0e43e3a3ca142addf496f0d /firmware/target
parent92fdebb1f2bd4d2b0ab407614292ebb81bdbb569 (diff)
Revert r26290
If the card is not actively deselected on newer Fuzev2, frequent switches between internal storage and µSD will lock up. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27500 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 65308089b7..836981f321 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -963,6 +963,11 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
dma_release();
+ /* CMD lines are separate, not common, so we need to actively deselect */
+ /* CMD7 w/rca =0 : deselects card & puts it in STBY state */
+ if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
+ return -21;
+
#ifndef BOOTLOADER
sd_enable(false);
led(false);