forked from len0rd/rockbox
AMS Sansa: Rename variable sdhc to sd_v2 to more accurately reflect the information it holds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22862 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
95f09beba7
commit
bf3d60b25e
1 changed files with 5 additions and 5 deletions
|
@ -243,7 +243,7 @@ static int sd_init_card(const int drive)
|
|||
{
|
||||
unsigned long response;
|
||||
long init_timeout;
|
||||
bool sdhc;
|
||||
bool sd_v2 = false;
|
||||
unsigned long temp_reg[4];
|
||||
int i;
|
||||
|
||||
|
@ -252,10 +252,10 @@ static int sd_init_card(const int drive)
|
|||
|
||||
mci_delay();
|
||||
|
||||
sdhc = false;
|
||||
/* CMD8 Check for v2 sd card */
|
||||
if(send_cmd(drive, SD_SEND_IF_COND, 0x1AA, MCI_RESP|MCI_ARG, &response))
|
||||
if((response & 0xFFF) == 0x1AA)
|
||||
sdhc = true;
|
||||
sd_v2 = true;
|
||||
|
||||
/* timeout for initialization is 1sec, from SD Specification 2.00 */
|
||||
init_timeout = current_tick + HZ;
|
||||
|
@ -272,8 +272,8 @@ static int sd_init_card(const int drive)
|
|||
return -3;
|
||||
}
|
||||
|
||||
/* acmd41 */
|
||||
if(!send_cmd(drive, SD_APP_OP_COND, (sdhc ? 0x40FF8000 : (1<<23)),
|
||||
/* acmd41 If we have a v2 sd card set HCS bit[30] with voltage range */
|
||||
if(!send_cmd(drive, SD_APP_OP_COND, (0x00FF8000 | (sd_v2 ? 1<<30 : 0)),
|
||||
MCI_RESP|MCI_ARG, &card_info[drive].ocr))
|
||||
{
|
||||
return -4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue