Skip to content

Commit 723cc3a

Browse files
jbrun3tgregkh
authored andcommitted
Revert "mmc: meson-gx: include tx phase in the tuning process"
commit fe0e580 upstream. This reverts commit 0a44697. This commit was initially intended to fix problems with hs200 and hs400 on some boards, mainly the odroid-c2. The OC2 (Rev 0.2) I have performs well in this modes, so I could not confirm these issues. We've had several reports about the issues being still present on (some) OC2, so apparently, this change does not do what it was supposed to do. Maybe the eMMC signal quality is on the edge on the board. This may explain the variability we see in term of stability, but this is just a guess. Lowering the max_frequency to 100Mhz seems to do trick for those affected by the issue Worse, the commit created new issues (CRC errors and hangs) on other boards, such as the kvim 1 and 2, the p200 or the libretech-cc. According to amlogic, the Tx phase should not be tuned and left in its default configuration, so it is best to just revert the commit. Fixes: 0a44697 ("mmc: meson-gx: include tx phase in the tuning process") Cc: <stable@vger.kernel.org> # 4.14+ Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e8012ff commit 723cc3a

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

‎drivers/mmc/host/meson-gx-mmc.c‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -716,22 +716,6 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode,
716716
static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
717717
{
718718
struct meson_host *host = mmc_priv(mmc);
719-
int ret;
720-
721-
/*
722-
* If this is the initial tuning, try to get a sane Rx starting
723-
* phase before doing the actual tuning.
724-
*/
725-
if (!mmc->doing_retune) {
726-
ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
727-
728-
if (ret)
729-
return ret;
730-
}
731-
732-
ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->tx_clk);
733-
if (ret)
734-
return ret;
735719

736720
return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
737721
}
@@ -762,9 +746,8 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
762746
if (!IS_ERR(mmc->supply.vmmc))
763747
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
764748

765-
/* Reset phases */
749+
/* Reset rx phase */
766750
clk_set_phase(host->rx_clk, 0);
767-
clk_set_phase(host->tx_clk, 270);
768751

769752
break;
770753

0 commit comments

Comments
 (0)