• Jerome Brunet's avatar
    mmc: meson-gx: work around clk-stop issue · 1e03331d
    Jerome Brunet authored
    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: default avatarKevin Hilman <khilman@baylibre.com>
    Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    1e03331d
meson-gx-mmc.c 28.7 KB