summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Halpin <jack.halpin@gmail.com>2010-05-06 18:53:41 +0000
committerJack Halpin <jack.halpin@gmail.com>2010-05-06 18:53:41 +0000
commitdb8d07589f42b98d4a27e038042d9694b8e9a303 (patch)
tree60ff79004073b225c64212a3d88d2f0052ec10ee
parentba0f8310bcec7dc631a6ce07c0c2c0c9059610f1 (diff)
downloadrockbox-db8d07589f42b98d4a27e038042d9694b8e9a303.tar.gz
rockbox-db8d07589f42b98d4a27e038042d9694b8e9a303.tar.bz2
rockbox-db8d07589f42b98d4a27e038042d9694b8e9a303.zip
ad-as3525v2: Ask for a reponse from SD_APP_CMD to help with timing issues when switching to 4 bit widebus.
Some SD cards were having problems switching to 4 Bit widebus and this solution appears to remedy that. Thanks to Luca_S! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25846 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index aae5e706ae..356deb88f1 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -542,15 +542,15 @@ static int sd_init_card(const int drive)
/* Switch to to 4 bit widebus mode */
if(sd_wait_for_state(drive, SD_TRAN) < 0)
return -13;
- /* CMD55 */
- if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_NO_RESP, NULL))
+ /* CMD55 */ /* Response is requested due to timing issue */
+ if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_RESP, &response))
return -14;
/* ACMD6 */
if(!send_cmd(drive, SD_SET_BUS_WIDTH, 2, MCI_NO_RESP, NULL))
return -15;
mci_delay();
- /* CMD55 */
- if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_NO_RESP, NULL))
+ /* CMD55 */ /* Response is requested due to timing issue */
+ if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_RESP, &response))
return -16;
/* ACMD42 */
if(!send_cmd(drive, SD_SET_CLR_CARD_DETECT, 0, MCI_NO_RESP, NULL))