From 0cae7d3134700e6e89b502e4876c415deaead1b7 Mon Sep 17 00:00:00 2001 From: funman Date: Tue, 20 Jul 2010 04:34:21 +0000 Subject: [PATCH] Revert r26290 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- firmware/target/arm/as3525/sd-as3525v2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 65308089b..836981f32 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); -- 2.11.4.GIT