aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAapo Vienamo <[email protected]>2018-08-30 18:06:18 +0300
committerUlf Hansson <[email protected]>2018-10-08 11:40:43 +0200
commit44babea2ea53dd8a98657fad9a5d9323522113eb (patch)
treee88112919db96d53277a4e7471dd83e090798cd1
parent51b77c8ea784979b857ef3ef26b81c360e3a22a5 (diff)
mmc: tegra: Perform pad calibration after voltage switch
Run the automatic pad calibration after voltage switching if tegra_host->pad_calib_required is set. Signed-off-by: Aapo Vienamo <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r--drivers/mmc/host/sdhci-tegra.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index a3e31f18db48..71b3b3e1c648 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -587,6 +587,8 @@ static int sdhci_tegra_start_signal_voltage_switch(struct mmc_host *mmc,
struct mmc_ios *ios)
{
struct sdhci_host *host = mmc_priv(mmc);
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+ struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host);
int ret = 0;
if (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_330) {
@@ -601,6 +603,9 @@ static int sdhci_tegra_start_signal_voltage_switch(struct mmc_host *mmc,
ret = tegra_sdhci_set_padctrl(host, ios->signal_voltage);
}
+ if (tegra_host->pad_calib_required)
+ tegra_sdhci_pad_autocalib(host);
+
return ret;
}