RE: [PATCH v2 0/5] Split powerdomain framework into plat specific/independent

2010-12-03 Thread Paul Walmsley
Hi Rajendra,

On Thu, 2 Dec 2010, Rajendra Nayak wrote:

 This seems to be popping up with powerdomains.h file (which now
 has func declarations) being included in multiple source files. It earlier
 had only static structs and was included in one source file.
 
 I thought the right way to fix this was to probably move the static
 structs from the header into a source file.
 See if the below patch makes sense. Also attached as I don't trust
 my mailer.

Yes, that general approach looks fine to me.  I've got some patches here 
that will be posted once this powerdomain series is done to convert all 
the remaining static allocations in .h files into .c files.


- Paul
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2 0/5] Split powerdomain framework into plat specific/independent

2010-12-03 Thread Rajendra Nayak
 -Original Message-
 From: Paul Walmsley [mailto:p...@pwsan.com]
 Sent: Friday, December 03, 2010 2:11 PM
 To: Rajendra Nayak
 Cc: linux-omap@vger.kernel.org; khil...@deeprootsystems.com; Benoit
Cousson
 Subject: RE: [PATCH v2 0/5] Split powerdomain framework into plat
specific/independent

 Hi Rajendra,

 On Thu, 2 Dec 2010, Rajendra Nayak wrote:

  This seems to be popping up with powerdomains.h file (which now
  has func declarations) being included in multiple source files. It
earlier
  had only static structs and was included in one source file.
 
  I thought the right way to fix this was to probably move the static
  structs from the header into a source file.
  See if the below patch makes sense. Also attached as I don't trust
  my mailer.

 Yes, that general approach looks fine to me.  I've got some patches here
 that will be posted once this powerdomain series is done to convert all
 the remaining static allocations in .h files into .c files.

Ok, so I'll repost the series with this patch included as well so that
the warnings are'nt thrown anymore.



 - Paul
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2 0/5] Split powerdomain framework into plat specific/independent

2010-12-02 Thread Rajendra Nayak
Hi Paul,

 -Original Message-
 From: Paul Walmsley [mailto:p...@pwsan.com]
 Sent: Thursday, December 02, 2010 1:39 AM
 To: Rajendra Nayak
 Cc: linux-omap@vger.kernel.org; khil...@deeprootsystems.com;
b-cous...@ti.com
 Subject: Re: [PATCH v2 0/5] Split powerdomain framework into plat
specific/independent


 Hi,

 thanks for making the requested changes.  However, this series results
in
 compilation warnings:

Sorry about that, my bad. Should have caught those before
posting the series :(


   CC  arch/arm/mach-omap2/powerdomain2xxx_3xxx.o
 arch/arm/mach-omap2/powerdomains.h:116: warning: 'powerdomains_omap'
 defined but not used
   CC  arch/arm/mach-omap2/powerdomain44xx.o
 arch/arm/mach-omap2/powerdomains.h:116: warning: 'powerdomains_omap'
 defined but not used

This seems to be popping up with powerdomains.h file (which now
has func declarations) being included in multiple source files. It earlier
had only static structs and was included in one source file.

I thought the right way to fix this was to probably move the static
structs from the header into a source file.
See if the below patch makes sense. Also attached as I don't trust
my mailer.

From 130363d172d6c6821f48b1a4fa93c512eb18e0ef Mon Sep 17 00:00:00 2001
From: Rajendra Nayak rna...@t.com
Date: Thu, 2 Dec 2010 17:26:13 +0530
Subject: [PATCH] OMAP: powerdomain: Move static structs out of
powerdomains.h header

powerdomains.h header today has only static struct
definitions. Adding any function declarations into
it and including it in multiple source file is
expected to cause issues.
Hence move the powerdomains.h file into
powerdomains_data.c file.

Signed-off-by: Rajendra Nayak rna...@ti.com
---
 arch/arm/mach-omap2/Makefile   |2 +-
 arch/arm/mach-omap2/clockdomains.h |5 +
 arch/arm/mach-omap2/io.c   |3 +--
 .../{powerdomains.h = powerdomains_data.c}|   10 +-
 arch/arm/plat-omap/include/plat/powerdomain.h  |1 +
 5 files changed, 13 insertions(+), 8 deletions(-)
 rename arch/arm/mach-omap2/{powerdomains.h = powerdomains_data.c} (97%)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 60e51bc..5e20bc5 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -9,7 +9,7 @@ obj-y := id.o io.o control.o mux.o devices.o serial.o
gpmc.o timer-gp.o pm.o \
 omap-2-3-common= irq.o sdrc.o
prm2xxx_3xxx.o
 hwmod-common   = omap_hwmod.o \
  omap_hwmod_common_data.o
-prcm-common= prcm.o powerdomain.o
+prcm-common= prcm.o powerdomain.o
powerdomains_data.o
 clock-common   = clock.o clock_common_data.o \
  clockdomain.o clkt_dpll.o \
  clkt_clksel.o
diff --git a/arch/arm/mach-omap2/clockdomains.h
b/arch/arm/mach-omap2/clockdomains.h
index 8fc19ff..2a3b10a 100644
--- a/arch/arm/mach-omap2/clockdomains.h
+++ b/arch/arm/mach-omap2/clockdomains.h
@@ -38,6 +38,11 @@
 #include plat/clockdomain.h
 #include cm.h
 #include prm.h
+#include cm-regbits-24xx.h
+#include cm-regbits-34xx.h
+#include cm-regbits-44xx.h
+#include prm-regbits-24xx.h
+#include prm-regbits-34xx.h

 /*
  * Clockdomain dependencies for wkdeps/sleepdeps
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 40562dd..88d 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -40,7 +40,6 @@

 #include plat/omap-pm.h
 #include plat/powerdomain.h
-#include powerdomains.h

 #include plat/clockdomain.h
 #include clockdomains.h
@@ -316,7 +315,7 @@ void __init omap2_init_common_hw(struct
omap_sdrc_params *sdrc_cs0,
 {
u8 skip_setup_idle = 0;

-   pwrdm_init(powerdomains_omap);
+   pwrdm_initialise();
clkdm_init(clockdomains_omap, clkdm_autodeps);
if (cpu_is_omap242x())
omap2420_hwmod_init();
diff --git a/arch/arm/mach-omap2/powerdomains.h
b/arch/arm/mach-omap2/powerdomains_data.c
similarity index 97%
rename from arch/arm/mach-omap2/powerdomains.h
rename to arch/arm/mach-omap2/powerdomains_data.c
index 105cbca..dc6b7f8 100644
--- a/arch/arm/mach-omap2/powerdomains.h
+++ b/arch/arm/mach-omap2/powerdomains_data.c
@@ -18,9 +18,6 @@
  *Clock Domain Framework
  */

-#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS
-#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS
-
 /*
  * This file contains all of the powerdomains that have some element
  * of software control for the OMAP24xx and OMAP34xx chips.
@@ -49,6 +46,7 @@
  * address offset is different between the C55 and C64 DSPs.
  */

+#include linux/init.h
 #include plat/powerdomain.h

 #include prcm-common.h
@@ -149,5 +147,7 @@ static struct powerdomain *powerdomains_omap[]
__initdata = {
NULL
 };

-
-#endif
+void pwrdm_initialise(void)
+{
+   pwrdm_init