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
This commit is contained in:
parent
ba0f8310bc
commit
db8d07589f
1 changed files with 4 additions and 4 deletions
|
@ -542,15 +542,15 @@ static int sd_init_card(const int drive)
|
||||||
/* Switch to to 4 bit widebus mode */
|
/* Switch to to 4 bit widebus mode */
|
||||||
if(sd_wait_for_state(drive, SD_TRAN) < 0)
|
if(sd_wait_for_state(drive, SD_TRAN) < 0)
|
||||||
return -13;
|
return -13;
|
||||||
/* CMD55 */
|
/* CMD55 */ /* Response is requested due to timing issue */
|
||||||
if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_NO_RESP, NULL))
|
if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_RESP, &response))
|
||||||
return -14;
|
return -14;
|
||||||
/* ACMD6 */
|
/* ACMD6 */
|
||||||
if(!send_cmd(drive, SD_SET_BUS_WIDTH, 2, MCI_NO_RESP, NULL))
|
if(!send_cmd(drive, SD_SET_BUS_WIDTH, 2, MCI_NO_RESP, NULL))
|
||||||
return -15;
|
return -15;
|
||||||
mci_delay();
|
mci_delay();
|
||||||
/* CMD55 */
|
/* CMD55 */ /* Response is requested due to timing issue */
|
||||||
if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_NO_RESP, NULL))
|
if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_RESP, &response))
|
||||||
return -16;
|
return -16;
|
||||||
/* ACMD42 */
|
/* ACMD42 */
|
||||||
if(!send_cmd(drive, SD_SET_CLR_CARD_DETECT, 0, MCI_NO_RESP, NULL))
|
if(!send_cmd(drive, SD_SET_CLR_CARD_DETECT, 0, MCI_NO_RESP, NULL))
|
||||||
|
|
Loading…
Reference in a new issue