Skip to contentSkip to conversation

Add cpufreq driver for Momentum Maple platform

PATCH New Dmitry Eremin-Solenikov 1 participant 3 messages Jun 29, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover Add cpufreq driver for Momentum Maple platform

Please merge this patchset, adding a cpufreq driver for Momentum Maple platform. Changes since V3:

* Add comment regarding power-mode-data
* Adjusted kernel output a bit
* Tied the driver to compatible platforms only (as per arch/powerpc/platforms/maple/setup.c)

Dmitry Eremin-Solenikov (2):
ppc: enable scom access functions on Maple Add cpufreq driver for Momentum Maple boards

 arch/powerpc/kernel/misc_64.S   |    4 +-
 drivers/cpufreq/Kconfig         |    5 +
 drivers/cpufreq/Kconfig.powerpc |    7 +
 drivers/cpufreq/Makefile        |    5 +
 drivers/cpufreq/maple-cpufreq.c |  309 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 328 insertions(+), 2 deletions(-)
 create mode 100644 drivers/cpufreq/Kconfig.powerpc
 create mode 100644 drivers/cpufreq/maple-cpufreq.c
#1 lore raw

PATCH v4 1/2 ppc: enable scom access functions on Maple

Enable functions used to access SCOM if PPC_MAPLE is defined: they are used by cpufreq driver to control hardware.

---
 arch/powerpc/kernel/misc_64.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/misc_64.S +2 -2
index e89df59..616921e 100644
@@ -339,7 +339,7 @@ _GLOBAL(real_205_writeb)
 #endif /* CONFIG_PPC_PASEMI */
 
 
-#ifdef CONFIG_CPU_FREQ_PMAC64
+#if defined(CONFIG_CPU_FREQ_PMAC64) || defined(CONFIG_CPU_FREQ_MAPLE)
 /*
  * SCOM access functions for 970 (FX only for now)
  *
@@ -408,7 +408,7 @@ _GLOBAL(scom970_write)
 	/* restore interrupts */
 	mtmsrd	r5,1
 	blr
-#endif /* CONFIG_CPU_FREQ_PMAC64 */
+#endif /* CONFIG_CPU_FREQ_PMAC64 || CONFIG_CPU_FREQ_MAPLE */
 
 
 /*
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH v4 2/2 Add cpufreq driver for Momentum Maple boards

In reply to Dmitry Eremin-Solenikov

Add simple cpufreq driver for Maple-based boards (ppc970fx evaluation kit and others). Driver is based on a cpufreq driver for 64-bit powermac boxes with all pmac-dependant features removed and simple cleanup applied.

---
 drivers/cpufreq/Kconfig         |    5 +
 drivers/cpufreq/Kconfig.powerpc |    7 +
 drivers/cpufreq/Makefile        |    5 +
 drivers/cpufreq/maple-cpufreq.c |  309 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 326 insertions(+), 0 deletions(-)
 create mode 100644 drivers/cpufreq/Kconfig.powerpc
 create mode 100644 drivers/cpufreq/maple-cpufreq.c
drivers/cpufreq/Kconfig +5 -0
index 9fb8485..61ae639 100644
@@ -184,5 +184,10 @@ depends on X86
 source "drivers/cpufreq/Kconfig.x86"
 endmenu
 
+menu "PowerPC CPU frequency scaling drivers"
+depends on PPC32 || PPC64
+source "drivers/cpufreq/Kconfig.powerpc"
+endmenu
+
 endif
 endmenu
drivers/cpufreq/Kconfig.powerpc new file +7 -0
new file mode 100644
index 0000000..e76992f
@@ -0,0 +1,7 @@
+config CPU_FREQ_MAPLE
+	bool "Support for Maple 970FX Evaluation Board"
+	depends on PPC_MAPLE
+	select CPU_FREQ_TABLE
+	help
+	  This adds support for frequency switching on Maple 970FX
+	  Evaluation Board and compatible boards (IBM JS2x blades).
drivers/cpufreq/Makefile +5 -0
index e2fc2d2..ca3796d 100644
@@ -41,3 +41,8 @@ obj-$(CONFIG_X86_CPUFREQ_NFORCE2)	+= cpufreq-nforce2.o
 
 # ARM SoC drivers
 obj-$(CONFIG_UX500_SOC_DB8500)		+= db8500-cpufreq.o
+
+
+##################################################################################d
+# PowerPC platform drivers
+obj-$(CONFIG_CPU_FREQ_MAPLE)		+= maple-cpufreq.o
drivers/cpufreq/maple-cpufreq.c new file +309 -0

309 lines not on this page · raw message

Signature · 1 line
1.7.5.4