diff options
author | Alex Frid <afrid@nvidia.com> | 2010-08-06 18:59:43 -0700 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-08-10 17:20:16 -0700 |
commit | 40d1b1638e78e72b4d2628a391c943e26a35979e (patch) | |
tree | 96a9d87676128b4868c9ba1a9183ecb8a6490f16 | |
parent | c29afd6fd28f6dc0b2483990a6c13b3f41c3d294 (diff) |
[ARM/tegra] clocks: Relaxed undefined tolerance.
Set min/max frequency request boundaries as "unspecified", if tolerance
is not defined. Current code in such case requests exact frequency,
which may not be reached with limited dividers granularity. This should
fix 3D clock boost failure observed on Harmony (bug 717289), and Host
clock configuration failure on Whistler.
Change-Id: Ib13e87f1cd1e4dc0cd48807fedb34d952c710f68
Reviewed-on: http://git-master.nvidia.com/r/4885
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Andrew Howe <ahowe@nvidia.com>
Reviewed-by: Seth Williams <swilliams@nvidia.com>
Tested-by: Seth Williams <swilliams@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/clock_nvrm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/clock_nvrm.c b/arch/arm/mach-tegra/clock_nvrm.c index 9bd5e7fb571a..cc4dde9be1e6 100644 --- a/arch/arm/mach-tegra/clock_nvrm.c +++ b/arch/arm/mach-tegra/clock_nvrm.c @@ -147,7 +147,9 @@ static int tegra_periph_clk_set_rate(struct clk *c, unsigned long rate) min = c->rate_min; freq = max_t(NvRmFreqKHz, c->rate_min, freq); } else { - max = min = freq; + /* If no tolerance, and no low limit - let RM find the + best approximation to the target */ + max = min = NvRmFreqUnspecified; } e = NvRmPowerModuleClockConfig(s_hRmGlobal, c->module, clk_pwr_client, @@ -183,9 +185,9 @@ static unsigned long tegra_periph_clk_get_rate(struct clk *c) static long tegra_periph_clk_round_rate(struct clk *c, unsigned long rate) { NvRmFreqKHz max; - /* TODO: rm reports an unachievable max rate for host */ + /* Keep Host on low power PLLP */ if (c->module == NvRmModuleID_GraphicsHost) - max = 111000; + max = NVRM_PLLP_FIXED_FREQ_KHZ / 2; else max = NvRmPowerModuleGetMaxFrequency(s_hRmGlobal, c->module); return min(((unsigned long)max) * 1000, rate); |