diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-04-04 08:54:15 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-05-20 10:04:28 -0400 |
commit | f023f8dd59bf93e29e9b9bd98a92eeef43b1a32a (patch) | |
tree | 404224a1a4b000b37cf5955d9090d0fe247eef20 | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) |
cpufreq: s3c24xx: move cpufreq driver to drivers/cpufreq
This patch moves cpufreq driver of Samsung's ARM based
s3c24xx platform to drivers/cpufreq.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/Kconfig | 47 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/Kconfig | 66 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/Makefile | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/include/mach/s3c2412.h (renamed from arch/arm/mach-s3c24xx/s3c2412.h) | 0 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/cpu-freq-core.h | 10 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/cpu-freq.h | 6 | ||||
-rw-r--r-- | drivers/cpufreq/Kconfig.arm | 58 | ||||
-rw-r--r-- | drivers/cpufreq/Makefile | 5 | ||||
-rw-r--r-- | drivers/cpufreq/s3c2410-cpufreq.c (renamed from arch/arm/mach-s3c24xx/cpufreq-s3c2410.c) | 0 | ||||
-rw-r--r-- | drivers/cpufreq/s3c2412-cpufreq.c (renamed from arch/arm/mach-s3c24xx/cpufreq-s3c2412.c) | 3 | ||||
-rw-r--r-- | drivers/cpufreq/s3c2440-cpufreq.c (renamed from arch/arm/mach-s3c24xx/cpufreq-s3c2440.c) | 0 | ||||
-rw-r--r-- | drivers/cpufreq/s3c24xx-cpufreq-debugfs.c (renamed from arch/arm/mach-s3c24xx/cpufreq-debugfs.c) | 0 | ||||
-rw-r--r-- | drivers/cpufreq/s3c24xx-cpufreq.c (renamed from arch/arm/mach-s3c24xx/cpufreq.c) | 0 |
14 files changed, 100 insertions, 103 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d423d58f938d..f6762794fbb4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -2053,53 +2053,6 @@ menu "CPU Power Management" | |||
2053 | 2053 | ||
2054 | if ARCH_HAS_CPUFREQ | 2054 | if ARCH_HAS_CPUFREQ |
2055 | source "drivers/cpufreq/Kconfig" | 2055 | source "drivers/cpufreq/Kconfig" |
2056 | |||
2057 | config CPU_FREQ_S3C | ||
2058 | bool | ||
2059 | help | ||
2060 | Internal configuration node for common cpufreq on Samsung SoC | ||
2061 | |||
2062 | config CPU_FREQ_S3C24XX | ||
2063 | bool "CPUfreq driver for Samsung S3C24XX series CPUs (EXPERIMENTAL)" | ||
2064 | depends on ARCH_S3C24XX && CPU_FREQ | ||
2065 | select CPU_FREQ_S3C | ||
2066 | help | ||
2067 | This enables the CPUfreq driver for the Samsung S3C24XX family | ||
2068 | of CPUs. | ||
2069 | |||
2070 | For details, take a look at <file:Documentation/cpu-freq>. | ||
2071 | |||
2072 | If in doubt, say N. | ||
2073 | |||
2074 | config CPU_FREQ_S3C24XX_PLL | ||
2075 | bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" | ||
2076 | depends on CPU_FREQ_S3C24XX | ||
2077 | help | ||
2078 | Compile in support for changing the PLL frequency from the | ||
2079 | S3C24XX series CPUfreq driver. The PLL takes time to settle | ||
2080 | after a frequency change, so by default it is not enabled. | ||
2081 | |||
2082 | This also means that the PLL tables for the selected CPU(s) will | ||
2083 | be built which may increase the size of the kernel image. | ||
2084 | |||
2085 | config CPU_FREQ_S3C24XX_DEBUG | ||
2086 | bool "Debug CPUfreq Samsung driver core" | ||
2087 | depends on CPU_FREQ_S3C24XX | ||
2088 | help | ||
2089 | Enable s3c_freq_dbg for the Samsung S3C CPUfreq core | ||
2090 | |||
2091 | config CPU_FREQ_S3C24XX_IODEBUG | ||
2092 | bool "Debug CPUfreq Samsung driver IO timing" | ||
2093 | depends on CPU_FREQ_S3C24XX | ||
2094 | help | ||
2095 | Enable s3c_freq_iodbg for the Samsung S3C CPUfreq core | ||
2096 | |||
2097 | config CPU_FREQ_S3C24XX_DEBUGFS | ||
2098 | bool "Export debugfs for CPUFreq" | ||
2099 | depends on CPU_FREQ_S3C24XX && DEBUG_FS | ||
2100 | help | ||
2101 | Export status information via debugfs. | ||
2102 | |||
2103 | endif | 2056 | endif |
2104 | 2057 | ||
2105 | source "drivers/cpuidle/Kconfig" | 2058 | source "drivers/cpuidle/Kconfig" |
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index f2f7088bfd22..ed8aadc646f9 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -28,7 +28,7 @@ config CPU_S3C2410 | |||
28 | select CPU_ARM920T | 28 | select CPU_ARM920T |
29 | select CPU_LLSERIAL_S3C2410 | 29 | select CPU_LLSERIAL_S3C2410 |
30 | select S3C2410_CLOCK | 30 | select S3C2410_CLOCK |
31 | select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX | 31 | select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ |
32 | select S3C2410_PM if PM | 32 | select S3C2410_PM if PM |
33 | select SAMSUNG_HRT | 33 | select SAMSUNG_HRT |
34 | help | 34 | help |
@@ -204,27 +204,38 @@ config S3C24XX_GPIO_EXTRA128 | |||
204 | Add an extra 128 gpio numbers to the available GPIO pool. This is | 204 | Add an extra 128 gpio numbers to the available GPIO pool. This is |
205 | available for boards that need extra gpios for external devices. | 205 | available for boards that need extra gpios for external devices. |
206 | 206 | ||
207 | config S3C24XX_PLL | ||
208 | bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" | ||
209 | depends on ARM_S3C24XX | ||
210 | help | ||
211 | Compile in support for changing the PLL frequency from the | ||
212 | S3C24XX series CPUfreq driver. The PLL takes time to settle | ||
213 | after a frequency change, so by default it is not enabled. | ||
214 | |||
215 | This also means that the PLL tables for the selected CPU(s) will | ||
216 | be built which may increase the size of the kernel image. | ||
217 | |||
207 | # cpu frequency items common between s3c2410 and s3c2440/s3c2442 | 218 | # cpu frequency items common between s3c2410 and s3c2440/s3c2442 |
208 | 219 | ||
209 | config S3C2410_IOTIMING | 220 | config S3C2410_IOTIMING |
210 | bool | 221 | bool |
211 | depends on CPU_FREQ_S3C24XX | 222 | depends on ARM_S3C24XX_CPUFREQ |
212 | help | 223 | help |
213 | Internal node to select io timing code that is common to the s3c2410 | 224 | Internal node to select io timing code that is common to the s3c2410 |
214 | and s3c2440/s3c2442 cpu frequency support. | 225 | and s3c2440/s3c2442 cpu frequency support. |
215 | 226 | ||
216 | config S3C2410_CPUFREQ_UTILS | 227 | config S3C2410_CPUFREQ_UTILS |
217 | bool | 228 | bool |
218 | depends on CPU_FREQ_S3C24XX | 229 | depends on ARM_S3C24XX_CPUFREQ |
219 | help | 230 | help |
220 | Internal node to select timing code that is common to the s3c2410 | 231 | Internal node to select timing code that is common to the s3c2410 |
221 | and s3c2440/s3c244 cpu frequency support. | 232 | and s3c2440/s3c244 cpu frequency support. |
222 | 233 | ||
223 | # cpu frequency support common to s3c2412, s3c2413 and s3c2442 | 234 | # cpu frequency support common to s3c2412, s3c2413 and s3c2442 |
224 | 235 | ||
225 | config S3C2412_IOTIMING | 236 | config S3C2412_IOTIMING |
226 | bool | 237 | bool |
227 | depends on CPU_FREQ_S3C24XX && (CPU_S3C2412 || CPU_S3C2443) | 238 | depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2412 || CPU_S3C2443) |
228 | help | 239 | help |
229 | Intel node to select io timing code that is common to the s3c2412 | 240 | Intel node to select io timing code that is common to the s3c2412 |
230 | and the s3c2443. | 241 | and the s3c2443. |
@@ -233,16 +244,9 @@ config S3C2412_IOTIMING | |||
233 | 244 | ||
234 | if CPU_S3C2410 | 245 | if CPU_S3C2410 |
235 | 246 | ||
236 | config S3C2410_CPUFREQ | ||
237 | bool | ||
238 | depends on CPU_FREQ_S3C24XX | ||
239 | select S3C2410_CPUFREQ_UTILS | ||
240 | help | ||
241 | CPU Frequency scaling support for S3C2410 | ||
242 | |||
243 | config S3C2410_PLL | 247 | config S3C2410_PLL |
244 | bool | 248 | bool |
245 | depends on S3C2410_CPUFREQ && CPU_FREQ_S3C24XX_PLL | 249 | depends on ARM_S3C2410_CPUFREQ && S3C24XX_PLL |
246 | default y | 250 | default y |
247 | help | 251 | help |
248 | Select the PLL table for the S3C2410 | 252 | Select the PLL table for the S3C2410 |
@@ -278,7 +282,7 @@ config ARCH_BAST | |||
278 | bool "Simtec Electronics BAST (EB2410ITX)" | 282 | bool "Simtec Electronics BAST (EB2410ITX)" |
279 | select ISA | 283 | select ISA |
280 | select MACH_BAST_IDE | 284 | select MACH_BAST_IDE |
281 | select S3C2410_IOTIMING if S3C2410_CPUFREQ | 285 | select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ |
282 | select S3C24XX_DCLK | 286 | select S3C24XX_DCLK |
283 | select S3C24XX_SIMTEC_NOR | 287 | select S3C24XX_SIMTEC_NOR |
284 | select S3C24XX_SIMTEC_PM if PM | 288 | select S3C24XX_SIMTEC_PM if PM |
@@ -385,14 +389,6 @@ config CPU_S3C2412_ONLY | |||
385 | !CPU_S3C2442 && !CPU_S3C2443 | 389 | !CPU_S3C2442 && !CPU_S3C2443 |
386 | default y | 390 | default y |
387 | 391 | ||
388 | config S3C2412_CPUFREQ | ||
389 | bool | ||
390 | depends on CPU_FREQ_S3C24XX | ||
391 | default y | ||
392 | select S3C2412_IOTIMING | ||
393 | help | ||
394 | CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. | ||
395 | |||
396 | config S3C2412_DMA | 392 | config S3C2412_DMA |
397 | bool | 393 | bool |
398 | help | 394 | help |
@@ -494,14 +490,6 @@ endif # CPU_S3C2416 | |||
494 | 490 | ||
495 | if CPU_S3C2440 | 491 | if CPU_S3C2440 |
496 | 492 | ||
497 | config S3C2440_CPUFREQ | ||
498 | bool "S3C2440/S3C2442 CPU Frequency scaling support" | ||
499 | depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442) | ||
500 | default y | ||
501 | select S3C2410_CPUFREQ_UTILS | ||
502 | help | ||
503 | CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs. | ||
504 | |||
505 | config S3C2440_DMA | 493 | config S3C2440_DMA |
506 | bool | 494 | bool |
507 | help | 495 | help |
@@ -521,15 +509,15 @@ config S3C2440_XTAL_16934400 | |||
521 | 509 | ||
522 | config S3C2440_PLL_12000000 | 510 | config S3C2440_PLL_12000000 |
523 | bool | 511 | bool |
524 | depends on S3C2440_CPUFREQ && S3C2440_XTAL_12000000 | 512 | depends on ARM_S3C2440_CPUFREQ && S3C2440_XTAL_12000000 |
525 | default y if CPU_FREQ_S3C24XX_PLL | 513 | default y if S3C24XX_PLL |
526 | help | 514 | help |
527 | PLL tables for S3C2440 or S3C2442 CPUs with 12MHz crystals. | 515 | PLL tables for S3C2440 or S3C2442 CPUs with 12MHz crystals. |
528 | 516 | ||
529 | config S3C2440_PLL_16934400 | 517 | config S3C2440_PLL_16934400 |
530 | bool | 518 | bool |
531 | depends on S3C2440_CPUFREQ && S3C2440_XTAL_16934400 | 519 | depends on ARM_S3C2440_CPUFREQ && S3C2440_XTAL_16934400 |
532 | default y if CPU_FREQ_S3C24XX_PLL | 520 | default y if S3C24XX_PLL |
533 | help | 521 | help |
534 | PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals. | 522 | PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals. |
535 | 523 | ||
@@ -583,7 +571,7 @@ config MACH_NEXCODER_2440 | |||
583 | 571 | ||
584 | config MACH_OSIRIS | 572 | config MACH_OSIRIS |
585 | bool "Simtec IM2440D20 (OSIRIS) module" | 573 | bool "Simtec IM2440D20 (OSIRIS) module" |
586 | select S3C2410_IOTIMING if S3C2440_CPUFREQ | 574 | select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ |
587 | select S3C2440_XTAL_12000000 | 575 | select S3C2440_XTAL_12000000 |
588 | select S3C24XX_DCLK | 576 | select S3C24XX_DCLK |
589 | select S3C24XX_GPIO_EXTRA128 | 577 | select S3C24XX_GPIO_EXTRA128 |
@@ -655,7 +643,7 @@ config MACH_RX1950 | |||
655 | bool "HP iPAQ rx1950" | 643 | bool "HP iPAQ rx1950" |
656 | select I2C | 644 | select I2C |
657 | select PM_H1940 if PM | 645 | select PM_H1940 if PM |
658 | select S3C2410_IOTIMING if S3C2440_CPUFREQ | 646 | select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ |
659 | select S3C2440_XTAL_16934400 | 647 | select S3C2440_XTAL_16934400 |
660 | select S3C24XX_DCLK | 648 | select S3C24XX_DCLK |
661 | select S3C24XX_PWM | 649 | select S3C24XX_PWM |
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile index 6f46ecfc8396..a3b495a4bba0 100644 --- a/arch/arm/mach-s3c24xx/Makefile +++ b/arch/arm/mach-s3c24xx/Makefile | |||
@@ -17,13 +17,11 @@ obj- := | |||
17 | obj-y += common.o | 17 | obj-y += common.o |
18 | 18 | ||
19 | obj-$(CONFIG_CPU_S3C2410) += s3c2410.o | 19 | obj-$(CONFIG_CPU_S3C2410) += s3c2410.o |
20 | obj-$(CONFIG_S3C2410_CPUFREQ) += cpufreq-s3c2410.o | ||
21 | obj-$(CONFIG_S3C2410_DMA) += dma-s3c2410.o | 20 | obj-$(CONFIG_S3C2410_DMA) += dma-s3c2410.o |
22 | obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o | 21 | obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o |
23 | obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o | 22 | obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o |
24 | 23 | ||
25 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o clock-s3c2412.o | 24 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o clock-s3c2412.o |
26 | obj-$(CONFIG_S3C2412_CPUFREQ) += cpufreq-s3c2412.o | ||
27 | obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o | 25 | obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o |
28 | obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o | 26 | obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o |
29 | obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o | 27 | obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o |
@@ -34,7 +32,6 @@ obj-$(CONFIG_S3C2416_PM) += pm-s3c2416.o | |||
34 | obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o | 32 | obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o |
35 | obj-$(CONFIG_CPU_S3C2442) += s3c2442.o | 33 | obj-$(CONFIG_CPU_S3C2442) += s3c2442.o |
36 | obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o | 34 | obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o |
37 | obj-$(CONFIG_S3C2440_CPUFREQ) += cpufreq-s3c2440.o | ||
38 | obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o | 35 | obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o |
39 | obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o | 36 | obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o |
40 | obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o | 37 | obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o |
@@ -59,9 +56,6 @@ obj-$(CONFIG_S3C2412_IOTIMING) += iotiming-s3c2412.o | |||
59 | obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o | 56 | obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o |
60 | obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o | 57 | obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o |
61 | 58 | ||
62 | obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpufreq.o | ||
63 | obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpufreq-debugfs.o | ||
64 | |||
65 | # | 59 | # |
66 | # machine support | 60 | # machine support |
67 | # following is ordered alphabetically by option text. | 61 | # following is ordered alphabetically by option text. |
diff --git a/arch/arm/mach-s3c24xx/s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h index 548ced42cbb7..548ced42cbb7 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.h +++ b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h | |||
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c index 663436d9db01..bd064c05c473 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <plat/cpu-freq-core.h> | 31 | #include <plat/cpu-freq-core.h> |
32 | #include <plat/clock.h> | 32 | #include <plat/clock.h> |
33 | 33 | ||
34 | #include "s3c2412.h" | 34 | #include <mach/s3c2412.h> |
35 | 35 | ||
36 | #define print_ns(x) ((x) / 10), ((x) % 10) | 36 | #define print_ns(x) ((x) / 10), ((x) % 10) |
37 | 37 | ||
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h index 95509d8eb140..d7e17150028a 100644 --- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h +++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h | |||
@@ -202,7 +202,7 @@ extern int s3c_plltab_register(struct cpufreq_frequency_table *plls, | |||
202 | extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); | 202 | extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); |
203 | extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void); | 203 | extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void); |
204 | 204 | ||
205 | #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS | 205 | #ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS |
206 | #define s3c_cpufreq_debugfs_call(x) x | 206 | #define s3c_cpufreq_debugfs_call(x) x |
207 | #else | 207 | #else |
208 | #define s3c_cpufreq_debugfs_call(x) NULL | 208 | #define s3c_cpufreq_debugfs_call(x) NULL |
@@ -259,17 +259,17 @@ extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg, | |||
259 | #define s3c2412_iotiming_set NULL | 259 | #define s3c2412_iotiming_set NULL |
260 | #endif /* CONFIG_S3C2412_IOTIMING */ | 260 | #endif /* CONFIG_S3C2412_IOTIMING */ |
261 | 261 | ||
262 | #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUG | 262 | #ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUG |
263 | #define s3c_freq_dbg(x...) printk(KERN_INFO x) | 263 | #define s3c_freq_dbg(x...) printk(KERN_INFO x) |
264 | #else | 264 | #else |
265 | #define s3c_freq_dbg(x...) do { if (0) printk(x); } while (0) | 265 | #define s3c_freq_dbg(x...) do { if (0) printk(x); } while (0) |
266 | #endif /* CONFIG_CPU_FREQ_S3C24XX_DEBUG */ | 266 | #endif /* CONFIG_ARM_S3C24XX_CPUFREQ_DEBUG */ |
267 | 267 | ||
268 | #ifdef CONFIG_CPU_FREQ_S3C24XX_IODEBUG | 268 | #ifdef CONFIG_ARM_S3C24XX_CPUFREQ_IODEBUG |
269 | #define s3c_freq_iodbg(x...) printk(KERN_INFO x) | 269 | #define s3c_freq_iodbg(x...) printk(KERN_INFO x) |
270 | #else | 270 | #else |
271 | #define s3c_freq_iodbg(x...) do { if (0) printk(x); } while (0) | 271 | #define s3c_freq_iodbg(x...) do { if (0) printk(x); } while (0) |
272 | #endif /* CONFIG_CPU_FREQ_S3C24XX_IODEBUG */ | 272 | #endif /* CONFIG_ARM_S3C24XX_CPUFREQ_IODEBUG */ |
273 | 273 | ||
274 | static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table, | 274 | static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table, |
275 | int index, size_t table_size, | 275 | int index, size_t table_size, |
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq.h b/arch/arm/plat-samsung/include/plat/cpu-freq.h index 80c4a809c721..85517ab962ae 100644 --- a/arch/arm/plat-samsung/include/plat/cpu-freq.h +++ b/arch/arm/plat-samsung/include/plat/cpu-freq.h | |||
@@ -126,7 +126,7 @@ struct s3c_cpufreq_board { | |||
126 | }; | 126 | }; |
127 | 127 | ||
128 | /* Things depending on frequency scaling. */ | 128 | /* Things depending on frequency scaling. */ |
129 | #ifdef CONFIG_CPU_FREQ_S3C | 129 | #ifdef CONFIG_ARM_S3C_CPUFREQ |
130 | #define __init_or_cpufreq | 130 | #define __init_or_cpufreq |
131 | #else | 131 | #else |
132 | #define __init_or_cpufreq __init | 132 | #define __init_or_cpufreq __init |
@@ -134,7 +134,7 @@ struct s3c_cpufreq_board { | |||
134 | 134 | ||
135 | /* Board functions */ | 135 | /* Board functions */ |
136 | 136 | ||
137 | #ifdef CONFIG_CPU_FREQ_S3C | 137 | #ifdef CONFIG_ARM_S3C_CPUFREQ |
138 | extern int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board); | 138 | extern int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board); |
139 | #else | 139 | #else |
140 | 140 | ||
@@ -142,4 +142,4 @@ static inline int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board) | |||
142 | { | 142 | { |
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |
145 | #endif /* CONFIG_CPU_FREQ_S3C */ | 145 | #endif /* CONFIG_ARM_S3C_CPUFREQ */ |
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index f3af18b9acc5..bbcd7199257b 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm | |||
@@ -95,6 +95,56 @@ config ARM_OMAP2PLUS_CPUFREQ | |||
95 | default ARCH_OMAP2PLUS | 95 | default ARCH_OMAP2PLUS |
96 | select CPU_FREQ_TABLE | 96 | select CPU_FREQ_TABLE |
97 | 97 | ||
98 | config ARM_S3C_CPUFREQ | ||
99 | bool | ||
100 | help | ||
101 | Internal configuration node for common cpufreq on Samsung SoC | ||
102 | |||
103 | config ARM_S3C24XX_CPUFREQ | ||
104 | bool "CPUfreq driver for Samsung S3C24XX series CPUs (EXPERIMENTAL)" | ||
105 | depends on ARCH_S3C24XX | ||
106 | select ARM_S3C_CPUFREQ | ||
107 | help | ||
108 | This enables the CPUfreq driver for the Samsung S3C24XX family | ||
109 | of CPUs. | ||
110 | |||
111 | For details, take a look at <file:Documentation/cpu-freq>. | ||
112 | |||
113 | If in doubt, say N. | ||
114 | |||
115 | config ARM_S3C24XX_CPUFREQ_DEBUG | ||
116 | bool "Debug CPUfreq Samsung driver core" | ||
117 | depends on ARM_S3C24XX_CPUFREQ | ||
118 | help | ||
119 | Enable s3c_freq_dbg for the Samsung S3C CPUfreq core | ||
120 | |||
121 | config ARM_S3C24XX_CPUFREQ_IODEBUG | ||
122 | bool "Debug CPUfreq Samsung driver IO timing" | ||
123 | depends on ARM_S3C24XX_CPUFREQ | ||
124 | help | ||
125 | Enable s3c_freq_iodbg for the Samsung S3C CPUfreq core | ||
126 | |||
127 | config ARM_S3C24XX_CPUFREQ_DEBUGFS | ||
128 | bool "Export debugfs for CPUFreq" | ||
129 | depends on ARM_S3C24XX_CPUFREQ && DEBUG_FS | ||
130 | help | ||
131 | Export status information via debugfs. | ||
132 | |||
133 | config ARM_S3C2410_CPUFREQ | ||
134 | bool | ||
135 | depends on ARM_S3C24XX_CPUFREQ && CPU_S3C2410 | ||
136 | select S3C2410_CPUFREQ_UTILS | ||
137 | help | ||
138 | CPU Frequency scaling support for S3C2410 | ||
139 | |||
140 | config ARM_S3C2412_CPUFREQ | ||
141 | bool | ||
142 | depends on ARM_S3C24XX_CPUFREQ && CPU_S3C2412 | ||
143 | default y | ||
144 | select S3C2412_IOTIMING | ||
145 | help | ||
146 | CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. | ||
147 | |||
98 | config ARM_S3C2416_CPUFREQ | 148 | config ARM_S3C2416_CPUFREQ |
99 | bool "S3C2416 CPU Frequency scaling support" | 149 | bool "S3C2416 CPU Frequency scaling support" |
100 | depends on CPU_S3C2416 | 150 | depends on CPU_S3C2416 |
@@ -117,6 +167,14 @@ config ARM_S3C2416_CPUFREQ_VCORESCALE | |||
117 | 167 | ||
118 | If in doubt, say N. | 168 | If in doubt, say N. |
119 | 169 | ||
170 | config ARM_S3C2440_CPUFREQ | ||
171 | bool "S3C2440/S3C2442 CPU Frequency scaling support" | ||
172 | depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2440 || CPU_S3C2442) | ||
173 | select S3C2410_CPUFREQ_UTILS | ||
174 | default y | ||
175 | help | ||
176 | CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs. | ||
177 | |||
120 | config ARM_S3C64XX_CPUFREQ | 178 | config ARM_S3C64XX_CPUFREQ |
121 | bool "Samsung S3C64XX" | 179 | bool "Samsung S3C64XX" |
122 | depends on CPU_S3C6410 | 180 | depends on CPU_S3C6410 |
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 315b9231feb1..6ad0b913ca17 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile | |||
@@ -65,7 +65,12 @@ obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o | |||
65 | obj-$(CONFIG_PXA25x) += pxa2xx-cpufreq.o | 65 | obj-$(CONFIG_PXA25x) += pxa2xx-cpufreq.o |
66 | obj-$(CONFIG_PXA27x) += pxa2xx-cpufreq.o | 66 | obj-$(CONFIG_PXA27x) += pxa2xx-cpufreq.o |
67 | obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o | 67 | obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o |
68 | obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += s3c24xx-cpufreq.o | ||
69 | obj-$(CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS) += s3c24xx-cpufreq-debugfs.o | ||
70 | obj-$(CONFIG_ARM_S3C2410_CPUFREQ) += s3c2410-cpufreq.o | ||
71 | obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq.o | ||
68 | obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o | 72 | obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o |
73 | obj-$(CONFIG_ARM_S3C2440_CPUFREQ) += s3c2440-cpufreq.o | ||
69 | obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o | 74 | obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o |
70 | obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o | 75 | obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o |
71 | obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o | 76 | obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o |
diff --git a/arch/arm/mach-s3c24xx/cpufreq-s3c2410.c b/drivers/cpufreq/s3c2410-cpufreq.c index cfa0dd8723ec..cfa0dd8723ec 100644 --- a/arch/arm/mach-s3c24xx/cpufreq-s3c2410.c +++ b/drivers/cpufreq/s3c2410-cpufreq.c | |||
diff --git a/arch/arm/mach-s3c24xx/cpufreq-s3c2412.c b/drivers/cpufreq/s3c2412-cpufreq.c index 8bf0f3a77476..4645b4898996 100644 --- a/arch/arm/mach-s3c24xx/cpufreq-s3c2412.c +++ b/drivers/cpufreq/s3c2412-cpufreq.c | |||
@@ -25,13 +25,12 @@ | |||
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | 26 | ||
27 | #include <mach/regs-clock.h> | 27 | #include <mach/regs-clock.h> |
28 | #include <mach/s3c2412.h> | ||
28 | 29 | ||
29 | #include <plat/cpu.h> | 30 | #include <plat/cpu.h> |
30 | #include <plat/clock.h> | 31 | #include <plat/clock.h> |
31 | #include <plat/cpu-freq-core.h> | 32 | #include <plat/cpu-freq-core.h> |
32 | 33 | ||
33 | #include "s3c2412.h" | ||
34 | |||
35 | /* our clock resources. */ | 34 | /* our clock resources. */ |
36 | static struct clk *xtal; | 35 | static struct clk *xtal; |
37 | static struct clk *fclk; | 36 | static struct clk *fclk; |
diff --git a/arch/arm/mach-s3c24xx/cpufreq-s3c2440.c b/drivers/cpufreq/s3c2440-cpufreq.c index 72b2cc8a5a85..72b2cc8a5a85 100644 --- a/arch/arm/mach-s3c24xx/cpufreq-s3c2440.c +++ b/drivers/cpufreq/s3c2440-cpufreq.c | |||
diff --git a/arch/arm/mach-s3c24xx/cpufreq-debugfs.c b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c index 9b7b4289d66c..9b7b4289d66c 100644 --- a/arch/arm/mach-s3c24xx/cpufreq-debugfs.c +++ b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c | |||
diff --git a/arch/arm/mach-s3c24xx/cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 3c0e78ede0da..3c0e78ede0da 100644 --- a/arch/arm/mach-s3c24xx/cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c | |||