mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
mmc: dw_mmc-rockchip: fix v2 tuning defect
The v2 tuning has a defect, When tuning again, it is possible to choose the phase that was previously selected which cannot work stable. Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I0dcc83bb35567278e8a10f1964f4636573b165ec
This commit is contained in:
@@ -166,7 +166,7 @@ static int dw_mci_v2_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
|
||||
* It's impossible all 4 fixed phase won't be able to work.
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(degrees); i++) {
|
||||
degree = degrees[i] + priv->last_degree;
|
||||
degree = degrees[i] + priv->last_degree + 90;
|
||||
degree = degree % 360;
|
||||
clk_set_phase(priv->sample_clk, degree);
|
||||
if (!mmc_send_tuning(mmc, opcode, NULL))
|
||||
@@ -179,7 +179,7 @@ static int dw_mci_v2_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
|
||||
}
|
||||
|
||||
done:
|
||||
dev_info(host->dev, "Successfully tuned phase to %d\n", degrees[i]);
|
||||
dev_info(host->dev, "Successfully tuned phase to %d\n", degree);
|
||||
priv->last_degree = degree;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user