mmc: sdhci-tegra: Fix switch to HS400ES mode
authorPrathamesh Shete <pshete@nvidia.com>
Tue, 14 Dec 2021 11:36:53 +0000 (17:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:26:03 +0000 (12:26 +0100)
commit4af79153617bd14677a69b4f4c6bb13e3ece2708
treee77bcf00dd9a73eed07e04b098a74e0dd73b5c31
parent9a7ec7979785e97b33a6bbd79b95faa20e4882bb
mmc: sdhci-tegra: Fix switch to HS400ES mode

commit 4fc7261dbab139d3c64c3b618262504e16cfe7ee upstream.

When CMD13 is sent after switching to HS400ES mode, the bus
is operating at either MMC_HIGH_26_MAX_DTR or MMC_HIGH_52_MAX_DTR.
To meet Tegra SDHCI requirement at HS400ES mode, force SDHCI
interface clock to MMC_HS200_MAX_DTR (200 MHz) so that host
controller CAR clock and the interface clock are rate matched.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: dfc9700cef77 ("mmc: tegra: Implement HS400 enhanced strobe")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211214113653.4631-1-pshete@nvidia.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-tegra.c