summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJack Halpin <jack.halpin@gmail.com>2009-09-30 20:33:40 +0000
committerJack Halpin <jack.halpin@gmail.com>2009-09-30 20:33:40 +0000
commitbf3d60b25e38f1a24fc5f71cae9c4939e64b6679 (patch)
treef2cf59c9769dd6d62d76d8463f355a9073f0bee0 /firmware
parent95f09beba70a1f326b1dee2b452edf3c0c48375c (diff)
downloadrockbox-bf3d60b25e38f1a24fc5f71cae9c4939e64b6679.tar.gz
rockbox-bf3d60b25e38f1a24fc5f71cae9c4939e64b6679.tar.bz2
rockbox-bf3d60b25e38f1a24fc5f71cae9c4939e64b6679.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index f6dd8385b1..9d395ad084 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -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;