diff options
author | Alex Frid <afrid@nvidia.com> | 2011-04-22 19:41:41 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-04-29 18:25:30 -0700 |
commit | f12f616fe7aa1108a987ead6e59ff7e8f16f6cc1 (patch) | |
tree | 905e6cdb7bc4fc3c24b99432202c931fea87ac8e /arch/arm/mach-tegra/cpu-tegra3.c | |
parent | 54089592f39b1dbc8a0637541d7ee22f7febe95a (diff) |
ARM: tegra: clock: Clip Tegra3 CPU mode rate limits
Made sure Tegra3 LP CPU mode maximum rate, and G CPU mode minimum rate
are clipped to the entries in cpufreq scaling table.
Change-Id: I4c82b65be3a8680edbb501041a7158d1a7fbbd07
Reviewed-on: http://git-master/r/29703
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra3.c')
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra3.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra3.c b/arch/arm/mach-tegra/cpu-tegra3.c index 45db3cba4e86..baf8ec086291 100644 --- a/arch/arm/mach-tegra/cpu-tegra3.c +++ b/arch/arm/mach-tegra/cpu-tegra3.c @@ -37,7 +37,6 @@ #include "clock.h" #define INITIAL_STATE TEGRA_HP_DISABLED -#define IDLE_HYSTERESIS 100000 #define UP2G0_DELAY_MS 200 #define UP2Gn_DELAY_MS 1000 #define DOWN_DELAY_MS 2000 @@ -62,8 +61,6 @@ static unsigned int idle_bottom_freq; module_param(idle_top_freq, uint, 0644); module_param(idle_bottom_freq, uint, 0644); -static unsigned int lpcpu_max_freq; - static struct clk *cpu_clk; static struct clk *cpu_g_clk; static struct clk *cpu_lp_clk; @@ -340,9 +337,8 @@ int tegra_auto_hotplug_init(struct mutex *cpu_lock) if (IS_ERR(cpu_clk) || IS_ERR(cpu_g_clk) || IS_ERR(cpu_lp_clk)) return -ENOENT; - lpcpu_max_freq = clk_get_max_rate(cpu_lp_clk) / 1000; - idle_top_freq = lpcpu_max_freq; - idle_bottom_freq = idle_top_freq - IDLE_HYSTERESIS; + idle_top_freq = clk_get_max_rate(cpu_lp_clk) / 1000; + idle_bottom_freq = clk_get_min_rate(cpu_g_clk) / 1000; up2g0_delay = msecs_to_jiffies(UP2G0_DELAY_MS); up2gn_delay = msecs_to_jiffies(UP2Gn_DELAY_MS); |