summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/sdmmc-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 17:51:28 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 18:21:48 +0200
commit94cb72301d31c5eb520404ee0e5e37854f203766 (patch)
treed8c054003b0bc8f65020e715f8b4b4719fa4b45a /firmware/target/arm/imx233/sdmmc-imx233.c
parent2d12ef6c736699dfef5b97d693225e9a4892bde8 (diff)
downloadrockbox-94cb72301d31c5eb520404ee0e5e37854f203766.tar.gz
rockbox-94cb72301d31c5eb520404ee0e5e37854f203766.tar.bz2
rockbox-94cb72301d31c5eb520404ee0e5e37854f203766.zip
imx233: fix sdmmc code
The SD SWITCH command has a result and can take a long time to finish. Ignoring the answer and waiting an arbitrary time is unreliable at best. Change-Id: I1bfbb193952b96598f8bb056bac88220d4edf1fc
Diffstat (limited to 'firmware/target/arm/imx233/sdmmc-imx233.c')
-rw-r--r--firmware/target/arm/imx233/sdmmc-imx233.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c
index 3bdc302ada..8d19ebf6e7 100644
--- a/firmware/target/arm/imx233/sdmmc-imx233.c
+++ b/firmware/target/arm/imx233/sdmmc-imx233.c
@@ -341,9 +341,8 @@ static int init_sd_card(int drive)
return -6;
/* CMD6 */
- if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_NO_RESP, NULL))
+ if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_RESP, NULL))
return -7;
- sleep(HZ/10);
/* go back to STBY state so we can read csd */
/* CMD7 w/rca=0: Deselect card to put it in STBY state */