Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268814
b: refs/heads/master
c: b6fbd29
h: refs/heads/master
v: v3
  • Loading branch information
wwang authored and Greg Kroah-Hartman committed Oct 17, 2011
1 parent 986231b commit 8782a27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 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: 963ff7740d52586a0fb79f459abebf39997d3ae6
refs/heads/master: b6fbd29c8b836246169296869c3103ccecc201ad
31 changes: 15 additions & 16 deletions trunk/drivers/staging/rts_pstor/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3134,41 +3134,40 @@ int reset_sd_card(struct rtsx_chip *chip)

if (chip->sd_ctl & RESET_MMC_FIRST) {
retval = reset_mmc(chip);
if ((retval != STATUS_SUCCESS) && !sd_check_err_code(chip, SD_NO_CARD)) {
if (retval != STATUS_SUCCESS) {
if (sd_check_err_code(chip, SD_NO_CARD))
TRACE_RET(chip, STATUS_FAIL);

retval = reset_sd(chip);
if (retval != STATUS_SUCCESS) {
if (CHECK_PID(chip, 0x5209)) {
retval = sd_change_bank_voltage(chip, SD_IO_3V3);
if (retval != STATUS_SUCCESS) {
TRACE_RET(chip, STATUS_FAIL);
}
}
if (CHECK_PID(chip, 0x5209))
sd_change_bank_voltage(chip, SD_IO_3V3);

TRACE_RET(chip, STATUS_FAIL);
}
}
} else {
retval = reset_sd(chip);
if (retval != STATUS_SUCCESS) {
if (sd_check_err_code(chip, SD_NO_CARD)) {
if (sd_check_err_code(chip, SD_NO_CARD))
TRACE_RET(chip, STATUS_FAIL);
}

if (CHECK_PID(chip, 0x5209)) {
retval = sd_change_bank_voltage(chip, SD_IO_3V3);
if (retval != STATUS_SUCCESS) {
if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
}
}

if (!chip->sd_io) {
if (chip->sd_io) {
TRACE_RET(chip, STATUS_FAIL);
} else {
retval = reset_mmc(chip);
if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
}
}
}

if (retval != STATUS_SUCCESS) {
TRACE_RET(chip, STATUS_FAIL);
}

retval = sd_set_clock_divider(chip, SD_CLK_DIVIDE_0);
if (retval != STATUS_SUCCESS) {
TRACE_RET(chip, STATUS_FAIL);
Expand Down

0 comments on commit 8782a27

Please sign in to comment.