mmc: dw_mmc-rockchip: Skip all phases bigger than 270 degrees

Per design recommendation, it'd better not try to use any phase
which is bigger than 270. Let's officially follow this.

Change-Id: I8dee3eb648d321cc86e0926844cde528dbb5bd95
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
Shawn Lin
2021-10-27 09:55:12 +08:00
committed by Tao Huang
parent 5bb9b625e7
commit 2a53aab5cf

View File

@@ -211,6 +211,9 @@ static int dw_mci_rk3288_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
/* Try each phase and extract good ranges */
for (i = 0; i < priv->num_phases; ) {
/* Cannot guarantee any phases larger than 270 would work well */
if (TUNING_ITERATION_TO_PHASE(i, priv->num_phases) > 270)
break;
clk_set_phase(priv->sample_clk,
TUNING_ITERATION_TO_PHASE(i, priv->num_phases));