[PATCH 5/6] Change the Kconfig and Makefile to support the new framework

1 message Options
Embed this post
Permalink
Michael Trimarchi

[PATCH 5/6] Change the Kconfig and Makefile to support the new framework

Reply Threaded More More options
Print post
Permalink



From cfee6de25b14df1ecd47aa880d24d1eb71d3f11e Mon Sep 17 00:00:00 2001
From: michael <[hidden email]>
Date: Fri, 30 Oct 2009 18:26:07 +0100
Subject: [PATCH 5/6] Change the Kconfig and Makefile to support the new framework

Signed-off-by: Michael Trimarchi <[hidden email]>
---
 arch/arm/Kconfig               |   40 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-s3c2442/Kconfig  |    1 +
 arch/arm/plat-s3c24xx/Kconfig  |   24 ++++++++++++++++++++++++
 arch/arm/plat-s3c24xx/Makefile |    3 +++
 4 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2dfd1c2..35ea9dc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1131,6 +1131,46 @@ config CPU_FREQ_S3C64XX
  bool "CPUfreq support for S3C64xx CPUs"
  depends on CPU_FREQ && CPU_S3C6410
 
+config CPU_FREQ_S3C
+ bool
+ help
+  Internal configuration node for common cpufreq on Samsung SoC
+
+config CPU_FREQ_S3C24XX
+ bool "CPUfreq driver for Samsung S3C24XX series CPUs"
+ depends on ARCH_S3C2410 && CPU_FREQ && EXPERIMENTAL
+ select CPU_FREQ_S3C
+ help
+  This enables the CPUfreq driver for the Samsung S3C24XX family
+  of CPUs.
+
+  For details, take a look at <file:Documentation/cpu-freq>.
+
+  If in doubt, say N.
+
+config CPU_FREQ_S3C24XX_PLL
+ bool "Support CPUfreq changing of PLL frequency"
+ depends on CPU_FREQ_S3C24XX && EXPERIMENTAL
+ help
+  Compile in support for changing the PLL frequency from the
+  S3C24XX series CPUfreq driver. The PLL takes time to settle
+  after a frequency change, so by default it is not enabled.
+
+  This also means that the PLL tables for the selected CPU(s) will
+  be built which may increase the size of the kernel image.
+
+config CPU_FREQ_S3C24XX_DEBUG
+ bool "Debug CPUfreq Samsung driver core"
+ depends on CPU_FREQ_S3C24XX
+ help
+  Enable s3c_freq_dbg for the Samsung S3C CPUfreq core
+
+config CPU_FREQ_S3C24XX_DEBUGFS
+ bool "Export debugfs for CPUFreq"
+ depends on CPU_FREQ_S3C24XX && DEBUG_FS
+ help
+  Export status information via debugfs.
+
 endif
 
 source "drivers/cpuidle/Kconfig"
diff --git a/arch/arm/mach-s3c2442/Kconfig b/arch/arm/mach-s3c2442/Kconfig
index 13fb5e1..3bc08f4 100644
--- a/arch/arm/mach-s3c2442/Kconfig
+++ b/arch/arm/mach-s3c2442/Kconfig
@@ -14,6 +14,7 @@ config CPU_S3C2442
  select S3C2440_DMA if S3C2410_DMA
  select CPU_S3C244X
  select CPU_LLSERIAL_S3C2440
+ select S3C2410_IOTIMING if S3C2440_CPUFREQ
  help
   Support for S3C2442 Samsung Mobile CPU based systems.
 
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index ba2ea85..2eba3cb 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -35,6 +35,14 @@ config CPU_S3C244X
  help
   Support for S3C2440 and S3C2442 Samsung Mobile CPU based systems.
 
+config S3C2440_CPUFREQ
+ bool "S3C2440/S3C2442 CPU Frequency scaling support"
+ depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442)
+ select S3C2410_CPUFREQ_UTILS
+ default y
+ help
+  CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs.
+
 config S3C24XX_PWM
  bool "PWM device support"
  select HAVE_PWM
@@ -108,6 +116,22 @@ config S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7
 
 # common code for s3c24xx based machines, such as the SMDKs.
 
+# cpu frequency items common between s3c2410 and s3c2440/s3c2442
+
+config S3C2410_IOTIMING
+ bool
+ depends on CPU_FREQ_S3C24XX
+ help
+  Internal node to select io timing code that is common to the s3c2410
+  and s3c2440/s3c2442 cpu frequency support.
+
+config S3C2410_CPUFREQ_UTILS
+ bool
+ depends on CPU_FREQ_S3C24XX
+ help
+  Internal node to select timing code that is common to the s3c2410
+  and s3c2440/s3c244 cpu frequency support.
+
 config MACH_SMDK
  bool
  help
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index f135051..ef659b3 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o
 obj-$(CONFIG_CPU_S3C244X) += s3c244x.o
 obj-$(CONFIG_CPU_S3C244X) += s3c244x-irq.o
 obj-$(CONFIG_CPU_S3C244X) += s3c244x-clock.o
+obj-$(CONFIG_S3C2440_CPUFREQ) += s3c2440-cpufreq.o
 obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
 obj-$(CONFIG_PM) += pm.o
 obj-$(CONFIG_PM) += irq-pm.o
@@ -33,6 +34,8 @@ obj-$(CONFIG_HAVE_PWM) += pwm.o
 obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o
 obj-$(CONFIG_S3C2410_DMA) += dma.o
 obj-$(CONFIG_S3C24XX_ADC) += adc.o
+obj-$(CONFIG_S3C2410_IOTIMING) += s3c2410-iotiming.o
+obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += s3c2410-cpufreq-utils.o
 
 # device specific setup and/or initialisation
 obj-$(CONFIG_ARCH_S3C2410) += setup-i2c.o
--
1.6.3.3