RE: [PATCH 7/9] ARM: OMAP2+: Prepare for irqs.h removal

2012-09-05 Thread Mohammed, Afzal
Hi Tony,

On Wed, Sep 05, 2012 at 14:33:58, Mohammed, Afzal wrote:
> On Wed, Sep 05, 2012 at 06:39:22, Tony Lindgren wrote:
> > * Mohammed, Afzal  [120904 01:47]:
> 
> > > *I am not sending the patches now to avoid confusion by way of having
> > > too many patch series*
> > > 
> > > In case you like this, let me know, I will post.
> > 
> > Yes please post the patches rebased on testing-cleanup branch that I
> > just pushed. That branch is not immutable yet though as we're waiting
> > to hear from Arnd regrading the first patch in the branch.
> 
> The patches rebased on testing-cleanup branch has been posted [1].

Latest version (v8) of patch series has been posted [A] with an
enhancement, please ignore v7.

Regards
Afzal

[A] http://marc.info/?l=linux-omap&m=134684859913232&w=2


N�r��yb�X��ǧv�^�)޺{.n�+{��f��{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

RE: [PATCH 7/9] ARM: OMAP2+: Prepare for irqs.h removal

2012-09-05 Thread Mohammed, Afzal
Hi Tony,

On Wed, Sep 05, 2012 at 06:39:22, Tony Lindgren wrote:
> * Mohammed, Afzal  [120904 01:47]:

> > *I am not sending the patches now to avoid confusion by way of having
> > too many patch series*
> > 
> > In case you like this, let me know, I will post.
> 
> Yes please post the patches rebased on testing-cleanup branch that I
> just pushed. That branch is not immutable yet though as we're waiting
> to hear from Arnd regrading the first patch in the branch.

The patches rebased on testing-cleanup branch has been posted [1].

Regards
Afzal

[1] http://marc.info/?l=linux-omap&m=134683495407871&w=2



Re: [PATCH 7/9] ARM: OMAP2+: Prepare for irqs.h removal

2012-09-04 Thread Tony Lindgren
* Tony Lindgren  [120830 17:53]:
> As the interrupts should only be defined in the platform_data, and
> eventually coming from device tree, there's no need to define them
> in header files.
> 
> Let's remove the hardcoded references to irqs.h and fix up the includes
> so we don't rely on headers included in irqs.h. While at it, sort
> the includes the standard way.

Turns out this patch was not quite working with SPARSE_IRQ, we have
to add OMAP_INTC_START for that. Also fixed up is compile for
drivers/staging/tidspbridge. Updated patch below.

Regards,

Tony


From: Tony Lindgren 
Date: Mon, 27 Aug 2012 17:43:01 -0700
Subject: [PATCH] ARM: OMAP2+: Prepare for irqs.h removal

As the interrupts should only be defined in the platform_data, and
eventually coming from device tree, there's no need to define them
in header files.

Let's remove the hardcoded references to irqs.h and fix up the includes
so we don't rely on headers included in irqs.h. Note that we're
defining OMAP_INTC_START as 0 to the interrupts. This will be needed
when we enable SPARSE_IRQ.

While at it, sort the includes the standard way, and add the trailing
commas where they are missing in the related data structures.

Note that for drivers/staging/tidspbridge we just define things
locally.

Signed-off-by: Tony Lindgren 

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index cacc498..7e31981 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -28,19 +28,20 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
 
-#include "common.h"
 #include 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
+#include "common.h"
 #include "mux.h"
 #include "hsmmc.h"
 #include "common-board-devices.h"
@@ -231,7 +232,7 @@ static int __init omap2430_i2c_init(void)
sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78);
omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
ARRAY_SIZE(sdp2430_i2c1_boardinfo));
-   omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ,
+   omap_pmic_init(2, 100, "twl4030", 7 + OMAP_INTC_START,
&sdp2430_twldata);
return 0;
 }
diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
index ee82604..31456ea 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -579,7 +579,7 @@ static int __init omap4_i2c_init(void)
TWL_COMMON_REGULATOR_V1V8 |
TWL_COMMON_REGULATOR_V2V1);
omap4_pmic_init("twl6030", &sdp4430_twldata,
-   &twl6040_data, OMAP44XX_IRQ_SYS_2N);
+   &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
diff --git a/arch/arm/mach-omap2/board-am3517evm.c 
b/arch/arm/mach-omap2/board-am3517evm.c
index c6d63d7..9bc0b94 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -298,8 +298,7 @@ static struct resource am3517_hecc_resources[] = {
.flags  = IORESOURCE_MEM,
},
{
-   .start  = INT_35XX_HECC0_IRQ,
-   .end= INT_35XX_HECC0_IRQ,
+   .start  = 24 + OMAP_INTC_START,
.flags  = IORESOURCE_IRQ,
},
 };
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c 
b/arch/arm/mach-omap2/board-cm-t3517.c
index 30b7b01..350441a 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -38,13 +38,14 @@
 #include 
 #include 
 
-#include "common.h"
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
+#include "common.h"
 #include "mux.h"
 #include "control.h"
 #include "common-board-devices.h"
@@ -89,8 +90,7 @@ static struct resource cm_t3517_hecc_resources[] = {
.flags  = IORESOURCE_MEM,
},
{
-   .start  = INT_35XX_HECC0_IRQ,
-   .end= INT_35XX_HECC0_IRQ,
+   .start  = 24 + OMAP_INTC_START,
.flags  = IORESOURCE_IRQ,
},
 };
diff --git a/arch/arm/mach-omap2/board-flash.c 
b/arch/arm/mach-omap2/board-flash.c
index c8d4382..bd67c4c 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -16,8 +16,8 @@
 #include 
 #include 
 #include 
-#include 
 
+#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 08471a3..c6440cb 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -23,19 +23,20 @@
 #include 
 #include 
 #include 
-
 #include 
+#include 
 
 #include 
 #include 
 
-#include "common.h"
 #include 
 #include 
+#include 
+
 #include 
 #include 
-#include 
 
+#include "common.h"
 #include "mux.h"
 #include "hsm

Re: [PATCH 7/9] ARM: OMAP2+: Prepare for irqs.h removal

2012-09-04 Thread Tony Lindgren
* Mohammed, Afzal  [120904 01:47]:
> Hi Tony,
> 
> On Fri, Aug 31, 2012 at 06:22:37, Tony Lindgren wrote:
> > As the interrupts should only be defined in the platform_data, and
> > eventually coming from device tree, there's no need to define them
> > in header files.
> > 
> > Let's remove the hardcoded references to irqs.h and fix up the includes
> > so we don't rely on headers included in irqs.h. While at it, sort
> > the includes the standard way.
> 
> >  arch/arm/mach-omap2/gpmc.c |   11 +---
> 
> > diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> 
> >  /* GPMC register offsets */
> >  #define GPMC_REVISION  0x00
> >  #define GPMC_SYSCONFIG 0x10
> > @@ -846,16 +849,16 @@ static int __init gpmc_init(void)
> > l = OMAP2420_GPMC_BASE;
> > else
> > l = OMAP34XX_GPMC_BASE;
> > -   gpmc_irq = INT_34XX_GPMC_IRQ;
> > +   gpmc_irq = 20;
> > } else if (cpu_is_omap34xx()) {
> > ck = "gpmc_fck";
> > l = OMAP34XX_GPMC_BASE;
> > -   gpmc_irq = INT_34XX_GPMC_IRQ;
> > +   gpmc_irq = 20;
> > } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
> > /* Base address and irq number are same for OMAP4/5 */
> > ck = "gpmc_ck";
> > l = OMAP44XX_GPMC_BASE;
> > -   gpmc_irq = OMAP44XX_IRQ_GPMC;
> > +   gpmc_irq = 20 + OMAP44XX_IRQ_GIC_START;
> 
> I have a suggestion to avoid above hardcoded patching on gpmc.c.
> With driver conversion series it again would have to be patched.
> 
> 
> I have made a basic gpmc driver conversion, which is expected to
> be non-controversial. This was done over your devel-gpmc branch.
> It is working fine, has only 3 patches
> 
> 1. Add hwmod entry
> 2. Adapt to hwmod
> 3. Basic driver conversion
> 
> Here the basic driver gets resources and clk in driver probe
> using con-id "fck", it has no platform data as of now
> 
> It is available
> @git://gitorious.org/x0148406-public/linux-kernel.git gpmc-simple-drv
 
Great, please post that. But let's get this cleanup out of the way
first. It's OK if we have to go back and forth a bit if it means
we can avoid dependencies between the patches as this is already
all over the place.
 
> Originally this was made on top of my series,
> "OMAP-GPMC: generic time calc, prepare for driver"
> It was modified so that it can be applied to your devel-gpmc branch.
> 
> *I am not sending the patches now to avoid confusion by way of having
> too many patch series*
> 
> In case you like this, let me know, I will post.

Yes please post the patches rebased on testing-cleanup branch that I
just pushed. That branch is not immutable yet though as we're waiting
to hear from Arnd regrading the first patch in the branch.
 
> As I am proceeding with Paul's suggestion on hwmod reset,
> I hope Paul can take the first one.

Let's first nail down the cleanup changes though..

Tony
--
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 7/9] ARM: OMAP2+: Prepare for irqs.h removal

2012-09-04 Thread Mohammed, Afzal
Hi Tony,

On Fri, Aug 31, 2012 at 06:22:37, Tony Lindgren wrote:
> As the interrupts should only be defined in the platform_data, and
> eventually coming from device tree, there's no need to define them
> in header files.
> 
> Let's remove the hardcoded references to irqs.h and fix up the includes
> so we don't rely on headers included in irqs.h. While at it, sort
> the includes the standard way.

>  arch/arm/mach-omap2/gpmc.c |   11 +---

> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c

>  /* GPMC register offsets */
>  #define GPMC_REVISION0x00
>  #define GPMC_SYSCONFIG   0x10
> @@ -846,16 +849,16 @@ static int __init gpmc_init(void)
>   l = OMAP2420_GPMC_BASE;
>   else
>   l = OMAP34XX_GPMC_BASE;
> - gpmc_irq = INT_34XX_GPMC_IRQ;
> + gpmc_irq = 20;
>   } else if (cpu_is_omap34xx()) {
>   ck = "gpmc_fck";
>   l = OMAP34XX_GPMC_BASE;
> - gpmc_irq = INT_34XX_GPMC_IRQ;
> + gpmc_irq = 20;
>   } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
>   /* Base address and irq number are same for OMAP4/5 */
>   ck = "gpmc_ck";
>   l = OMAP44XX_GPMC_BASE;
> - gpmc_irq = OMAP44XX_IRQ_GPMC;
> + gpmc_irq = 20 + OMAP44XX_IRQ_GIC_START;

I have a suggestion to avoid above hardcoded patching on gpmc.c.
With driver conversion series it again would have to be patched.


I have made a basic gpmc driver conversion, which is expected to
be non-controversial. This was done over your devel-gpmc branch.
It is working fine, has only 3 patches

1. Add hwmod entry
2. Adapt to hwmod
3. Basic driver conversion

Here the basic driver gets resources and clk in driver probe
using con-id "fck", it has no platform data as of now

It is available
@git://gitorious.org/x0148406-public/linux-kernel.git gpmc-simple-drv


Originally this was made on top of my series,
"OMAP-GPMC: generic time calc, prepare for driver"
It was modified so that it can be applied to your devel-gpmc branch.

*I am not sending the patches now to avoid confusion by way of having
too many patch series*

In case you like this, let me know, I will post.

As I am proceeding with Paul's suggestion on hwmod reset,
I hope Paul can take the first one.

Regards
Afzal




[PATCH 7/9] ARM: OMAP2+: Prepare for irqs.h removal

2012-08-30 Thread Tony Lindgren
As the interrupts should only be defined in the platform_data, and
eventually coming from device tree, there's no need to define them
in header files.

Let's remove the hardcoded references to irqs.h and fix up the includes
so we don't rely on headers included in irqs.h. While at it, sort
the includes the standard way.

Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/board-2430sdp.c|7 +++--
 arch/arm/mach-omap2/board-4430sdp.c|2 +
 arch/arm/mach-omap2/board-am3517evm.c  |3 +-
 arch/arm/mach-omap2/board-cm-t3517.c   |6 ++--
 arch/arm/mach-omap2/board-flash.c  |2 +
 arch/arm/mach-omap2/board-igep0020.c   |7 +++--
 arch/arm/mach-omap2/board-n8x0.c   |3 +-
 arch/arm/mach-omap2/board-omap4panda.c |2 +
 arch/arm/mach-omap2/board-rm680.c  |6 +++-
 arch/arm/mach-omap2/board-rx51-peripherals.c   |2 +
 arch/arm/mach-omap2/board-ti8168evm.c  |3 +-
 arch/arm/mach-omap2/board-zoom-debugboard.c|1 +
 arch/arm/mach-omap2/board-zoom-peripherals.c   |5 ++--
 arch/arm/mach-omap2/cpuidle34xx.c  |1 -
 arch/arm/mach-omap2/devices.c  |7 +
 arch/arm/mach-omap2/gpmc-smc91x.c  |1 +
 arch/arm/mach-omap2/gpmc.c |   11 +---
 arch/arm/mach-omap2/io.c   |2 +
 arch/arm/mach-omap2/mailbox.c  |3 +-
 arch/arm/mach-omap2/mcbsp.c|1 -
 arch/arm/mach-omap2/omap-iommu.c   |1 -
 arch/arm/mach-omap2/omap-wakeupgen.c   |1 +
 arch/arm/mach-omap2/omap4-common.c |7 ++---
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |1 -
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |3 +-
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   12 -
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |2 -
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   27 ++--
 arch/arm/mach-omap2/omap_l3_noc.c  |6 +++-
 arch/arm/mach-omap2/omap_phy_internal.c|2 +
 arch/arm/mach-omap2/pm24xx.c   |2 -
 arch/arm/mach-omap2/prcm.c |1 -
 arch/arm/mach-omap2/prm2xxx_3xxx.c |3 +-
 arch/arm/mach-omap2/prm44xx.c  |4 +--
 arch/arm/mach-omap2/prm_common.c   |1 -
 arch/arm/mach-omap2/serial.c   |1 +
 arch/arm/mach-omap2/timer.c|   10 ---
 arch/arm/mach-omap2/twl-common.c   |3 +-
 arch/arm/mach-omap2/twl-common.h   |6 +---
 arch/arm/mach-omap2/usb-host.c |1 -
 arch/arm/mach-omap2/usb-musb.c |1 -
 arch/arm/plat-omap/include/plat/omap44xx.h |1 +
 drivers/dma/omap-dma.c |2 +
 drivers/mfd/twl-core.c |2 +
 drivers/mtd/onenand/omap2.c|8 --
 drivers/tty/serial/8250/8250.c |4 +--
 drivers/video/omap2/dss/dispc.c|1 +
 drivers/video/omap2/omapfb/omapfb-main.c   |4 ++-
 sound/soc/omap/mcbsp.c |3 +-
 sound/soc/omap/omap-mcbsp.c|1 +
 sound/soc/omap/omap-pcm.c  |1 +
 51 files changed, 105 insertions(+), 92 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index cacc498..3a587d0 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -28,19 +28,20 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
 
-#include "common.h"
 #include 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
+#include "common.h"
 #include "mux.h"
 #include "hsmmc.h"
 #include "common-board-devices.h"
@@ -231,7 +232,7 @@ static int __init omap2430_i2c_init(void)
sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78);
omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
ARRAY_SIZE(sdp2430_i2c1_boardinfo));
-   omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ,
+   omap_pmic_init(2, 100, "twl4030", 7,
&sdp2430_twldata);
return 0;
 }
diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
index ee82604..31456ea 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -579,7 +579,7 @@ static int __init omap4_i2c_init(void)
TWL_COMMON_REGULATOR_V1V8 |
TWL_COMMON_REGULATOR_V2V1);
omap4_pmic_init("twl6030", &sdp4430_twldata,
-   &twl6040_data, OMAP44XX_IRQ_SYS_2N);
+