• [PATCH 0/3] mmc: meson-gx: fixes for v4.14

    From Jerome Brunet@21:1/5 to All on Mon Oct 2 14:30:01 2017
    This patchset fixes the issues reported by Heiner [0] with the odroid-c2.
    In a nutshell, this series does the following:

    * Make sure the mmc clock rate is not set higher than what is requested
    * Reset the tuning values on mmc power cycle instead of POWER_ON
    * Add tuning of the tx phase to the tuning function.

    This fixes the problem seen on the odroid-c2, both for hs200 and hs400.
    To check for regression, this series has also been tested on the gxl libretech-cc

    Ulf, could you please pick this as fixes for v4.14 ?

    [0]: https://lkml.kernel.org/r/e2171288-84ef-82db-2efc-300935e6c062@gmail.com

    Jerome Brunet (3):
    mmc: meson-gx: make sure the clock is rounded down
    mmc: meson-gx: fix rx phase reset
    mmc: meson-gx: include tx phase in the tuning process

    drivers/mmc/host/meson-gx-mmc.c | 26 ++++++++++++++++++++++----
    1 file changed, 22 insertions(+), 4 deletions(-)

    --
    2.13.5

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jerome Brunet@21:1/5 to All on Mon Oct 2 14:30:01 2017
    It has been reported that some platforms (odroid-c2) may require
    a different tx phase setting to operate at high speed (hs200 and hs400)

    To improve the situation, this patch includes tx phase in the tuning
    process.

    Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function")
    Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
    Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
    ---
    drivers/mmc/host/meson-gx-mmc.c | 19 ++++++++++++++++++-
    1 file changed, 18 insertions(+), 1 deletion(-)

    diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 08a55c2e96e1..85745ef179e2 100644
    --- a/drivers/mmc/host/meson-gx-mmc.c
    +++ b/drivers/mmc/host/meson-gx-mmc.c
    @@ -716,6 +716,22 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode,
    static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
    {
    struct meson_host *host = mmc_priv(mmc);
    + int ret;
    +
    + /*
    + * If this is the initial tuning, try to get a sane Rx starting
    + * phase before doing the actual tuning.
    + */
    + if (!mmc->doing_retune) {
    + ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
    +
    + if (ret)
    + return ret;
    + }
    +
    + ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->tx_clk);
    + if (ret)
    + return ret;

    return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
    }
    @@ -746,8 +762,9 @@ static void meson_mmc_set_ios(struct m
  • From Kevin Hilman@21:1/5 to Jerome Brunet on Mon Oct 2 22:50:14 2017
    Jerome Brunet <jbrunet@baylibre.com> writes:

    This patchset fixes the issues reported by Heiner [0] with the odroid-c2.
    In a nutshell, this series does the following:

    * Make sure the mmc clock rate is not set higher than what is requested
    * Reset the tuning values on mmc power cycle instead of POWER_ON
    * Add tuning of the tx phase to the tuning function.

    This fixes the problem seen on the odroid-c2, both for hs200 and hs400.
    To check for regression, this series has also been tested on the gxl libretech-cc

    Ulf, could you please pick this as fixes for v4.14 ?

    [0]: https://lkml.kernel.org/r/e2171288-84ef-82db-2efc-300935e6c062@gmail.com

    Jerome Brunet (3):
    mmc: meson-gx: make sure the clock is rounded down
    mmc: meson-gx: fix rx phase reset
    mmc: meson-gx: include tx phase in the tuning process

    drivers/mmc/host/meson-gx-mmc.c | 26 ++++++++++++++++++++++----
    1 file changed, 22 insertions(+), 4 deletions(-)

    Reviewed-by: Kevin Hilman <khilman@baylibre.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)