diff options
author | Alex Frid <afrid@nvidia.com> | 2010-10-08 23:03:42 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2010-10-19 17:10:34 -0700 |
commit | b3c5b3ae3c492dcfc49dc1a7265b801398565d3b (patch) | |
tree | 842b59141091f826fb6fb00ecea9dbb8dd0e1bad /drivers | |
parent | d4d4296df579488a0df39266ce43b5b5c61d7b5d (diff) |
[ARM/tegra] clocks: Enabled clock before set rate.
Made sure graphics and sdhci clocks are enabled before the respective
rate is configured.
Change-Id: I2d09ad111321b296a8d8fbb2d4bff02016e12feb
Reviewed-on: http://git-master/r/8272
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/mmc/host/sdhci-tegra.c | 16 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 8f9510c7dea7..684a1c4278b4 100755 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -113,13 +113,6 @@ static void tegra_sdhci_set_clock(struct sdhci_host *sdhost, { struct tegra_sdhci *host = sdhci_priv(sdhost); - if (clock) { - clk_set_rate(host->clk, clock); - sdhost->max_clk = clk_get_rate(host->clk); - dev_dbg(&host->pdev->dev, "clock request: %uKHz. currently " - "%uKHz\n", clock/1000, sdhost->max_clk/1000); - } - if (clock && !host->clk_enable) { clk_enable(host->clk); host->clk_enable = true; @@ -127,6 +120,13 @@ static void tegra_sdhci_set_clock(struct sdhci_host *sdhost, clk_disable(host->clk); host->clk_enable = false; } + + if (clock) { + clk_set_rate(host->clk, clock); + sdhost->max_clk = clk_get_rate(host->clk); + dev_dbg(&host->pdev->dev, "clock request: %uKHz. currently " + "%uKHz\n", clock/1000, sdhost->max_clk/1000); + } } static struct sdhci_ops tegra_sdhci_wp_cd_ops = { @@ -291,8 +291,8 @@ skip_gpio_wp: if (host->pinmux && host->nr_pins) tegra_pinmux_config_tristate_table(host->pinmux, host->nr_pins, TEGRA_TRI_NORMAL); - clk_set_rate(host->clk, host->max_clk); clk_enable(host->clk); + clk_set_rate(host->clk, host->max_clk); host->max_clk = clk_get_rate(host->clk); host->clk_enable = true; diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index 6514f0e85263..9964c0fa7750 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -108,7 +108,9 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name, __func__, name); break; } + clk_enable(mod->clk[i]); clk_set_rate(mod->clk[i], rate); + clk_disable(mod->clk[i]); i++; } |