summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/cpufreq-pxa3xx.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@gmail.com>2010-09-20 02:09:10 +0200
committerEric Miao <eric.y.miao@gmail.com>2010-10-09 11:07:30 +0200
commitecf89b8a9189462480086f72791eb41f8aa09bfd (patch)
tree90668e0d1098fa5afc0f631c8bc8884c934e9471 /arch/arm/mach-pxa/cpufreq-pxa3xx.c
parentARM: pxa168/teton bga: add board support for i2c and rtc-ds1337 (diff)
downloadlinux-ecf89b8a9189462480086f72791eb41f8aa09bfd.tar.xz
linux-ecf89b8a9189462480086f72791eb41f8aa09bfd.zip
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/cpufreq-pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa3xx.c5
1 files changed, 3 insertions, 2 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)
static unsigned int pxa3xx_cpufreq_get(unsigned int cpu)
{
- return get_clk_frequency_khz(0);
+ return pxa3xx_get_clk_frequency_khz(0);
}
static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy,
@@ -212,7 +212,8 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
policy->cpuinfo.min_freq = 104000;
policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000;
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
- policy->cur = policy->min = policy->max = get_clk_frequency_khz(0);
+ policy->max = pxa3xx_get_clk_frequency_khz(0);
+ policy->cur = policy->min = policy->max;
if (cpu_is_pxa300() || cpu_is_pxa310())
ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa300_freqs));