aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@gmail.com>2010-09-19 20:09:10 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-10-09 05:07:30 -0400
commitecf89b8a9189462480086f72791eb41f8aa09bfd (patch)
tree90668e0d1098fa5afc0f631c8bc8884c934e9471 /arch/arm/mach-pxa
parent759305c62f294d4f5fb1d8dde5ece98d2f71cfcb (diff)
ARM: pxa: reduce the scope of get_clk_frequency_khz()
get_clk_frequency_khz() is used in private cpufreq driver. In order to meet the change of different pxa silicons, checking cpuid is introduced in get_clk_frequency_khz(). While more pxa silicons are supported, the workload of checking cpuid is higher. So restrict the scope of get_clk_frequency_khz() on pxa2xx. Different pxa silcions use different private cpufreq driver to avoid too much checking on cpuid. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa3xx.c5
-rw-r--r--arch/arm/mach-pxa/generic.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/cpufreq-pxa3xx.c b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
index 0a0d0fe99220..88fbec05ec50 100644
--- a/arch/arm/mach-pxa/cpufreq-pxa3xx.c
+++ b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
@@ -159,7 +159,7 @@ static int pxa3xx_cpufreq_verify(struct cpufreq_policy *policy)
159 159
160static unsigned int pxa3xx_cpufreq_get(unsigned int cpu) 160static unsigned int pxa3xx_cpufreq_get(unsigned int cpu)
161{ 161{
162 return get_clk_frequency_khz(0); 162 return pxa3xx_get_clk_frequency_khz(0);
163} 163}
164 164
165static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy, 165static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy,
@@ -212,7 +212,8 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
212 policy->cpuinfo.min_freq = 104000; 212 policy->cpuinfo.min_freq = 104000;
213 policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000; 213 policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000;
214 policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ 214 policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
215 policy->cur = policy->min = policy->max = get_clk_frequency_khz(0); 215 policy->max = pxa3xx_get_clk_frequency_khz(0);
216 policy->cur = policy->min = policy->max;
216 217
217 if (cpu_is_pxa300() || cpu_is_pxa310()) 218 if (cpu_is_pxa300() || cpu_is_pxa310())
218 ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa300_freqs)); 219 ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa300_freqs));
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index baabb3ce088e..6655dea11c2f 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -66,8 +66,7 @@ unsigned int get_clk_frequency_khz(int info)
66 return pxa25x_get_clk_frequency_khz(info); 66 return pxa25x_get_clk_frequency_khz(info);
67 else if (cpu_is_pxa27x()) 67 else if (cpu_is_pxa27x())
68 return pxa27x_get_clk_frequency_khz(info); 68 return pxa27x_get_clk_frequency_khz(info);
69 else 69 return 0;
70 return pxa3xx_get_clk_frequency_khz(info);
71} 70}
72EXPORT_SYMBOL(get_clk_frequency_khz); 71EXPORT_SYMBOL(get_clk_frequency_khz);
73 72