AMSv2: only switch sd cards to high speed mode for for v2 sd cards, just like is done for AMSv1

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28808 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2010-12-12 14:04:07 +00:00
parent 7b3c7db486
commit 9da76f3031

View file

@ -541,23 +541,26 @@ static int sd_init_card(const int drive)
#endif #endif
/* End of Card Identification Mode ************************************/ /* End of Card Identification Mode ************************************/
/* Attempt to switch cards to HS timings, non HS cards just ignore this */ if (sd_v2)
/* CMD7 w/rca: Select card to put it in TRAN state */ {
if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_NO_RESP, NULL)) /* Attempt to switch cards to HS timings, non HS cards just ignore this */
return -7; /* CMD7 w/rca: Select card to put it in TRAN state */
if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_NO_RESP, NULL))
return -7;
if(sd_wait_for_tran_state(drive)) if(sd_wait_for_tran_state(drive))
return -8; return -8;
/* CMD6 */ /* CMD6 */
if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_NO_RESP, NULL)) if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_NO_RESP, NULL))
return -9; return -9;
mci_delay(); mci_delay();
/* We need to go back to STBY state now so we can read csd */ /* We need to go back to STBY state now 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 */
if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL)) if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
return -10; return -10;
}
/* CMD9 send CSD */ /* CMD9 send CSD */
if(!send_cmd(drive, SD_SEND_CSD, card_info[drive].rca, if(!send_cmd(drive, SD_SEND_CSD, card_info[drive].rca,