mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040
authorRaul E Rangel <rrangel@chromium.org>
Wed, 19 Aug 2020 19:00:19 +0000 (13:00 -0600)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 21 Aug 2020 08:57:20 +0000 (10:57 +0200)
commit61d7437ed13906984c44697970ee792ac6271a31
tree695b66b0e48247150843562b44a3586238d0264c
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040

The AMD eMMC Controller can only use the tuned clock while in HS200 and
HS400 mode. If we switch to a different mode, we need to disable the
tuned clock. If we have previously performed tuning and switch back to
HS200 or HS400, we can re-enable the tuned clock.

Previously the tuned clock was not getting disabled when switching to
DDR52 which is part of the HS400 tuning sequence.

Fixes: 34597a3f60b1 ("mmc: sdhci-acpi: Add support for ACPI HID of AMD Controller with HS400")
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20200819125832.v2.1.Ie8f0689ec9f449203328b37409d1cf06b565f331@changeid
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-acpi.c