diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-12 11:20:57 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-13 14:38:08 -0500 |
commit | 1937f5b91833e2e8e53bcc821fc7a5fbe6ccb9b5 (patch) | |
tree | 0d3094976fcec5bd82db27144224f7ec7c9e06c3 /arch | |
parent | c7baab5d1e97437a2fca63b71d467f193dbebb02 (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')
-rw-r--r-- | arch/arm/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/Kconfig | 13 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 12 |
3 files changed, 14 insertions, 16 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cf8a99f19dc4..233a222752c0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -603,6 +603,7 @@ config ARCH_SA1100 | |||
603 | select ARCH_SPARSEMEM_ENABLE | 603 | select ARCH_SPARSEMEM_ENABLE |
604 | select ARCH_MTD_XIP | 604 | select ARCH_MTD_XIP |
605 | select ARCH_HAS_CPUFREQ | 605 | select ARCH_HAS_CPUFREQ |
606 | select CPU_FREQ | ||
606 | select GENERIC_GPIO | 607 | select GENERIC_GPIO |
607 | select GENERIC_TIME | 608 | select GENERIC_TIME |
608 | select GENERIC_CLOCKEVENTS | 609 | select GENERIC_CLOCKEVENTS |
@@ -1359,13 +1360,9 @@ source "drivers/cpufreq/Kconfig" | |||
1359 | 1360 | ||
1360 | config CPU_FREQ_SA1100 | 1361 | config CPU_FREQ_SA1100 |
1361 | bool | 1362 | bool |
1362 | depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT) | ||
1363 | default y | ||
1364 | 1363 | ||
1365 | config CPU_FREQ_SA1110 | 1364 | config CPU_FREQ_SA1110 |
1366 | bool | 1365 | bool |
1367 | depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3) | ||
1368 | default y | ||
1369 | 1366 | ||
1370 | config CPU_FREQ_INTEGRATOR | 1367 | config CPU_FREQ_INTEGRATOR |
1371 | tristate "CPUfreq driver for ARM Integrator CPUs" | 1368 | tristate "CPUfreq driver for ARM Integrator CPUs" |
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 03a7f3857c5e..b17d52f7cc48 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig | |||
@@ -4,6 +4,7 @@ menu "SA11x0 Implementations" | |||
4 | 4 | ||
5 | config SA1100_ASSABET | 5 | config SA1100_ASSABET |
6 | bool "Assabet" | 6 | bool "Assabet" |
7 | select CPU_FREQ_SA1110 | ||
7 | help | 8 | help |
8 | Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 | 9 | Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 |
9 | Microprocessor Development Board (also known as the Assabet). | 10 | Microprocessor Development Board (also known as the Assabet). |
@@ -19,6 +20,7 @@ config ASSABET_NEPONSET | |||
19 | 20 | ||
20 | config SA1100_CERF | 21 | config SA1100_CERF |
21 | bool "CerfBoard" | 22 | bool "CerfBoard" |
23 | select CPU_FREQ_SA1110 | ||
22 | help | 24 | help |
23 | The Intrinsyc CerfBoard is based on the StrongARM 1110 (Discontinued). | 25 | The Intrinsyc CerfBoard is based on the StrongARM 1110 (Discontinued). |
24 | More information is available at: | 26 | More information is available at: |
@@ -45,6 +47,7 @@ endchoice | |||
45 | 47 | ||
46 | config SA1100_COLLIE | 48 | config SA1100_COLLIE |
47 | bool "Sharp Zaurus SL5500" | 49 | bool "Sharp Zaurus SL5500" |
50 | # FIXME: select CPU_FREQ_SA11x0 | ||
48 | select SHARP_LOCOMO | 51 | select SHARP_LOCOMO |
49 | select SHARP_SCOOP | 52 | select SHARP_SCOOP |
50 | select SHARP_PARAM | 53 | select SHARP_PARAM |
@@ -54,6 +57,7 @@ config SA1100_COLLIE | |||
54 | config SA1100_H3100 | 57 | config SA1100_H3100 |
55 | bool "Compaq iPAQ H3100" | 58 | bool "Compaq iPAQ H3100" |
56 | select HTC_EGPIO | 59 | select HTC_EGPIO |
60 | select CPU_FREQ_SA1100 | ||
57 | help | 61 | help |
58 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 62 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
59 | H3100 handheld computer. Information about this machine and the | 63 | H3100 handheld computer. Information about this machine and the |
@@ -64,6 +68,7 @@ config SA1100_H3100 | |||
64 | config SA1100_H3600 | 68 | config SA1100_H3600 |
65 | bool "Compaq iPAQ H3600/H3700" | 69 | bool "Compaq iPAQ H3600/H3700" |
66 | select HTC_EGPIO | 70 | select HTC_EGPIO |
71 | select CPU_FREQ_SA1100 | ||
67 | help | 72 | help |
68 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 73 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
69 | H3600 handheld computer. Information about this machine and the | 74 | H3600 handheld computer. Information about this machine and the |
@@ -74,6 +79,7 @@ config SA1100_H3600 | |||
74 | config SA1100_BADGE4 | 79 | config SA1100_BADGE4 |
75 | bool "HP Labs BadgePAD 4" | 80 | bool "HP Labs BadgePAD 4" |
76 | select SA1111 | 81 | select SA1111 |
82 | select CPU_FREQ_SA1100 | ||
77 | help | 83 | help |
78 | Say Y here if you want to build a kernel for the HP Laboratories | 84 | Say Y here if you want to build a kernel for the HP Laboratories |
79 | BadgePAD 4. | 85 | BadgePAD 4. |
@@ -81,6 +87,7 @@ config SA1100_BADGE4 | |||
81 | config SA1100_JORNADA720 | 87 | config SA1100_JORNADA720 |
82 | bool "HP Jornada 720" | 88 | bool "HP Jornada 720" |
83 | select SA1111 | 89 | select SA1111 |
90 | # FIXME: select CPU_FREQ_SA11x0 | ||
84 | help | 91 | help |
85 | Say Y here if you want to build a kernel for the HP Jornada 720 | 92 | Say Y here if you want to build a kernel for the HP Jornada 720 |
86 | handheld computer. See <http://www.hp.com/jornada/products/720> | 93 | handheld computer. See <http://www.hp.com/jornada/products/720> |
@@ -98,12 +105,14 @@ config SA1100_JORNADA720_SSP | |||
98 | 105 | ||
99 | config SA1100_HACKKIT | 106 | config SA1100_HACKKIT |
100 | bool "HackKit Core CPU Board" | 107 | bool "HackKit Core CPU Board" |
108 | select CPU_FREQ_SA1100 | ||
101 | help | 109 | help |
102 | Say Y here to support the HackKit Core CPU Board | 110 | Say Y here to support the HackKit Core CPU Board |
103 | <http://hackkit.eletztrick.de>; | 111 | <http://hackkit.eletztrick.de>; |
104 | 112 | ||
105 | config SA1100_LART | 113 | config SA1100_LART |
106 | bool "LART" | 114 | bool "LART" |
115 | select CPU_FREQ_SA1100 | ||
107 | help | 116 | help |
108 | Say Y here if you are using the Linux Advanced Radio Terminal | 117 | Say Y here if you are using the Linux Advanced Radio Terminal |
109 | (also known as the LART). See <http://www.lartmaker.nl/> for | 118 | (also known as the LART). See <http://www.lartmaker.nl/> for |
@@ -111,6 +120,7 @@ config SA1100_LART | |||
111 | 120 | ||
112 | config SA1100_PLEB | 121 | config SA1100_PLEB |
113 | bool "PLEB" | 122 | bool "PLEB" |
123 | select CPU_FREQ_SA1100 | ||
114 | help | 124 | help |
115 | Say Y here if you are using version 1 of the Portable Linux | 125 | Say Y here if you are using version 1 of the Portable Linux |
116 | Embedded Board (also known as PLEB). | 126 | Embedded Board (also known as PLEB). |
@@ -119,6 +129,7 @@ config SA1100_PLEB | |||
119 | 129 | ||
120 | config SA1100_SHANNON | 130 | config SA1100_SHANNON |
121 | bool "Shannon" | 131 | bool "Shannon" |
132 | select CPU_FREQ_SA1100 | ||
122 | help | 133 | help |
123 | The Shannon (also known as a Tuxscreen, and also as a IS2630) was a | 134 | The Shannon (also known as a Tuxscreen, and also as a IS2630) was a |
124 | limited edition webphone produced by Philips. The Shannon is a SA1100 | 135 | limited edition webphone produced by Philips. The Shannon is a SA1100 |
@@ -127,6 +138,7 @@ config SA1100_SHANNON | |||
127 | 138 | ||
128 | config SA1100_SIMPAD | 139 | config SA1100_SIMPAD |
129 | bool "Simpad" | 140 | bool "Simpad" |
141 | select CPU_FREQ_SA1110 | ||
130 | help | 142 | help |
131 | The SIEMENS webpad SIMpad is based on the StrongARM 1110. There | 143 | The SIEMENS webpad SIMpad is based on the StrongARM 1110. There |
132 | are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB | 144 | are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB |
@@ -145,3 +157,4 @@ config SA1100_SSP | |||
145 | endmenu | 157 | endmenu |
146 | 158 | ||
147 | endif | 159 | endif |
160 | |||
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(!) */ |
63 | unsigned int sa11x0_freq_to_ppcr(unsigned int khz) | 62 | unsigned 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 | */ | ||
117 | unsigned int cpufreq_get(unsigned int cpu) | ||
118 | { | ||
119 | return cclk_frequency_100khz[PPCR & 0xf] * 100; | ||
120 | } | ||
121 | EXPORT_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). |