All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mxs: irq_data conversion
@ 2011-01-21  9:01 Uwe Kleine-König
  2011-01-21  9:43 ` Russell King - ARM Linux
  0 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2011-01-21  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/Kconfig          |    1 +
 arch/arm/mach-mxs/gpio.c  |   30 +++++++++++++++---------------
 arch/arm/mach-mxs/icoll.c |   16 ++++++++--------
 3 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5cff165..c8d888e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -364,6 +364,7 @@ config ARCH_MXS
 	select GENERIC_CLOCKEVENTS
 	select ARCH_REQUIRE_GPIOLIB
 	select CLKDEV_LOOKUP
+	select GENERIC_HARDIRQS_NO_DEPRECATED
 	help
 	  Support for Freescale MXS-based family of processors
 
diff --git a/arch/arm/mach-mxs/gpio.c b/arch/arm/mach-mxs/gpio.c
index d7ad7a6..ba810db 100644
--- a/arch/arm/mach-mxs/gpio.c
+++ b/arch/arm/mach-mxs/gpio.c
@@ -68,29 +68,29 @@ static void set_gpio_irqenable(struct mxs_gpio_port *port, u32 index,
 	}
 }
 
-static void mxs_gpio_ack_irq(u32 irq)
+static void mxs_gpio_ack_irq(struct irq_data *d)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	clear_gpio_irqstatus(&mxs_gpio_ports[gpio / 32], gpio & 0x1f);
 }
 
-static void mxs_gpio_mask_irq(u32 irq)
+static void mxs_gpio_mask_irq(struct irq_data *d)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	set_gpio_irqenable(&mxs_gpio_ports[gpio / 32], gpio & 0x1f, 0);
 }
 
-static void mxs_gpio_unmask_irq(u32 irq)
+static void mxs_gpio_unmask_irq(struct irq_data *d)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	set_gpio_irqenable(&mxs_gpio_ports[gpio / 32], gpio & 0x1f, 1);
 }
 
 static int mxs_gpio_get(struct gpio_chip *chip, unsigned offset);
 
-static int mxs_gpio_set_irq_type(u32 irq, u32 type)
+static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	u32 pin_mask = 1 << (gpio & 31);
 	struct mxs_gpio_port *port = &mxs_gpio_ports[gpio / 32];
 	void __iomem *pin_addr;
@@ -158,9 +158,9 @@ static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc)
  * @param  enable       enable as wake-up if equal to non-zero
  * @return       This function returns 0 on success.
  */
-static int mxs_gpio_set_wake_irq(u32 irq, u32 enable)
+static int mxs_gpio_set_wake_irq(struct irq_data *d, unsigned int enable)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	u32 gpio_idx = gpio & 0x1f;
 	struct mxs_gpio_port *port = &mxs_gpio_ports[gpio / 32];
 
@@ -180,11 +180,11 @@ static int mxs_gpio_set_wake_irq(u32 irq, u32 enable)
 }
 
 static struct irq_chip gpio_irq_chip = {
-	.ack = mxs_gpio_ack_irq,
-	.mask = mxs_gpio_mask_irq,
-	.unmask = mxs_gpio_unmask_irq,
-	.set_type = mxs_gpio_set_irq_type,
-	.set_wake = mxs_gpio_set_wake_irq,
+	.irq_ack = mxs_gpio_ack_irq,
+	.irq_mask = mxs_gpio_mask_irq,
+	.irq_unmask = mxs_gpio_unmask_irq,
+	.irq_set_type = mxs_gpio_set_irq_type,
+	.irq_set_wake = mxs_gpio_set_wake_irq,
 };
 
 static void mxs_set_gpio_direction(struct gpio_chip *chip, unsigned offset,
diff --git a/arch/arm/mach-mxs/icoll.c b/arch/arm/mach-mxs/icoll.c
index 5dd43ba..0f4c120 100644
--- a/arch/arm/mach-mxs/icoll.c
+++ b/arch/arm/mach-mxs/icoll.c
@@ -34,7 +34,7 @@
 
 static void __iomem *icoll_base = MXS_IO_ADDRESS(MXS_ICOLL_BASE_ADDR);
 
-static void icoll_ack_irq(unsigned int irq)
+static void icoll_ack_irq(struct irq_data *d)
 {
 	/*
 	 * The Interrupt Collector is able to prioritize irqs.
@@ -45,22 +45,22 @@ static void icoll_ack_irq(unsigned int irq)
 			icoll_base + HW_ICOLL_LEVELACK);
 }
 
-static void icoll_mask_irq(unsigned int irq)
+static void icoll_mask_irq(struct irq_data *d)
 {
 	__raw_writel(BM_ICOLL_INTERRUPTn_ENABLE,
-			icoll_base + HW_ICOLL_INTERRUPTn_CLR(irq));
+			icoll_base + HW_ICOLL_INTERRUPTn_CLR(d->irq));
 }
 
-static void icoll_unmask_irq(unsigned int irq)
+static void icoll_unmask_irq(struct irq_data *d)
 {
 	__raw_writel(BM_ICOLL_INTERRUPTn_ENABLE,
-			icoll_base + HW_ICOLL_INTERRUPTn_SET(irq));
+			icoll_base + HW_ICOLL_INTERRUPTn_SET(d->irq));
 }
 
 static struct irq_chip mxs_icoll_chip = {
-	.ack = icoll_ack_irq,
-	.mask = icoll_mask_irq,
-	.unmask = icoll_unmask_irq,
+	.irq_ack = icoll_ack_irq,
+	.irq_mask = icoll_mask_irq,
+	.irq_unmask = icoll_unmask_irq,
 };
 
 void __init icoll_init_irq(void)
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21  9:01 [PATCH] ARM: mxs: irq_data conversion Uwe Kleine-König
@ 2011-01-21  9:43 ` Russell King - ARM Linux
  2011-01-21 10:15   ` Uwe Kleine-König
  2011-01-21 20:07   ` [PATCH v2] " Uwe Kleine-König
  0 siblings, 2 replies; 11+ messages in thread
From: Russell King - ARM Linux @ 2011-01-21  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 10:01:58AM +0100, Uwe Kleine-K?nig wrote:
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
>  arch/arm/Kconfig          |    1 +
>  arch/arm/mach-mxs/gpio.c  |   30 +++++++++++++++---------------
>  arch/arm/mach-mxs/icoll.c |   16 ++++++++--------
>  3 files changed, 24 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 5cff165..c8d888e 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -364,6 +364,7 @@ config ARCH_MXS
>  	select GENERIC_CLOCKEVENTS
>  	select ARCH_REQUIRE_GPIOLIB
>  	select CLKDEV_LOOKUP
> +	select GENERIC_HARDIRQS_NO_DEPRECATED

No.  Let's do it architecture wide otherwise we're going to get into
problems working out what's been done and what hasn't.  By all means
use it as a way of ensuring that your platform is converted, but don't
submit patches with this in.

I thought the point of Lennert's patches were to convert everyone over,
so it should just be those trees which weren't merged at that point who
are missing the fixup.

We'll set this architecture wide for 2.6.39, and I'll see about queueing
it soon so that we catch those places which haven't been done.  That
should allow the remainder to be caught.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21  9:43 ` Russell King - ARM Linux
@ 2011-01-21 10:15   ` Uwe Kleine-König
  2011-01-21 10:27     ` Russell King - ARM Linux
  2011-01-21 10:28     ` Lennert Buytenhek
  2011-01-21 20:07   ` [PATCH v2] " Uwe Kleine-König
  1 sibling, 2 replies; 11+ messages in thread
From: Uwe Kleine-König @ 2011-01-21 10:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 09:43:38AM +0000, Russell King - ARM Linux wrote:
> On Fri, Jan 21, 2011 at 10:01:58AM +0100, Uwe Kleine-K?nig wrote:
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > ---
> >  arch/arm/Kconfig          |    1 +
> >  arch/arm/mach-mxs/gpio.c  |   30 +++++++++++++++---------------
> >  arch/arm/mach-mxs/icoll.c |   16 ++++++++--------
> >  3 files changed, 24 insertions(+), 23 deletions(-)
> > 
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index 5cff165..c8d888e 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -364,6 +364,7 @@ config ARCH_MXS
> >  	select GENERIC_CLOCKEVENTS
> >  	select ARCH_REQUIRE_GPIOLIB
> >  	select CLKDEV_LOOKUP
> > +	select GENERIC_HARDIRQS_NO_DEPRECATED
> 
> No.  Let's do it architecture wide otherwise we're going to get into
> problems working out what's been done and what hasn't.  By all means
> use it as a way of ensuring that your platform is converted, but don't
> submit patches with this in.
OK.
 
> I thought the point of Lennert's patches were to convert everyone over,
> so it should just be those trees which weren't merged at that point who
> are missing the fixup.
Yes, but he missed mxs, probably because the tree he based his work on
doesn't contain it yet.

> We'll set this architecture wide for 2.6.39, and I'll see about queueing
> it soon so that we catch those places which haven't been done.  That
> should allow the remainder to be caught.
IMHO doing it the other way round would be better.  (i.e. use a def_bool
y for the unconverted platforms and then push that down.)  But maybe
this is just a matter of taste.

How should we proceed?  Lennert, do you take my patch?  Should I resend
without the select?  IIRC there were send a few other patches (for tegra
maybe?).  Don't know if you missed these, too?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21 10:15   ` Uwe Kleine-König
@ 2011-01-21 10:27     ` Russell King - ARM Linux
  2011-01-21 10:47       ` Lennert Buytenhek
  2011-01-21 10:28     ` Lennert Buytenhek
  1 sibling, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux @ 2011-01-21 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 11:15:36AM +0100, Uwe Kleine-K?nig wrote:
> IMHO doing it the other way round would be better.  (i.e. use a def_bool
> y for the unconverted platforms and then push that down.)  But maybe
> this is just a matter of taste.
> 
> How should we proceed?  Lennert, do you take my patch?  Should I resend
> without the select?  IIRC there were send a few other patches (for tegra
> maybe?).  Don't know if you missed these, too?

It looks like it's relatively few platforms which were missed:

arch/arm/mach-msm/gpio-v2.c-    .mask           = msm_gpio_irq_mask,
arch/arm/mach-msm/gpio-v2.c-    .unmask         = msm_gpio_irq_unmask,
arch/arm/mach-msm/gpio-v2.c-    .ack            = msm_gpio_irq_ack,
arch/arm/mach-lh7a40x/irq-kev7a400.c-   .ack    = lh7a400_ack_cpld_irq,
arch/arm/mach-lh7a40x/irq-kev7a400.c-   .mask   = lh7a400_mask_cpld_irq,
arch/arm/mach-lh7a40x/irq-kev7a400.c-   .unmask = lh7a400_unmask_cpld_irq,
arch/arm/mach-vt8500/irq.c-     .ack       = vt8500_irq_mask,
arch/arm/mach-vt8500/irq.c-     .mask      = vt8500_irq_mask,
arch/arm/mach-vt8500/irq.c-     .unmask    = vt8500_irq_unmask,
arch/arm/mach-mxs/gpio.c-       .ack = mxs_gpio_ack_irq,
arch/arm/mach-mxs/gpio.c-       .mask = mxs_gpio_mask_irq,
arch/arm/mach-mxs/gpio.c-       .unmask = mxs_gpio_unmask_irq,
arch/arm/mach-mxs/icoll.c-      .ack = icoll_ack_irq,
arch/arm/mach-mxs/icoll.c-      .mask = icoll_mask_irq,
arch/arm/mach-mxs/icoll.c-      .unmask = icoll_unmask_irq,

vt8500 is new in my tree, so needs to be updated.  The other stuff I
guessed Lennert missed for one reason or another, so... patches welcome.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21 10:15   ` Uwe Kleine-König
  2011-01-21 10:27     ` Russell King - ARM Linux
@ 2011-01-21 10:28     ` Lennert Buytenhek
  2011-01-21 10:45       ` Russell King - ARM Linux
  1 sibling, 1 reply; 11+ messages in thread
From: Lennert Buytenhek @ 2011-01-21 10:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 11:15:36AM +0100, Uwe Kleine-K?nig wrote:

> > > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  arch/arm/Kconfig          |    1 +
> > >  arch/arm/mach-mxs/gpio.c  |   30 +++++++++++++++---------------
> > >  arch/arm/mach-mxs/icoll.c |   16 ++++++++--------
> > >  3 files changed, 24 insertions(+), 23 deletions(-)
> > > 
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index 5cff165..c8d888e 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -364,6 +364,7 @@ config ARCH_MXS
> > >  	select GENERIC_CLOCKEVENTS
> > >  	select ARCH_REQUIRE_GPIOLIB
> > >  	select CLKDEV_LOOKUP
> > > +	select GENERIC_HARDIRQS_NO_DEPRECATED
> > 
> > No.  Let's do it architecture wide otherwise we're going to get into
> > problems working out what's been done and what hasn't.  By all means
> > use it as a way of ensuring that your platform is converted, but don't
> > submit patches with this in.
>
> OK.
>  
> > I thought the point of Lennert's patches were to convert everyone over,
> > so it should just be those trees which weren't merged at that point who
> > are missing the fixup.
>
> Yes, but he missed mxs, probably because the tree he based his work on
> doesn't contain it yet.
> 
> > We'll set this architecture wide for 2.6.39, and I'll see about queueing
> > it soon so that we catch those places which haven't been done.  That
> > should allow the remainder to be caught.
>
> IMHO doing it the other way round would be better.  (i.e. use a def_bool
> y for the unconverted platforms and then push that down.)  But maybe
> this is just a matter of taste.
> 
> How should we proceed?  Lennert, do you take my patch?  Should I resend
> without the select?  IIRC there were send a few other patches (for tegra
> maybe?).  Don't know if you missed these, too?

I agree with rmk and think that we should just set
GENERIC_HARDIRQS_NO_DEPRECATED globally (i.e. ARM-wide) at some point,
and fix up the few remaining old-style users at that point.

The bulk of the work has been done now, and any further irq_data
conversions that need to be done can be done in a minute or so each,
probably on par with the time it would take to patch Kconfig to
indicate which platforms have been converted and which haven't, so
we might as well just spend that time on doing the conversion.


thanks,
Lennert

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21 10:28     ` Lennert Buytenhek
@ 2011-01-21 10:45       ` Russell King - ARM Linux
  0 siblings, 0 replies; 11+ messages in thread
From: Russell King - ARM Linux @ 2011-01-21 10:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 11:28:36AM +0100, Lennert Buytenhek wrote:
> I agree with rmk and think that we should just set
> GENERIC_HARDIRQS_NO_DEPRECATED globally (i.e. ARM-wide) at some point,
> and fix up the few remaining old-style users at that point.
> 
> The bulk of the work has been done now, and any further irq_data
> conversions that need to be done can be done in a minute or so each,
> probably on par with the time it would take to patch Kconfig to
> indicate which platforms have been converted and which haven't, so
> we might as well just spend that time on doing the conversion.

If you can do lh7a40x and msm, then with Uwe's (fixed) patch and
vt8500, I think we're there for adding this symbol.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21 10:27     ` Russell King - ARM Linux
@ 2011-01-21 10:47       ` Lennert Buytenhek
  2011-01-21 10:52         ` Russell King - ARM Linux
  2011-01-22  1:16         ` Lennert Buytenhek
  0 siblings, 2 replies; 11+ messages in thread
From: Lennert Buytenhek @ 2011-01-21 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 10:27:07AM +0000, Russell King - ARM Linux wrote:

> > IMHO doing it the other way round would be better.  (i.e. use a def_bool
> > y for the unconverted platforms and then push that down.)  But maybe
> > this is just a matter of taste.
> > 
> > How should we proceed?  Lennert, do you take my patch?  Should I resend
> > without the select?  IIRC there were send a few other patches (for tegra
> > maybe?).  Don't know if you missed these, too?
> 
> It looks like it's relatively few platforms which were missed:
> 
> arch/arm/mach-msm/gpio-v2.c-    .mask           = msm_gpio_irq_mask,
> arch/arm/mach-msm/gpio-v2.c-    .unmask         = msm_gpio_irq_unmask,
> arch/arm/mach-msm/gpio-v2.c-    .ack            = msm_gpio_irq_ack,
> arch/arm/mach-lh7a40x/irq-kev7a400.c-   .ack    = lh7a400_ack_cpld_irq,
> arch/arm/mach-lh7a40x/irq-kev7a400.c-   .mask   = lh7a400_mask_cpld_irq,
> arch/arm/mach-lh7a40x/irq-kev7a400.c-   .unmask = lh7a400_unmask_cpld_irq,
> arch/arm/mach-vt8500/irq.c-     .ack       = vt8500_irq_mask,
> arch/arm/mach-vt8500/irq.c-     .mask      = vt8500_irq_mask,
> arch/arm/mach-vt8500/irq.c-     .unmask    = vt8500_irq_unmask,
> arch/arm/mach-mxs/gpio.c-       .ack = mxs_gpio_ack_irq,
> arch/arm/mach-mxs/gpio.c-       .mask = mxs_gpio_mask_irq,
> arch/arm/mach-mxs/gpio.c-       .unmask = mxs_gpio_unmask_irq,
> arch/arm/mach-mxs/icoll.c-      .ack = icoll_ack_irq,
> arch/arm/mach-mxs/icoll.c-      .mask = icoll_mask_irq,
> arch/arm/mach-mxs/icoll.c-      .unmask = icoll_unmask_irq,
> 
> vt8500 is new in my tree, so needs to be updated.  The other stuff I
> guessed Lennert missed for one reason or another,

I looked for irq_chips to convert using grep (using a possibly buggy
regexp), and then built all defconfigs with GENERIC_HARDIRQS_NO_DEPRECATED
turned on to check for fallout.  If there's no defconfig (e.g. in the
Tegra case) or the code didn't get built for some other reason, I'll
have missed it.

For msm, gpio-v2.c doesn't get built by any defconfig since
there is no defconfig that sets ARCH_MSM8X60, irq-kev7a400.c is never
even referenced in arch/arm/mach-lh7a40x/Makefile so it never gets
built at all, and the other platforms I didn't see as I built against
-linus and ARM devel-stable rather than against ARM devel.


> so... patches welcome.

I'll submit a patch for the above, and to make sure I'll build all
defconfigs on current -devel as well.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21 10:47       ` Lennert Buytenhek
@ 2011-01-21 10:52         ` Russell King - ARM Linux
  2011-01-22  1:16         ` Lennert Buytenhek
  1 sibling, 0 replies; 11+ messages in thread
From: Russell King - ARM Linux @ 2011-01-21 10:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 11:47:42AM +0100, Lennert Buytenhek wrote:
> On Fri, Jan 21, 2011 at 10:27:07AM +0000, Russell King - ARM Linux wrote:
> For msm, gpio-v2.c doesn't get built by any defconfig since
> there is no defconfig that sets ARCH_MSM8X60, irq-kev7a400.c is never
> even referenced in arch/arm/mach-lh7a40x/Makefile so it never gets
> built at all, and the other platforms I didn't see as I built against
> -linus and ARM devel-stable rather than against ARM devel.

Okay, ignore the lh7a40x stuff - I think we really should kill that
off as its not receiving anything but our updates, and it's clearly
not right.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] ARM: mxs: irq_data conversion
  2011-01-21  9:43 ` Russell King - ARM Linux
  2011-01-21 10:15   ` Uwe Kleine-König
@ 2011-01-21 20:07   ` Uwe Kleine-König
  2011-01-22  0:23     ` Lennert Buytenhek
  1 sibling, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2011-01-21 20:07 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
Hello,

compared to (implicit) v1 ARCH_MXS doesn't select
GENERIC_HARDIRQS_NO_DEPRECATED anymore.

Best regards
Uwe

 arch/arm/mach-mxs/gpio.c  |   30 +++++++++++++++---------------
 arch/arm/mach-mxs/icoll.c |   16 ++++++++--------
 3 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-mxs/gpio.c b/arch/arm/mach-mxs/gpio.c
index d7ad7a6..ba810db 100644
--- a/arch/arm/mach-mxs/gpio.c
+++ b/arch/arm/mach-mxs/gpio.c
@@ -68,29 +68,29 @@ static void set_gpio_irqenable(struct mxs_gpio_port *port, u32 index,
 	}
 }
 
-static void mxs_gpio_ack_irq(u32 irq)
+static void mxs_gpio_ack_irq(struct irq_data *d)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	clear_gpio_irqstatus(&mxs_gpio_ports[gpio / 32], gpio & 0x1f);
 }
 
-static void mxs_gpio_mask_irq(u32 irq)
+static void mxs_gpio_mask_irq(struct irq_data *d)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	set_gpio_irqenable(&mxs_gpio_ports[gpio / 32], gpio & 0x1f, 0);
 }
 
-static void mxs_gpio_unmask_irq(u32 irq)
+static void mxs_gpio_unmask_irq(struct irq_data *d)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	set_gpio_irqenable(&mxs_gpio_ports[gpio / 32], gpio & 0x1f, 1);
 }
 
 static int mxs_gpio_get(struct gpio_chip *chip, unsigned offset);
 
-static int mxs_gpio_set_irq_type(u32 irq, u32 type)
+static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	u32 pin_mask = 1 << (gpio & 31);
 	struct mxs_gpio_port *port = &mxs_gpio_ports[gpio / 32];
 	void __iomem *pin_addr;
@@ -158,9 +158,9 @@ static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc)
  * @param  enable       enable as wake-up if equal to non-zero
  * @return       This function returns 0 on success.
  */
-static int mxs_gpio_set_wake_irq(u32 irq, u32 enable)
+static int mxs_gpio_set_wake_irq(struct irq_data *d, unsigned int enable)
 {
-	u32 gpio = irq_to_gpio(irq);
+	u32 gpio = irq_to_gpio(d->irq);
 	u32 gpio_idx = gpio & 0x1f;
 	struct mxs_gpio_port *port = &mxs_gpio_ports[gpio / 32];
 
@@ -180,11 +180,11 @@ static int mxs_gpio_set_wake_irq(u32 irq, u32 enable)
 }
 
 static struct irq_chip gpio_irq_chip = {
-	.ack = mxs_gpio_ack_irq,
-	.mask = mxs_gpio_mask_irq,
-	.unmask = mxs_gpio_unmask_irq,
-	.set_type = mxs_gpio_set_irq_type,
-	.set_wake = mxs_gpio_set_wake_irq,
+	.irq_ack = mxs_gpio_ack_irq,
+	.irq_mask = mxs_gpio_mask_irq,
+	.irq_unmask = mxs_gpio_unmask_irq,
+	.irq_set_type = mxs_gpio_set_irq_type,
+	.irq_set_wake = mxs_gpio_set_wake_irq,
 };
 
 static void mxs_set_gpio_direction(struct gpio_chip *chip, unsigned offset,
diff --git a/arch/arm/mach-mxs/icoll.c b/arch/arm/mach-mxs/icoll.c
index 5dd43ba..0f4c120 100644
--- a/arch/arm/mach-mxs/icoll.c
+++ b/arch/arm/mach-mxs/icoll.c
@@ -34,7 +34,7 @@
 
 static void __iomem *icoll_base = MXS_IO_ADDRESS(MXS_ICOLL_BASE_ADDR);
 
-static void icoll_ack_irq(unsigned int irq)
+static void icoll_ack_irq(struct irq_data *d)
 {
 	/*
 	 * The Interrupt Collector is able to prioritize irqs.
@@ -45,22 +45,22 @@ static void icoll_ack_irq(unsigned int irq)
 			icoll_base + HW_ICOLL_LEVELACK);
 }
 
-static void icoll_mask_irq(unsigned int irq)
+static void icoll_mask_irq(struct irq_data *d)
 {
 	__raw_writel(BM_ICOLL_INTERRUPTn_ENABLE,
-			icoll_base + HW_ICOLL_INTERRUPTn_CLR(irq));
+			icoll_base + HW_ICOLL_INTERRUPTn_CLR(d->irq));
 }
 
-static void icoll_unmask_irq(unsigned int irq)
+static void icoll_unmask_irq(struct irq_data *d)
 {
 	__raw_writel(BM_ICOLL_INTERRUPTn_ENABLE,
-			icoll_base + HW_ICOLL_INTERRUPTn_SET(irq));
+			icoll_base + HW_ICOLL_INTERRUPTn_SET(d->irq));
 }
 
 static struct irq_chip mxs_icoll_chip = {
-	.ack = icoll_ack_irq,
-	.mask = icoll_mask_irq,
-	.unmask = icoll_unmask_irq,
+	.irq_ack = icoll_ack_irq,
+	.irq_mask = icoll_mask_irq,
+	.irq_unmask = icoll_unmask_irq,
 };
 
 void __init icoll_init_irq(void)
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2] ARM: mxs: irq_data conversion
  2011-01-21 20:07   ` [PATCH v2] " Uwe Kleine-König
@ 2011-01-22  0:23     ` Lennert Buytenhek
  0 siblings, 0 replies; 11+ messages in thread
From: Lennert Buytenhek @ 2011-01-22  0:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 09:07:32PM +0100, Uwe Kleine-K?nig wrote:

> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Acked-by: Lennert Buytenhek <buytenh@secretlab.ca>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] ARM: mxs: irq_data conversion
  2011-01-21 10:47       ` Lennert Buytenhek
  2011-01-21 10:52         ` Russell King - ARM Linux
@ 2011-01-22  1:16         ` Lennert Buytenhek
  1 sibling, 0 replies; 11+ messages in thread
From: Lennert Buytenhek @ 2011-01-22  1:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 21, 2011 at 11:47:42AM +0100, Lennert Buytenhek wrote:

> > so... patches welcome.
> 
> I'll submit a patch for the above, and to make sure I'll build all
> defconfigs on current -devel as well.

Results:

ag5evm_defconfig fails with:

	arch/arm/mach-shmobile/built-in.o: In function `ag5evm_init':
	board-ag5evm.c:(.init.text+0x238): undefined reference to `sh73a0_pinmux_init'

which isn't my fault.


iop32x_defconfig fails with:

	/tmp/ccLtyaJK.s: Assembler messages:
	/tmp/ccLtyaJK.s:1468: Error: selected processor does not support `movt r2,32768'
	make[3]: *** [drivers/net/r8169.o] Error 1

which isn't immediately obvious (but also doesn't seem to be my fault).


magician_defconfig fails with:

	/data/buytenh/kern.irqdata/linux-2.6/drivers/mfd/asic3.c: In function ?asic3_irq_demux?:
	/data/buytenh/kern.irqdata/linux-2.6/drivers/mfd/asic3.c:146:6: error: ?struct irq_desc? has no member named ?chip?
	/data/buytenh/kern.irqdata/linux-2.6/drivers/mfd/asic3.c:148:13: error: ?struct irq_desc? has no member named ?handler_data?
	make[3]: *** [drivers/mfd/asic3.o] Error 1

for which I've submitted a patch here (my original mfd asic3 irq_data
patch did address this, but the patch that got merged instead didn't):

	http://marc.info/?l=linux-kernel&m=129565853125126&w=2


mx3_defconfig fails with:

	/data/buytenh/kern.irqdata/linux-2.6/drivers/dma/ipu/ipu_irq.c:349:2: error: unknown field ?ack? specified in initializer
	/data/buytenh/kern.irqdata/linux-2.6/drivers/dma/ipu/ipu_irq.c:349:2: warning: initialization from incompatible pointer type
	/data/buytenh/kern.irqdata/linux-2.6/drivers/dma/ipu/ipu_irq.c:350:2: error: unknown field ?mask? specified in initializer
	/data/buytenh/kern.irqdata/linux-2.6/drivers/dma/ipu/ipu_irq.c:350:2: warning: initialization from incompatible pointer type
	/data/buytenh/kern.irqdata/linux-2.6/drivers/dma/ipu/ipu_irq.c:351:2: error: unknown field ?unmask? specified in initializer
	/data/buytenh/kern.irqdata/linux-2.6/drivers/dma/ipu/ipu_irq.c:351:2: warning: initialization from incompatible pointer type
	make[4]: *** [drivers/dma/ipu/ipu_irq.o] Error 1

for which I've (re)submitted a patch here:

	http://marc.info/?l=linux-kernel&m=129565867725213&w=2


u8500_defconfig fails with:

	arch/arm/mach-ux500/built-in.o:(.data+0x2c04): undefined reference to `ab8500_regulators'
	make[1]: *** [.tmp_vmlinux1] Error 1

which isn't my fault.


The rest of the defconfigs build fine.  So I think that turning on
GENERIC_HARDIRQS_NO_DEPRECATED for ARM should be OK.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-01-22  1:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21  9:01 [PATCH] ARM: mxs: irq_data conversion Uwe Kleine-König
2011-01-21  9:43 ` Russell King - ARM Linux
2011-01-21 10:15   ` Uwe Kleine-König
2011-01-21 10:27     ` Russell King - ARM Linux
2011-01-21 10:47       ` Lennert Buytenhek
2011-01-21 10:52         ` Russell King - ARM Linux
2011-01-22  1:16         ` Lennert Buytenhek
2011-01-21 10:28     ` Lennert Buytenhek
2011-01-21 10:45       ` Russell King - ARM Linux
2011-01-21 20:07   ` [PATCH v2] " Uwe Kleine-König
2011-01-22  0:23     ` Lennert Buytenhek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.