summaryrefslogtreecommitdiff
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorPavan Kunapuli <pkunapuli@nvidia.com>2012-04-09 19:31:50 +0530
committerSimone Willett <swillett@nvidia.com>2012-04-19 16:24:50 -0700
commitc5f2f507f0c26dffa94cb6ec5299c2d4da059214 (patch)
tree79547572e6b4a81eeab34992738c74d1dddd0c8b /drivers/mmc/host
parentb31946b34507209f26c6d709e23fd1c0cedd25f8 (diff)
mmc: tegra: Disable card and host clk separately
Disable card clock before disabling internal clock to ensure that there are no abnormal clock waveforms. Bug 947058 Change-Id: I98a3f7f63b4380b62bead05f1018d3cddc0ac217 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/95396 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/sdhci-tegra.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index af98cba88ecb..32e287987c69 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -405,6 +405,13 @@ static void tegra_3x_sdhci_set_card_clock(struct sdhci_host *sdhci, unsigned int
if (clock && clock == sdhci->clock)
return;
+ /*
+ * Disable the card clock before disabling the internal
+ * clock to avoid abnormal clock waveforms.
+ */
+ clk = sdhci_readw(sdhci, SDHCI_CLOCK_CONTROL);
+ clk &= ~SDHCI_CLOCK_CARD_EN;
+ sdhci_writew(sdhci, clk, SDHCI_CLOCK_CONTROL);
sdhci_writew(sdhci, 0, SDHCI_CLOCK_CONTROL);
if (clock == 0)