mmc: tegra: Add clock stabilization delay
Pavan Kunapuli [Tue, 27 Dec 2011 13:12:15 +0000 (18:12 +0530)]
After switching the voltage and enabling the
clock, wait for 1 msec for the clock to become
stable.

Bug 918563

Change-Id: I3cda964280daf739e8898dffb6ba3ed22ff54b14
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/72231
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Tested-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/mmc/host/sdhci-tegra.c

index 423eb62..c429cc7 100644 (file)
@@ -492,6 +492,9 @@ static int tegra_sdhci_signal_voltage_switch(struct sdhci_host *sdhci,
        clk |= SDHCI_CLOCK_CARD_EN;
        sdhci_writew(sdhci, clk, SDHCI_CLOCK_CONTROL);
 
+       /* Wait for 1 msec after enabling clock */
+       mdelay(1);
+
        if (signal_voltage == MMC_SIGNAL_VOLTAGE_180) {
                /* Do Auto Calibration for 1.8V signal voltage */
                val = sdhci_readl(sdhci, SDMMC_AUTO_CAL_CONFIG);