mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
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:
parent
2d12ef6c73
commit
94cb72301d
1 changed files with 1 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue