linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mx31ads: Provide a name for EXPIO interrupt chip
@ 2010-01-05 13:41 Mark Brown
  2010-01-05 13:41 ` [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2010-01-05 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

This makes it a bit more obvious in genirq diagnostics that they
aren't handled by the i.MX interrupt controller.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/mach-mx3/mx31ads.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index a579f4c..c486c2f 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -173,6 +173,7 @@ static void expio_unmask_irq(u32 irq)
 }
 
 static struct irq_chip expio_irq_chip = {
+	.name = "EXPIO(CPLD)",
 	.ack = expio_ack_irq,
 	.mask = expio_mask_irq,
 	.unmask = expio_unmask_irq,
-- 
1.6.5.7

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

* [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module
  2010-01-05 13:41 [PATCH 1/2] mx31ads: Provide a name for EXPIO interrupt chip Mark Brown
@ 2010-01-05 13:41 ` Mark Brown
  2010-01-05 13:57   ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2010-01-05 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

The WM8350 core won't actually use the range yet, but it will in
future and the platform data to configure it is there now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/mach-mx3/mx31ads.c           |    1 +
 arch/arm/plat-mxc/include/mach/irqs.h |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index c486c2f..ed8498a 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -452,6 +452,7 @@ static int mx31_wm8350_init(struct wm8350 *wm8350)
 
 static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
 	.init = mx31_wm8350_init,
+	.irq_base = MXC_BOARD_IRQ_START + MXC_MAX_EXP_IO_LINES,
 };
 #endif
 
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
index ead9d59..ae801e5 100644
--- a/arch/arm/plat-mxc/include/mach/irqs.h
+++ b/arch/arm/plat-mxc/include/mach/irqs.h
@@ -37,7 +37,14 @@
  * within sensible limits.
  */
 #define MXC_BOARD_IRQ_START	(MXC_INTERNAL_IRQS + MXC_GPIO_IRQS)
+
+#if defined(CONFIG_MACH_MX31ADS_WM1133_EV1) && !defined(MXC_BOARD_IRQS)
+#define MXC_BOARD_IRQS  80
+#endif
+
+#ifndef MXC_BOARD_IRQS
 #define MXC_BOARD_IRQS	16
+#endif
 
 #define MXC_IPU_IRQ_START	(MXC_BOARD_IRQ_START + MXC_BOARD_IRQS)
 
-- 
1.6.5.7

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

* [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module
  2010-01-05 13:41 ` [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module Mark Brown
@ 2010-01-05 13:57   ` Sascha Hauer
  2010-01-05 15:20     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2010-01-05 13:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 05, 2010 at 01:41:06PM +0000, Mark Brown wrote:
> The WM8350 core won't actually use the range yet, but it will in
> future and the platform data to configure it is there now.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  arch/arm/mach-mx3/mx31ads.c           |    1 +
>  arch/arm/plat-mxc/include/mach/irqs.h |    7 +++++++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
> index c486c2f..ed8498a 100644
> --- a/arch/arm/mach-mx3/mx31ads.c
> +++ b/arch/arm/mach-mx3/mx31ads.c
> @@ -452,6 +452,7 @@ static int mx31_wm8350_init(struct wm8350 *wm8350)
>  
>  static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
>  	.init = mx31_wm8350_init,
> +	.irq_base = MXC_BOARD_IRQ_START + MXC_MAX_EXP_IO_LINES,
>  };
>  #endif
>  
> diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
> index ead9d59..ae801e5 100644
> --- a/arch/arm/plat-mxc/include/mach/irqs.h
> +++ b/arch/arm/plat-mxc/include/mach/irqs.h
> @@ -37,7 +37,14 @@
>   * within sensible limits.
>   */
>  #define MXC_BOARD_IRQ_START	(MXC_INTERNAL_IRQS + MXC_GPIO_IRQS)
> +
> +#if defined(CONFIG_MACH_MX31ADS_WM1133_EV1) && !defined(MXC_BOARD_IRQS)
> +#define MXC_BOARD_IRQS  80
> +#endif
> +
> +#ifndef MXC_BOARD_IRQS
>  #define MXC_BOARD_IRQS	16
> +#endif

I just had a look how other architectures handle this and I like it how
pxa does it:

/*
 * The following interrupts are for board specific purposes. Since
 * the kernel can only run on one machine at a time, we can re-use
 * these.  There will be 16 IRQs by default.  If it is not enough,
 * IRQ_BOARD_END is allowed be customized for each board, but keep
 * the numbers within sensible limits and in descending order, so
 * when multiple config options are selected, the maximum will be
 * used.
 */
#define IRQ_BOARD_START		(PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM)

#if defined(CONFIG_MACH_H4700)
#define IRQ_BOARD_END		(IRQ_BOARD_START + 70)
#elif defined(CONFIG_MACH_ZYLONITE)
#define IRQ_BOARD_END		(IRQ_BOARD_START + 32)
#elif defined(CONFIG_PXA_EZX)
#define IRQ_BOARD_END		(IRQ_BOARD_START + 23)
#else
#define IRQ_BOARD_END		(IRQ_BOARD_START + 16)
#endif


Can we do the same, so something like this?

/*
 * The following interrupts are for board specific purposes. Since
 * the kernel can only run on one machine at a time, we can re-use
 * these.  There will be 16 IRQs by default.  If it is not enough,
 * MXC_BOARD_IRQS is allowed be customized for each board, but keep
 * the numbers within sensible limits and in descending order, so
 * when multiple config options are selected, the maximum will be
 * used.
 */

#if defined(CONFIG_MACH_MX31ADS_WM1133_EV1)
#define MXC_BOARD_IRQS 80
#else
#define MXC_BOARD_IRQS 16
#endif

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module
  2010-01-05 13:57   ` Sascha Hauer
@ 2010-01-05 15:20     ` Mark Brown
  2010-01-05 15:47       ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2010-01-05 15:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 05, 2010 at 02:57:28PM +0100, Sascha Hauer wrote:

> I just had a look how other architectures handle this and I like it how
> pxa does it:

Yeah, my thinking here was to achieve the same thing with something more
like the existing i.MX code plus a bit more whitespace for legibility -
the end result is pretty much the same but a little less dense.  You'd
wind up with an ordered stack of these ifdef blocks very much like those
that PXA has.  I'm not that fussed either way, really, but I do like a
bit more whitespace.

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

* [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module
  2010-01-05 15:20     ` Mark Brown
@ 2010-01-05 15:47       ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2010-01-05 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 05, 2010 at 03:20:14PM +0000, Mark Brown wrote:
> On Tue, Jan 05, 2010 at 02:57:28PM +0100, Sascha Hauer wrote:
> 
> > I just had a look how other architectures handle this and I like it how
> > pxa does it:
> 
> Yeah, my thinking here was to achieve the same thing with something more
> like the existing i.MX code plus a bit more whitespace for legibility -
> the end result is pretty much the same but a little less dense.  You'd
> wind up with an ordered stack of these ifdef blocks very much like those
> that PXA has.  I'm not that fussed either way, really, but I do like a
> bit more whitespace.

Feel free to add more whitespaces. What I like about pxa is that it
makes clear that MXC_BOARD_IRQS is defined exactly in this file (no
additional #ifndef MXC_BOARD_IRQS) and that it describes how people
should add additional irqs.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module
  2010-01-05 16:05 [PATCH 1/2] mx31ads: Provide a name for EXPIO interrupt chip Mark Brown
@ 2010-01-05 16:05 ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-01-05 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

The WM8350 core won't actually use the range yet, but it will in
future and the platform data to configure it is there now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/mach-mx3/mx31ads.c           |    1 +
 arch/arm/plat-mxc/include/mach/irqs.h |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index c486c2f..ed8498a 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -452,6 +452,7 @@ static int mx31_wm8350_init(struct wm8350 *wm8350)
 
 static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
 	.init = mx31_wm8350_init,
+	.irq_base = MXC_BOARD_IRQ_START + MXC_MAX_EXP_IO_LINES,
 };
 #endif
 
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
index ead9d59..0cb3476 100644
--- a/arch/arm/plat-mxc/include/mach/irqs.h
+++ b/arch/arm/plat-mxc/include/mach/irqs.h
@@ -37,7 +37,12 @@
  * within sensible limits.
  */
 #define MXC_BOARD_IRQ_START	(MXC_INTERNAL_IRQS + MXC_GPIO_IRQS)
+
+#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
+#define MXC_BOARD_IRQS  80
+#else
 #define MXC_BOARD_IRQS	16
+#endif
 
 #define MXC_IPU_IRQ_START	(MXC_BOARD_IRQ_START + MXC_BOARD_IRQS)
 
-- 
1.6.5.7

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

end of thread, other threads:[~2010-01-05 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-05 13:41 [PATCH 1/2] mx31ads: Provide a name for EXPIO interrupt chip Mark Brown
2010-01-05 13:41 ` [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module Mark Brown
2010-01-05 13:57   ` Sascha Hauer
2010-01-05 15:20     ` Mark Brown
2010-01-05 15:47       ` Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2010-01-05 16:05 [PATCH 1/2] mx31ads: Provide a name for EXPIO interrupt chip Mark Brown
2010-01-05 16:05 ` [PATCH 2/2] mx31ads: Provide an IRQ range to the WM835x on the 1133-EV1 module Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).