mmc: meson-gx: avoid clock glitch when switching to DDR modes
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 23 Apr 2019 09:02:33 +0000 (11:02 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 6 May 2019 09:55:39 +0000 (11:55 +0200)
commitdc38ac8141a664f4cc96306e6de85f68bbee92b9
tree77a605ac3ac07b5f394a7c258181167a20bd2822
parentd5f758f2df8015b8dcf47b6403cc192e4cef734d
mmc: meson-gx: avoid clock glitch when switching to DDR modes

Activating DDR in the Amlogic mmc controller, among other things, will
divide the output clock by 2. So by activating it with clock on, we are
creating a glitch on the output.

Instead, let's deal with DDR when the clock output is off, when setting
the clock.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-gx-mmc.c