From 816ab05de4f2171e20171db01fa916634ed7bee6 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Tue, 7 Dec 2010 11:19:20 -0800 Subject: [ARM/tegra] Add Tegra3 support Bug 764354 Original-Change-Id: I8a390eb4dae87dceacb97461f23d13554868b046 Reviewed-on: http://git-master/r/12228 Reviewed-by: Scott Williams Tested-by: Scott Williams Original-Change-Id: I8e6b8303898796419fb5a759cd16edff9aeac081 Rebase-Id: R2866240384c6c24f46bd7ef54bc3dc9140d9e96b --- arch/arm/mach-tegra/cpu-tegra.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-tegra/cpu-tegra.c') diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index 5ffb8549af51..3da60ac97072 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -39,12 +39,11 @@ static struct cpufreq_frequency_table *freq_table; -#define NUM_CPUS 2 static struct clk *cpu_clk; static struct clk *emc_clk; -static unsigned long target_cpu_speed[NUM_CPUS]; +static unsigned long target_cpu_speed[CONFIG_NR_CPUS]; static DEFINE_MUTEX(tegra_cpu_lock); static bool is_suspended; @@ -194,7 +193,7 @@ unsigned int tegra_getspeed(unsigned int cpu) { unsigned long rate; - if (cpu >= NUM_CPUS) + if (cpu >= CONFIG_NR_CPUS) return 0; rate = clk_get_rate(cpu_clk) / 1000; @@ -311,7 +310,7 @@ static struct notifier_block tegra_cpu_pm_notifier = { static int tegra_cpu_init(struct cpufreq_policy *policy) { - if (policy->cpu >= NUM_CPUS) + if (policy->cpu >= CONFIG_NR_CPUS) return -EINVAL; cpu_clk = clk_get_sys(NULL, "cpu"); -- cgit v1.2.3