Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325020
b: refs/heads/master
c: 282dadb
h: refs/heads/master
v: v3
  • Loading branch information
Toshiaki Yamane authored and Greg Kroah-Hartman committed Sep 10, 2012
1 parent 258e5e5 commit 0c4af9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: 01d410af541c19a5c08a0bb7bdce7e50081a098a
refs/heads/master: 282dadbc4994030b0bec7ea3d59345bde5ab2d82
19 changes: 8 additions & 11 deletions trunk/drivers/staging/rts_pstor/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1572,11 +1572,10 @@ static u8 sd_search_final_phase(struct rtsx_chip *chip, u32 phase_map, u8 tune_d
u8 final_phase = 0xFF;

if (phase_map == 0xFFFFFFFF) {
if (tune_dir == TUNE_RX) {
if (tune_dir == TUNE_RX)
final_phase = (u8)chip->sd_default_rx_phase;
} else {
else
final_phase = (u8)chip->sd_default_tx_phase;
}

goto Search_Finish;
}
Expand Down Expand Up @@ -1617,9 +1616,9 @@ static u8 sd_search_final_phase(struct rtsx_chip *chip, u32 phase_map, u8 tune_d
path[0].start = path[cont_path_cnt - 1].start - MAX_PHASE - 1;
path[0].len += path[cont_path_cnt - 1].len;
path[0].mid = path[0].start + path[0].len / 2;
if (path[0].mid < 0) {
if (path[0].mid < 0)
path[0].mid += MAX_PHASE + 1;
}

cont_path_cnt--;
}

Expand Down Expand Up @@ -1647,23 +1646,21 @@ static u8 sd_search_final_phase(struct rtsx_chip *chip, u32 phase_map, u8 tune_d
int temp_final_phase =
path[final_path_idx].end - (max_len - (6 + temp_mid));

if (temp_final_phase < 0) {
if (temp_final_phase < 0)
final_phase = (u8)(temp_final_phase + MAX_PHASE + 1);
} else {
else
final_phase = (u8)temp_final_phase;
}
}
} else if (CHK_SD_SDR50(sd_card)) {
if (max_len > 12) {
int temp_mid = (max_len - 13) / 2;
int temp_final_phase =
path[final_path_idx].end - (max_len - (3 + temp_mid));

if (temp_final_phase < 0) {
if (temp_final_phase < 0)
final_phase = (u8)(temp_final_phase + MAX_PHASE + 1);
} else {
else
final_phase = (u8)temp_final_phase;
}
}
}
}
Expand Down

0 comments on commit 0c4af9d

Please sign in to comment.