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
This commit is contained in:
Amaury Pouly 2013-06-16 17:51:28 +02:00
parent 2d12ef6c73
commit 94cb72301d

View file

@ -341,9 +341,8 @@ static int init_sd_card(int drive)
return -6; return -6;
/* CMD6 */ /* 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; return -7;
sleep(HZ/10);
/* go back to STBY state so we can read csd */ /* go back to STBY state so we can read csd */
/* CMD7 w/rca=0: Deselect card to put it in STBY state */ /* CMD7 w/rca=0: Deselect card to put it in STBY state */