mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
Give 4-bit mode another chance on AMSv1 since other bugs were fixed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27065 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9b8d53adfe
commit
6e45f87e0f
1 changed files with 20 additions and 0 deletions
|
|
@ -363,6 +363,26 @@ static int sd_init_card(const int drive)
|
||||||
return -10;
|
return -10;
|
||||||
mci_delay();
|
mci_delay();
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
/* Switch to to 4 bit widebus mode */
|
||||||
|
if(sd_wait_for_tran_state(drive) < 0)
|
||||||
|
return -11;
|
||||||
|
/* CMD55 */ /* Response is requested due to timing issue */
|
||||||
|
if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_ARG|MCI_RESP, &response))
|
||||||
|
return -14;
|
||||||
|
/* ACMD42 */
|
||||||
|
if(!send_cmd(drive, SD_SET_CLR_CARD_DETECT, 0, MCI_ARG|MCI_RESP, &response))
|
||||||
|
return -15;
|
||||||
|
/* CMD55 */ /* Response is requested due to timing issue */
|
||||||
|
if(!send_cmd(drive, SD_APP_CMD, card_info[drive].rca, MCI_ARG|MCI_RESP, &response))
|
||||||
|
return -12;
|
||||||
|
/* ACMD6 */
|
||||||
|
if(!send_cmd(drive, SD_SET_BUS_WIDTH, 2, MCI_ARG|MCI_RESP, &response))
|
||||||
|
return -13;
|
||||||
|
/* Now that card is widebus make controller aware */
|
||||||
|
MCI_CLOCK(drive) |= MCI_CLOCK_WIDEBUS;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* enable bank switching
|
* enable bank switching
|
||||||
* without issuing this command, we only have access to 1/4 of the blocks
|
* without issuing this command, we only have access to 1/4 of the blocks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue