OSDN Git Service

mmc: meson-gx: work around clk-stop issue
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 28 Aug 2017 14:29:09 +0000 (16:29 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 13:03:49 +0000 (15:03 +0200)
commit1e03331d6b4340461efefab8b1dee874009ad950
tree048caedd8611802a42eb7ab649c7586b08403a89
parent844c8a75f476696e5e472d904d155d5f583f915d
mmc: meson-gx: work around clk-stop issue

It seems that the mmc clock is also used and required, somehow, by
the controller itself.

It is shown during init, when writing to CFG while the divider is set
to 0 will crash the SoC. During a voltage switch, the controller may
crash and the card may then fail to exit busy state if the clock is
stopped.

To avoid this, it is best to keep the clock running for the controller,
except during rate change. However, we still need to be able to gate
the clock out of the SoC. Let's use the pinmux for this, and fallback
to gpio mode (pulled-down) when we need to gate the clock

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