aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/generic.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-12 11:20:57 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-13 14:38:08 -0500
commit1937f5b91833e2e8e53bcc821fc7a5fbe6ccb9b5 (patch)
tree0d3094976fcec5bd82db27144224f7ec7c9e06c3 /arch/arm/mach-sa1100/generic.c
parentc7baab5d1e97437a2fca63b71d467f193dbebb02 (diff)
ARM: fix sa1100 build
Fix: arch/arm/mach-sa1100/generic.c:117: error: redefinition of 'cpufreq_get' include/linux/cpufreq.h:299: error: previous definition of 'cpufreq_get' was here cpufreq_get() is used on these platforms to tell drivers what the CPU frequency is, and therefore the bus frequency - which is critical for setting the PCMCIA and LCD timings. Adding ifdefs to these drivers to select cpufreq_get() or some other interface adds confusion. Making these drivers use some other interface for the normal paths and cpufreq stuff for the cpufreq notifier is insane as well. (Why x86 can't provide a version of cpufreq_get() which returns the CPU frequency when CPUFREQ is disabled is beyond me, rather than requiring a dummy zero-returning cpufreq_get(). Especially as they do: unsigned long khz = cpufreq_get(cpu); if (!khz) khz = tsc_khz; In other words, if CPUFREQ is disabled, get it from tsc_khz - why not provide a dummy cpufreq_get() which returns tsc_khz?) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/generic.c')
-rw-r--r--arch/arm/mach-sa1100/generic.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 9faea1511c1f..3c1fcd696714 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -58,7 +58,6 @@ static const unsigned short cclk_frequency_100khz[NR_FREQS] = {
58 2802 /* 280.2 MHz */ 58 2802 /* 280.2 MHz */
59}; 59};
60 60
61#if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110)
62/* rounds up(!) */ 61/* rounds up(!) */
63unsigned int sa11x0_freq_to_ppcr(unsigned int khz) 62unsigned int sa11x0_freq_to_ppcr(unsigned int khz)
64{ 63{
@@ -110,17 +109,6 @@ unsigned int sa11x0_getspeed(unsigned int cpu)
110 return cclk_frequency_100khz[PPCR & 0xf] * 100; 109 return cclk_frequency_100khz[PPCR & 0xf] * 100;
111} 110}
112 111
113#else
114/*
115 * We still need to provide this so building without cpufreq works.
116 */
117unsigned int cpufreq_get(unsigned int cpu)
118{
119 return cclk_frequency_100khz[PPCR & 0xf] * 100;
120}
121EXPORT_SYMBOL(cpufreq_get);
122#endif
123
124/* 112/*
125 * This is the SA11x0 sched_clock implementation. This has 113 * This is the SA11x0 sched_clock implementation. This has
126 * a resolution of 271ns, and a maximum value of 32025597s (370 days). 114 * a resolution of 271ns, and a maximum value of 32025597s (370 days).