summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorpkunapuli <pkunapuli@nvidia.com>2010-11-23 16:58:10 +0530
committerNiket Sirsi <nsirsi@nvidia.com>2010-11-29 19:53:16 -0800
commita00898a3a31d04c04ee9e1d3c500c9c8c02f29c1 (patch)
tree3697f1cc3977eed0d5f9e1897c1db700b6ee88be /drivers
parent1ce2f5538e754957fe2f888fbcbccba41c5a6fd6 (diff)
sdhci-tegra:Limiting clock based on platform clock limits.
The requested SD clock will be limited to the maximum supported clock on the platform. Bug 761966 Change-Id: I03cd76ae42f56675f47d185da73352e716f6d255 Reviewed-on: http://git-master/r/11429 Tested-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rwxr-xr-xdrivers/mmc/host/sdhci-tegra.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 60d23213e7d1..18a8eff70579 100755
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -124,6 +124,8 @@ static void tegra_sdhci_set_clock(struct sdhci_host *sdhost,
}
if (clock) {
+ if (clock > host->max_clk)
+ clock = host->max_clk;
clk_set_rate(host->clk, clock);
sdhost->max_clk = clk_get_rate(host->clk);
dev_dbg(&host->pdev->dev, "clock request: %uKHz. currently "