Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324999
b: refs/heads/master
c: 9872233
h: refs/heads/master
i:
  324997: c504436
  324995: cec77c7
  324991: 2df8fb1
v: v3
  • Loading branch information
Toshiaki Yamane authored and Greg Kroah-Hartman committed Sep 10, 2012
1 parent 84b3211 commit 554fcd2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94c33a94845b19e16f97d73c4136810130c59b73
refs/heads/master: 9872233c2675df184230eace41177823554dfd36
39 changes: 18 additions & 21 deletions trunk/drivers/staging/rts_pstor/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,15 +444,13 @@ static int sd_check_csd(struct rtsx_chip *chip, char check_wp)
break;
}

if (i == 6) {
if (i == 6)
TRACE_RET(chip, STATUS_FAIL);
}

memcpy(sd_card->raw_csd, rsp + 1, 15);

if (CHECK_PID(chip, 0x5209)) {
if (CHECK_PID(chip, 0x5209))
RTSX_READ_REG(chip, REG_SD_CMD5, sd_card->raw_csd + 15);
}

RTSX_DEBUGP("CSD Response:\n");
RTSX_DUMP(sd_card->raw_csd, 16);
Expand All @@ -463,35 +461,34 @@ static int sd_check_csd(struct rtsx_chip *chip, char check_wp)
trans_speed = rsp[4];
if ((trans_speed & 0x07) == 0x02) {
if ((trans_speed & 0xf8) >= 0x30) {
if (chip->asic_code) {
if (chip->asic_code)
sd_card->sd_clock = 47;
} else {
else
sd_card->sd_clock = CLK_50;
}

} else if ((trans_speed & 0xf8) == 0x28) {
if (chip->asic_code) {
if (chip->asic_code)
sd_card->sd_clock = 39;
} else {
else
sd_card->sd_clock = CLK_40;
}

} else if ((trans_speed & 0xf8) == 0x20) {
if (chip->asic_code) {
if (chip->asic_code)
sd_card->sd_clock = 29;
} else {
else
sd_card->sd_clock = CLK_30;
}

} else if ((trans_speed & 0xf8) >= 0x10) {
if (chip->asic_code) {
if (chip->asic_code)
sd_card->sd_clock = 23;
} else {
else
sd_card->sd_clock = CLK_20;
}

} else if ((trans_speed & 0x08) >= 0x08) {
if (chip->asic_code) {
if (chip->asic_code)
sd_card->sd_clock = 19;
} else {
else
sd_card->sd_clock = CLK_20;
}
} else {
TRACE_RET(chip, STATUS_FAIL);
}
Expand Down Expand Up @@ -521,9 +518,9 @@ static int sd_check_csd(struct rtsx_chip *chip, char check_wp)
}

if (check_wp) {
if (rsp[15] & 0x30) {
if (rsp[15] & 0x30)
chip->card_wp |= SD_CARD;
}

RTSX_DEBUGP("CSD WP Status: 0x%x\n", rsp[15]);
}

Expand Down

0 comments on commit 554fcd2

Please sign in to comment.