Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Viresh Kumar and committed by
Kukjin Kim
f023f8dd f722406f

+100 -103
-47
arch/arm/Kconfig
··· 2053 2053 2054 2054 if ARCH_HAS_CPUFREQ 2055 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 2056 endif 2104 2057 2105 2058 source "drivers/cpuidle/Kconfig"
+27 -39
arch/arm/mach-s3c24xx/Kconfig
··· 28 28 select CPU_ARM920T 29 29 select CPU_LLSERIAL_S3C2410 30 30 select S3C2410_CLOCK 31 - select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX 31 + select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ 32 32 select S3C2410_PM if PM 33 33 select SAMSUNG_HRT 34 34 help ··· 204 204 Add an extra 128 gpio numbers to the available GPIO pool. This is 205 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 218 # cpu frequency items common between s3c2410 and s3c2440/s3c2442 208 219 209 220 config S3C2410_IOTIMING 210 221 bool 211 - depends on CPU_FREQ_S3C24XX 222 + depends on ARM_S3C24XX_CPUFREQ 212 223 help 213 224 Internal node to select io timing code that is common to the s3c2410 214 225 and s3c2440/s3c2442 cpu frequency support. 215 226 216 227 config S3C2410_CPUFREQ_UTILS 217 - bool 218 - depends on CPU_FREQ_S3C24XX 219 - help 220 - Internal node to select timing code that is common to the s3c2410 221 - and s3c2440/s3c244 cpu frequency support. 228 + bool 229 + depends on ARM_S3C24XX_CPUFREQ 230 + help 231 + Internal node to select timing code that is common to the s3c2410 232 + and s3c2440/s3c244 cpu frequency support. 222 233 223 234 # cpu frequency support common to s3c2412, s3c2413 and s3c2442 224 235 225 236 config S3C2412_IOTIMING 226 237 bool 227 - depends on CPU_FREQ_S3C24XX && (CPU_S3C2412 || CPU_S3C2443) 238 + depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2412 || CPU_S3C2443) 228 239 help 229 240 Intel node to select io timing code that is common to the s3c2412 230 241 and the s3c2443. ··· 244 233 245 234 if CPU_S3C2410 246 235 247 - config S3C2410_CPUFREQ 248 - bool 249 - depends on CPU_FREQ_S3C24XX 250 - select S3C2410_CPUFREQ_UTILS 251 - help 252 - CPU Frequency scaling support for S3C2410 253 - 254 236 config S3C2410_PLL 255 237 bool 256 - depends on S3C2410_CPUFREQ && CPU_FREQ_S3C24XX_PLL 238 + depends on ARM_S3C2410_CPUFREQ && S3C24XX_PLL 257 239 default y 258 240 help 259 241 Select the PLL table for the S3C2410 ··· 282 278 bool "Simtec Electronics BAST (EB2410ITX)" 283 279 select ISA 284 280 select MACH_BAST_IDE 285 - select S3C2410_IOTIMING if S3C2410_CPUFREQ 281 + select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ 286 282 select S3C24XX_DCLK 287 283 select S3C24XX_SIMTEC_NOR 288 284 select S3C24XX_SIMTEC_PM if PM ··· 389 385 !CPU_S3C2442 && !CPU_S3C2443 390 386 default y 391 387 392 - config S3C2412_CPUFREQ 393 - bool 394 - depends on CPU_FREQ_S3C24XX 395 - default y 396 - select S3C2412_IOTIMING 397 - help 398 - CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. 399 - 400 388 config S3C2412_DMA 401 389 bool 402 390 help ··· 490 494 491 495 if CPU_S3C2440 492 496 493 - config S3C2440_CPUFREQ 494 - bool "S3C2440/S3C2442 CPU Frequency scaling support" 495 - depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442) 496 - default y 497 - select S3C2410_CPUFREQ_UTILS 498 - help 499 - CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs. 500 - 501 497 config S3C2440_DMA 502 498 bool 503 499 help ··· 509 521 510 522 config S3C2440_PLL_12000000 511 523 bool 512 - depends on S3C2440_CPUFREQ && S3C2440_XTAL_12000000 513 - default y if CPU_FREQ_S3C24XX_PLL 524 + depends on ARM_S3C2440_CPUFREQ && S3C2440_XTAL_12000000 525 + default y if S3C24XX_PLL 514 526 help 515 527 PLL tables for S3C2440 or S3C2442 CPUs with 12MHz crystals. 516 528 517 529 config S3C2440_PLL_16934400 518 530 bool 519 - depends on S3C2440_CPUFREQ && S3C2440_XTAL_16934400 520 - default y if CPU_FREQ_S3C24XX_PLL 531 + depends on ARM_S3C2440_CPUFREQ && S3C2440_XTAL_16934400 532 + default y if S3C24XX_PLL 521 533 help 522 534 PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals. 523 535 ··· 571 583 572 584 config MACH_OSIRIS 573 585 bool "Simtec IM2440D20 (OSIRIS) module" 574 - select S3C2410_IOTIMING if S3C2440_CPUFREQ 586 + select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ 575 587 select S3C2440_XTAL_12000000 576 588 select S3C24XX_DCLK 577 589 select S3C24XX_GPIO_EXTRA128 ··· 643 655 bool "HP iPAQ rx1950" 644 656 select I2C 645 657 select PM_H1940 if PM 646 - select S3C2410_IOTIMING if S3C2440_CPUFREQ 658 + select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ 647 659 select S3C2440_XTAL_16934400 648 660 select S3C24XX_DCLK 649 661 select S3C24XX_PWM
-6
arch/arm/mach-s3c24xx/Makefile
··· 17 17 obj-y += common.o 18 18 19 19 obj-$(CONFIG_CPU_S3C2410) += s3c2410.o 20 - obj-$(CONFIG_S3C2410_CPUFREQ) += cpufreq-s3c2410.o 21 20 obj-$(CONFIG_S3C2410_DMA) += dma-s3c2410.o 22 21 obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o 23 22 obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o 24 23 25 24 obj-$(CONFIG_CPU_S3C2412) += s3c2412.o clock-s3c2412.o 26 - obj-$(CONFIG_S3C2412_CPUFREQ) += cpufreq-s3c2412.o 27 25 obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o 28 26 obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o 29 27 obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o ··· 32 34 obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o 33 35 obj-$(CONFIG_CPU_S3C2442) += s3c2442.o 34 36 obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o 35 - obj-$(CONFIG_S3C2440_CPUFREQ) += cpufreq-s3c2440.o 36 37 obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o 37 38 obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o 38 39 obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o ··· 55 58 56 59 obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o 57 60 obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o 58 - 59 - obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpufreq.o 60 - obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpufreq-debugfs.o 61 61 62 62 # 63 63 # machine support
arch/arm/mach-s3c24xx/cpufreq-debugfs.c drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
arch/arm/mach-s3c24xx/cpufreq-s3c2410.c drivers/cpufreq/s3c2410-cpufreq.c
+1 -2
arch/arm/mach-s3c24xx/cpufreq-s3c2412.c drivers/cpufreq/s3c2412-cpufreq.c
··· 25 25 #include <asm/mach/map.h> 26 26 27 27 #include <mach/regs-clock.h> 28 + #include <mach/s3c2412.h> 28 29 29 30 #include <plat/cpu.h> 30 31 #include <plat/clock.h> 31 32 #include <plat/cpu-freq-core.h> 32 - 33 - #include "s3c2412.h" 34 33 35 34 /* our clock resources. */ 36 35 static struct clk *xtal;
arch/arm/mach-s3c24xx/cpufreq-s3c2440.c drivers/cpufreq/s3c2440-cpufreq.c
arch/arm/mach-s3c24xx/cpufreq.c drivers/cpufreq/s3c24xx-cpufreq.c
+1 -1
arch/arm/mach-s3c24xx/iotiming-s3c2412.c
··· 31 31 #include <plat/cpu-freq-core.h> 32 32 #include <plat/clock.h> 33 33 34 - #include "s3c2412.h" 34 + #include <mach/s3c2412.h> 35 35 36 36 #define print_ns(x) ((x) / 10), ((x) % 10) 37 37
arch/arm/mach-s3c24xx/s3c2412.h arch/arm/mach-s3c24xx/include/mach/s3c2412.h
+5 -5
arch/arm/plat-samsung/include/plat/cpu-freq-core.h
··· 202 202 extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); 203 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 206 #define s3c_cpufreq_debugfs_call(x) x 207 207 #else 208 208 #define s3c_cpufreq_debugfs_call(x) NULL ··· 259 259 #define s3c2412_iotiming_set NULL 260 260 #endif /* CONFIG_S3C2412_IOTIMING */ 261 261 262 - #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUG 262 + #ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUG 263 263 #define s3c_freq_dbg(x...) printk(KERN_INFO x) 264 264 #else 265 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 269 #define s3c_freq_iodbg(x...) printk(KERN_INFO x) 270 270 #else 271 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 274 static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table, 275 275 int index, size_t table_size,
+3 -3
arch/arm/plat-samsung/include/plat/cpu-freq.h
··· 126 126 }; 127 127 128 128 /* Things depending on frequency scaling. */ 129 - #ifdef CONFIG_CPU_FREQ_S3C 129 + #ifdef CONFIG_ARM_S3C_CPUFREQ 130 130 #define __init_or_cpufreq 131 131 #else 132 132 #define __init_or_cpufreq __init ··· 134 134 135 135 /* Board functions */ 136 136 137 - #ifdef CONFIG_CPU_FREQ_S3C 137 + #ifdef CONFIG_ARM_S3C_CPUFREQ 138 138 extern int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board); 139 139 #else 140 140 ··· 142 142 { 143 143 return 0; 144 144 } 145 - #endif /* CONFIG_CPU_FREQ_S3C */ 145 + #endif /* CONFIG_ARM_S3C_CPUFREQ */
+58
drivers/cpufreq/Kconfig.arm
··· 95 95 default ARCH_OMAP2PLUS 96 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 148 config ARM_S3C2416_CPUFREQ 99 149 bool "S3C2416 CPU Frequency scaling support" 100 150 depends on CPU_S3C2416 ··· 166 116 tests but not documented in any datasheet. 167 117 168 118 If in doubt, say N. 119 + 120 + config ARM_S3C2440_CPUFREQ 121 + bool "S3C2440/S3C2442 CPU Frequency scaling support" 122 + depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2440 || CPU_S3C2442) 123 + select S3C2410_CPUFREQ_UTILS 124 + default y 125 + help 126 + CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs. 169 127 170 128 config ARM_S3C64XX_CPUFREQ 171 129 bool "Samsung S3C64XX"
+5
drivers/cpufreq/Makefile
··· 65 65 obj-$(CONFIG_PXA25x) += pxa2xx-cpufreq.o 66 66 obj-$(CONFIG_PXA27x) += pxa2xx-cpufreq.o 67 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 72 obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o 73 + obj-$(CONFIG_ARM_S3C2440_CPUFREQ) += s3c2440-cpufreq.o 69 74 obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o 70 75 obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o 71 76 obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o