[PATCH 18/18] cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq

Viresh Kumar viresh.kumar at linaro.org
Fri Apr 5 00:50:31 EST 2013


On 4 April 2013 18:32, Arnd Bergmann <arnd at arndb.de> wrote:
> Moving the files is good, but I don't see a reason to make the cbe_cpufreq.h
> header globally visible in include/linux/. Isn't it just used by as the
> interface between ppc_cbe_cpufreq_pmi.c  and ppc_cbe_cpufreq.c?

When i moved it initially i thought it is also used by
arch/powerpc/platforms/cell/cpufreq_spudemand.c and hence moved it
to include/linux and never realized i am wrong..

Here is the fixup (And attached complete patch: original+fixup for Rafael
to apply):

Compile tested only.

---
 drivers/cpufreq/ppc_cbe_cpufreq.c                    | 3 ++-
 {include/linux => drivers/cpufreq}/ppc_cbe_cpufreq.h | 0
 drivers/cpufreq/ppc_cbe_cpufreq_pervasive.c          | 3 ++-
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c                | 3 ++-
 4 files changed, 6 insertions(+), 3 deletions(-)
 rename {include/linux => drivers/cpufreq}/ppc_cbe_cpufreq.h (100%)

diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c
b/drivers/cpufreq/ppc_cbe_cpufreq.c
index 138d88c..56e0c17 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq.c
@@ -23,12 +23,13 @@
 #include <linux/cpufreq.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
-#include <linux/ppc_cbe_cpufreq.h>

 #include <asm/machdep.h>
 #include <asm/prom.h>
 #include <asm/cell-regs.h>

+#include "ppc_cbe_cpufreq.h"
+
 static DEFINE_MUTEX(cbe_switch_mutex);


diff --git a/include/linux/ppc_cbe_cpufreq.h b/drivers/cpufreq/ppc_cbe_cpufreq.h
similarity index 100%
rename from include/linux/ppc_cbe_cpufreq.h
rename to drivers/cpufreq/ppc_cbe_cpufreq.h
diff --git a/drivers/cpufreq/ppc_cbe_cpufreq_pervasive.c
b/drivers/cpufreq/ppc_cbe_cpufreq_pervasive.c
index 6708710..84d2f2c 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq_pervasive.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq_pervasive.c
@@ -25,12 +25,13 @@

 #include <linux/io.h>
 #include <linux/kernel.h>
-#include <linux/ppc_cbe_cpufreq.h>
 #include <linux/time.h>
 #include <asm/machdep.h>
 #include <asm/hw_irq.h>
 #include <asm/cell-regs.h>

+#include "ppc_cbe_cpufreq.h"
+
 /* to write to MIC register */
 static u64 MIC_Slow_Fast_Timer_table[] = {
 	[0 ... 7] = 0x007fc00000000000ull,
diff --git a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
index 448b888..d29e8da 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c
@@ -25,7 +25,6 @@
 #include <linux/timer.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
-#include <linux/ppc_cbe_cpufreq.h>

 #include <asm/processor.h>
 #include <asm/prom.h>
@@ -36,6 +35,8 @@
 #include <asm/time.h>
 #endif

+#include "ppc_cbe_cpufreq.h"
+
 static u8 pmi_slow_mode_limit[MAX_CBE];

 bool cbe_cpufreq_has_pmi = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cpufreq-powerpc-platforms-cell-move-cpufreq-driver-t.patch
Type: application/octet-stream
Size: 7490 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130404/424ff514/attachment-0001.obj>


More information about the Linuxppc-dev mailing list