Skip to contentSkip to conversation

pxa: encode IRQ number into .nr_irqs (SPARSE IRQ)

PATCH New Eric Miao 2 participants 12 messages May 24, 2010 – May 25, 2010

Subsystems (3)
lore
Share & tools
lore

Eric Miao

author
#0 lore raw

cover pxa: encode IRQ number into .nr_irqs (SPARSE IRQ)

With the introduction of SPARSE_IRQ, the total number of IRQs (NR_IRQS) can be made as a variable now. Conversion of most platforms looks to be quite straight forward (as illustrated with the subsequent patches). However, the platforms below select PXA_HAVE_BOARD_IRQS yet I feel hard to find clues in the code if any of the board IRQs are used and how many. Please advise:

$ git grep -B 5 PXA_HAVE_BOARD_IRQS arch/arm/mach-pxa/Kconfig

arch/arm/mach-pxa/Kconfig- bool "Arcom/Eurotech VIPER SBC"
arch/arm/mach-pxa/Kconfig- select PXA25x
arch/arm/mach-pxa/Kconfig- select ISA
arch/arm/mach-pxa/Kconfig- select I2C_GPIO
arch/arm/mach-pxa/Kconfig- select HAVE_PWM
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config MACH_ARCOM_ZEUS
arch/arm/mach-pxa/Kconfig- bool "Arcom/Eurotech ZEUS SBC"
arch/arm/mach-pxa/Kconfig- select PXA27x
arch/arm/mach-pxa/Kconfig- select ISA
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config MACH_INTELMOTE2
arch/arm/mach-pxa/Kconfig- bool "Intel Mote 2 Platform"
arch/arm/mach-pxa/Kconfig- select PXA27x
arch/arm/mach-pxa/Kconfig- select IWMMXT
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config MACH_STARGATE2
arch/arm/mach-pxa/Kconfig- bool "Intel Stargate 2 Platform"
arch/arm/mach-pxa/Kconfig- select PXA27x
arch/arm/mach-pxa/Kconfig- select IWMMXT
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config MACH_PCM027
arch/arm/mach-pxa/Kconfig- bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
arch/arm/mach-pxa/Kconfig- select PXA27x
arch/arm/mach-pxa/Kconfig- select IWMMXT
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig-config MACH_MAGICIAN
arch/arm/mach-pxa/Kconfig- bool "Enable HTC Magician Support"
arch/arm/mach-pxa/Kconfig- select PXA27x
arch/arm/mach-pxa/Kconfig- select IWMMXT
arch/arm/mach-pxa/Kconfig- select HAVE_PWM
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config MACH_TOSA
arch/arm/mach-pxa/Kconfig- bool "Enable Sharp SL-6000x (Tosa) Support"
arch/arm/mach-pxa/Kconfig- depends on PXA_SHARPSL
arch/arm/mach-pxa/Kconfig- select PXA25x
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- select PXA3xx
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config ARCH_PXA_ESERIES
arch/arm/mach-pxa/Kconfig- bool "PXA based Toshiba e-series PDAs"
arch/arm/mach-pxa/Kconfig- select PXA25x
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig-config MACH_ZIPIT2
arch/arm/mach-pxa/Kconfig- bool "Zipit Z2 Handheld"
arch/arm/mach-pxa/Kconfig- select PXA27x
arch/arm/mach-pxa/Kconfig- select HAVE_PWM
arch/arm/mach-pxa/Kconfig: select PXA_HAVE_BOARD_IRQS
--
arch/arm/mach-pxa/Kconfig- by either console keyboard driver or by Kdrive keybd driver.
arch/arm/mach-pxa/Kconfig-
arch/arm/mach-pxa/Kconfig- Say Y only if you know, what you are doing!
arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig- arch/arm/mach-pxa/Kconfig:config PXA_HAVE_BOARD_IRQS

author
#1 lore raw

PATCH 1/6 pxa: select SPARSE_IRQ by default

---
 arch/arm/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/Kconfig +1 -0
index 02df4fd..dece838 100644
@@ -579,6 +579,7 @@ config ARCH_PXA
 	select GENERIC_CLOCKEVENTS
 	select TICK_ONESHOT
 	select PLAT_PXA
+	select SPARSE_IRQ
 	help
 	  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
Signature · 1 line
1.7.0.4
author
#2 lore raw

PATCH 2/6 pxa: encode IRQ number into .nr_irqs

In reply to Eric Miao
---
 arch/arm/mach-pxa/Kconfig                  |    5 -----
 arch/arm/mach-pxa/include/mach/irqs.h      |    7 +------
 arch/arm/mach-pxa/include/mach/lpd270.h    |    1 +
 arch/arm/mach-pxa/include/mach/lubbock.h   |    3 +++
 arch/arm/mach-pxa/include/mach/mainstone.h |    2 ++
 arch/arm/mach-pxa/include/mach/poodle.h    |    2 ++
 arch/arm/mach-pxa/include/mach/zylonite.h  |    2 ++
 arch/arm/mach-pxa/lpd270.c                 |    1 +
 arch/arm/mach-pxa/lubbock.c                |    3 ++-
 arch/arm/mach-pxa/mainstone.c              |    1 +
 arch/arm/mach-pxa/poodle.c                 |    1 +
 arch/arm/mach-pxa/zylonite.c               |    1 +
 12 files changed, 17 insertions(+), 12 deletions(-)
arch/arm/mach-pxa/Kconfig +0 -5
index 3b51741..bf49135 100644
@@ -8,19 +8,16 @@ config ARCH_LUBBOCK
 	bool "Intel DBPXA250 Development Platform (aka Lubbock)"
 	select PXA25x
 	select SA1111
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_MAINSTONE
 	bool "Intel HCDDBBVA0 Development Platform (aka Mainstone)"
 	select PXA27x
 	select HAVE_PWM
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_ZYLONITE
 	bool
 	select PXA3xx
 	select HAVE_PWM
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_ZYLONITE300
 	bool "PXA3xx Development Platform (aka Zylonite) PXA300/310"
@@ -206,7 +203,6 @@ config MACH_LOGICPD_PXA270
 	bool "LogicPD PXA270 Card Engine Development Platform"
 	select PXA27x
 	select HAVE_PWM
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_PCM027
 	bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
@@ -463,7 +459,6 @@ config MACH_POODLE
 	depends on PXA_SHARPSL
 	select PXA25x
 	select SHARP_LOCOMO
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_CORGI
 	bool "Enable Sharp SL-C700 (Corgi) Support"
arch/arm/mach-pxa/include/mach/irqs.h +1 -6
index ffc8314..3b3b245 100644
@@ -127,8 +127,6 @@
 
 #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
@@ -138,13 +136,10 @@
 /*
  * Figure out the MAX IRQ number.
  *
- * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
  * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
  * Otherwise, we have the standard IRQs only.
  */
-#ifdef CONFIG_SA1111
-#define NR_IRQS			(IRQ_BOARD_END + 55)
-#elif defined(CONFIG_PXA_HAVE_BOARD_IRQS)
+#if defined(CONFIG_PXA_HAVE_BOARD_IRQS)
 #define NR_IRQS			(IRQ_BOARD_END)
 #else
 #define NR_IRQS			(IRQ_BOARD_START)
arch/arm/mach-pxa/include/mach/lpd270.h +1 -0
index 0e6440c..cd07009 100644
@@ -38,5 +38,6 @@
 #define LPD270_USBC_IRQ		LPD270_IRQ(2)
 #define LPD270_ETHERNET_IRQ	LPD270_IRQ(3)
 #define LPD270_AC97_IRQ		LPD270_IRQ(4)
+#define LPD270_NR_IRQS		(IRQ_BOARD_START + 5)
 
 #endif
arch/arm/mach-pxa/include/mach/lubbock.h +3 -0
index a0d4247..2a086e8 100644
@@ -45,6 +45,9 @@
 #define LUBBOCK_USB_DISC_IRQ	LUBBOCK_IRQ(6)  /* usb disconnect */
 #define LUBBOCK_LAST_IRQ	LUBBOCK_IRQ(6)
 
+#define LUBBOCK_SA1111_IRQ_BASE	(IRQ_BOARD_START + 16)
+#define LUBBOCK_NR_IRQS		(IRQ_BOARD_START + 16 + 55)
+
 #ifndef __ASSEMBLY__
 extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
 #endif
arch/arm/mach-pxa/include/mach/mainstone.h +2 -0
index 86e623a..4c2d11c 100644
@@ -134,4 +134,6 @@
 #define MAINSTONE_S1_STSCHG_IRQ	MAINSTONE_IRQ(14)
 #define MAINSTONE_S1_IRQ	MAINSTONE_IRQ(15)
 
+#define MAINSTONE_NR_IRQS	(IRQ_BOARD_START + 16)
+
 #endif
arch/arm/mach-pxa/include/mach/poodle.h +2 -0
index 0b3e6d0..83d1cfd 100644
@@ -85,6 +85,8 @@
 #define POODLE_LOCOMO_GPIO_232VCC_ON   LOCOMO_GPIO(12)
 #define POODLE_LOCOMO_GPIO_JK_B        LOCOMO_GPIO(13)
 
+#define POODLE_NR_IRQS		(IRQ_BOARD_START + 4)	/* 4 for LoCoMo */
+
 extern struct platform_device poodle_locomo_device;
 
 #endif /* __ASM_ARCH_POODLE_H  */
arch/arm/mach-pxa/include/mach/zylonite.h +2 -0
index 9edf645..ea24998 100644
@@ -5,6 +5,8 @@
 
 #define EXT_GPIO(x)		(128 + (x))
 
+#define ZYLONITE_NR_IRQS	(IRQ_BOARD_START + 32)
+
 /* the following variables are processor specific and initialized
  * by the corresponding zylonite_pxa3xx_init()
  */
arch/arm/mach-pxa/lpd270.c +1 -0
index d279507..fc9502e 100644
@@ -509,6 +509,7 @@ MACHINE_START(LOGICPD_PXA270, "LogicPD PXA270 Card Engine")
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params	= 0xa0000100,
 	.map_io		= lpd270_map_io,
+	.nr_irqs	= LPD270_NR_IRQS,
 	.init_irq	= lpd270_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= lpd270_init,
arch/arm/mach-pxa/lubbock.c +2 -1
index 330c328..1956c23 100644
@@ -229,7 +229,7 @@ static struct resource sa1111_resources[] = {
 };
 
 static struct sa1111_platform_data sa1111_info = {
-	.irq_base	= IRQ_BOARD_END,
+	.irq_base	= LUBBOCK_SA1111_IRQ_BASE,
 };
 
 static struct platform_device sa1111_device = {
@@ -560,6 +560,7 @@ MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
 	.phys_io	= 0x40000000,
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.map_io		= lubbock_map_io,
+	.nr_irqs	= LUBBOCK_NR_IRQS,
 	.init_irq	= lubbock_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= lubbock_init,
arch/arm/mach-pxa/mainstone.c +1 -0
index 5543c64..c2a8717 100644
@@ -628,6 +628,7 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
 	.boot_params	= 0xa0000100,	/* BLOB boot parameter setting */
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.map_io		= mainstone_map_io,
+	.nr_irqs	= MAINSTONE_NR_IRQS,
 	.init_irq	= mainstone_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= mainstone_init,
arch/arm/mach-pxa/poodle.c +1 -0
index f4abdaa..aef6a9e 100644
@@ -472,6 +472,7 @@ MACHINE_START(POODLE, "SHARP Poodle")
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.fixup		= fixup_poodle,
 	.map_io		= pxa_map_io,
+	.nr_irqs	= POODLE_NR_IRQS,	/* 4 for LoCoMo */
 	.init_irq	= pxa25x_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= poodle_init,
arch/arm/mach-pxa/zylonite.c +1 -0
index c479cbe..2edad61 100644
@@ -415,6 +415,7 @@ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
 	.boot_params	= 0xa0000100,
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.map_io		= pxa_map_io,
+	.nr_irqs	= ZYLONITE_NR_IRQS,
 	.init_irq	= pxa3xx_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= zylonite_init,
Signature · 1 line
1.7.0.4
author
#3 lore raw

PATCH 3/6 pxa/hx4700: encode IRQ number into .nr_irqs

In reply to Eric Miao
Cc Philipp Zabel <[email protected]>
---
 arch/arm/mach-pxa/Kconfig               |    1 -
 arch/arm/mach-pxa/hx4700.c              |    1 +
 arch/arm/mach-pxa/include/mach/hx4700.h |    4 ++++
 arch/arm/mach-pxa/include/mach/irqs.h   |    4 +---
 4 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-pxa/Kconfig +0 -1
index bf49135..32b1fd2 100644
@@ -259,7 +259,6 @@ config MACH_H4700
 	select PXA27x
 	select IWMMXT
 	select HAVE_PWM
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_H5000
 	bool "HP iPAQ h5000"
arch/arm/mach-pxa/hx4700.c +1 -0
index 848c861..10104f1 100644
@@ -874,6 +874,7 @@ MACHINE_START(H4700, "HP iPAQ HX4700")
 	.io_pg_offst  = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params  = 0xa0000100,
 	.map_io       = pxa_map_io,
+	.nr_irqs      = HX4700_NR_IRQS,
 	.init_irq     = pxa27x_init_irq,
 	.init_machine = hx4700_init,
 	.timer        = &pxa_timer,
arch/arm/mach-pxa/include/mach/hx4700.h +4 -0
index 9eaeed1..862a190 100644
@@ -128,4 +128,8 @@
 #define EGPIO7_VCC_3V3_WL_EN	(HX4700_EGPIO_BASE + 7)	/* WLAN 3.3V enable */
 #define EGPIO8_USB_3V3_ON	(HX4700_EGPIO_BASE + 8)	/* unused */
 
+/*
+ * IRQs
+ */
+#define HX4700_NR_IRQS		(IRQ_BOARD_START + 70)	/* ASIC3 */
 #endif /* _HX4700_H_ */
arch/arm/mach-pxa/include/mach/irqs.h +1 -3
index 3b3b245..169567c 100644
@@ -125,9 +125,7 @@
  */
 #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_PXA_EZX)
+#if defined(CONFIG_PXA_EZX)
 #define IRQ_BOARD_END		(IRQ_BOARD_START + 23)
 #else
 #define IRQ_BOARD_END		(IRQ_BOARD_START + 16)
Signature · 1 line
1.7.0.4
author
#4 lore raw

PATCH 4/6 pxa/ezx: encode IRQ number into .nr_irqs

In reply to Eric Miao
Cc Daniel Ribeiro <[email protected]>
Cc Stefan Schmidt <[email protected]>
Cc Harald Welte <[email protected]>
---
 arch/arm/mach-pxa/Kconfig             |    1 -
 arch/arm/mach-pxa/ezx.c               |    8 ++++++++
 arch/arm/mach-pxa/include/mach/irqs.h |    5 -----
 3 files changed, 8 insertions(+), 6 deletions(-)
arch/arm/mach-pxa/Kconfig +0 -1
index 32b1fd2..60b3c17 100644
@@ -291,7 +291,6 @@ config PXA_EZX
 	select PXA27x
 	select IWMMXT
 	select HAVE_PWM
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_EZX_A780
 	bool "Motorola EZX A780"
arch/arm/mach-pxa/ezx.c +8 -0
index 626c82b..3d9cf20 100644
@@ -47,6 +47,8 @@
 #define GPIO19_GEN1_CAM_RST		19
 #define GPIO28_GEN2_CAM_RST		28
 
+#define EZX_NR_IRQS			(IRQ_BOARD_START + 23)
+
 static struct platform_pwm_backlight_data ezx_backlight_data = {
 	.pwm_id		= 0,
 	.max_brightness	= 1023,
@@ -800,6 +802,7 @@ MACHINE_START(EZX_A780, "Motorola EZX A780")
 	.io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params    = 0xa0000100,
 	.map_io         = pxa_map_io,
+	.nr_irqs	= EZX_NR_IRQS,
 	.init_irq       = pxa27x_init_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = a780_init,
@@ -866,6 +869,7 @@ MACHINE_START(EZX_E680, "Motorola EZX E680")
 	.io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params    = 0xa0000100,
 	.map_io         = pxa_map_io,
+	.nr_irqs	= EZX_NR_IRQS,
 	.init_irq       = pxa27x_init_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = e680_init,
@@ -932,6 +936,7 @@ MACHINE_START(EZX_A1200, "Motorola EZX A1200")
 	.io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params    = 0xa0000100,
 	.map_io         = pxa_map_io,
+	.nr_irqs	= EZX_NR_IRQS,
 	.init_irq       = pxa27x_init_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = a1200_init,
@@ -1124,6 +1129,7 @@ MACHINE_START(EZX_A910, "Motorola EZX A910")
 	.io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params    = 0xa0000100,
 	.map_io         = pxa_map_io,
+	.nr_irqs	= EZX_NR_IRQS,
 	.init_irq       = pxa27x_init_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = a910_init,
@@ -1190,6 +1196,7 @@ MACHINE_START(EZX_E6, "Motorola EZX E6")
 	.io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params    = 0xa0000100,
 	.map_io         = pxa_map_io,
+	.nr_irqs	= EZX_NR_IRQS,
 	.init_irq       = pxa27x_init_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = e6_init,
@@ -1230,6 +1237,7 @@ MACHINE_START(EZX_E2, "Motorola EZX E2")
 	.io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.boot_params    = 0xa0000100,
 	.map_io         = pxa_map_io,
+	.nr_irqs	= EZX_NR_IRQS,
 	.init_irq       = pxa27x_init_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = e2_init,
arch/arm/mach-pxa/include/mach/irqs.h +0 -5
index 169567c..145fe1d 100644
@@ -124,12 +124,7 @@
  * used.
  */
 #define IRQ_BOARD_START		(PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM)
-
-#if defined(CONFIG_PXA_EZX)
-#define IRQ_BOARD_END		(IRQ_BOARD_START + 23)
-#else
 #define IRQ_BOARD_END		(IRQ_BOARD_START + 16)
-#endif
 
 /*
  * Figure out the MAX IRQ number.
Signature · 1 line
1.7.0.4
author
#5 lore raw

PATCH 5/6 pxa/balloon3: encode number of IRQ into .nr_irqs

In reply to Eric Miao
Cc Jonathan McDowell <[email protected]>
---
 arch/arm/mach-pxa/Kconfig                 |    1 -
 arch/arm/mach-pxa/balloon3.c              |    1 +
 arch/arm/mach-pxa/include/mach/balloon3.h |    1 +
 3 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/Kconfig +0 -1
index 60b3c17..3378c79 100644
@@ -74,7 +74,6 @@ config MACH_BALLOON3
 	bool "Balloon 3 board"
 	select PXA27x
 	select IWMMXT
-	select PXA_HAVE_BOARD_IRQS
 
 config MACH_CSB726
 	bool "Enable Cogent CSB726 System On a Module"
arch/arm/mach-pxa/balloon3.c +1 -0
index f3b5ace..c9a50b3 100644
@@ -349,6 +349,7 @@ MACHINE_START(BALLOON3, "Balloon3")
 	.phys_io	= 0x40000000,
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.map_io		= balloon3_map_io,
+	.nr_irqs	= BALLOON3_NR_IRQS,
 	.init_irq	= balloon3_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= balloon3_init,
arch/arm/mach-pxa/include/mach/balloon3.h +1 -0
index 1a74106..1b76a00 100644
@@ -131,6 +131,7 @@ enum balloon3_features {
 
 /* Balloon3 Interrupts */
 #define BALLOON3_IRQ(x)		(IRQ_BOARD_START + (x))
+#define BALLOON3_NR_IRQS	(IRQ_BOARD_START + 8)
 
 #define BALLOON3_BP_CF_NRDY_IRQ	BALLOON3_IRQ(0)
 #define BALLOON3_BP_NSTSCHG_IRQ	BALLOON3_IRQ(1)
Signature · 1 line
1.7.0.4
author
#6 lore raw

PATCH 6/6 pxa/cm-x2xx: encode IRQ number into .nr_irqs

In reply to Eric Miao
Cc Mike Rapoport <[email protected]>
---
 arch/arm/mach-pxa/cm-x2xx-pci.h       |    6 ++++++
 arch/arm/mach-pxa/cm-x2xx.c           |    1 +
 arch/arm/mach-pxa/include/mach/irqs.h |   11 -----------
 3 files changed, 7 insertions(+), 11 deletions(-)
arch/arm/mach-pxa/cm-x2xx-pci.h +6 -0
index e24aad2..9a87134 100644
@@ -11,3 +11,9 @@ extern void __cmx2xx_pci_resume(void);
 #define cmx2xx_pci_suspend(x) do {} while (0)
 #define cmx2xx_pci_resume(x) do {} while (0)
 #endif
+
+#ifdef CONFIG_PCI
+#define CMX2XX_NR_IRQS	(IRQ_BOARD_START + 41)
+#else
+#define CMX2XX_NR_IRQS	IRQ_BOARD_START
+#endif
arch/arm/mach-pxa/cm-x2xx.c +1 -0
index bff6e78..d10b733 100644
@@ -514,6 +514,7 @@ MACHINE_START(ARMCORE, "Compulab CM-X2XX")
 	.phys_io	= 0x40000000,
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.map_io		= cmx2xx_map_io,
+	.nr_irqs	= CMX2XX_NR_IRQS,
 	.init_irq	= cmx2xx_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= cmx2xx_init,
arch/arm/mach-pxa/include/mach/irqs.h +0 -11
index 145fe1d..62d148c 100644
@@ -138,15 +138,4 @@
 #define NR_IRQS			(IRQ_BOARD_START)
 #endif
 
-/* add IT8152 IRQs beyond BOARD_END */
-#ifdef CONFIG_PCI_HOST_ITE8152
-#define IT8152_LAST_IRQ         (IRQ_BOARD_END + 40)
-
-#if NR_IRQS < (IT8152_LAST_IRQ+1)
-#undef NR_IRQS
-#define NR_IRQS (IT8152_LAST_IRQ+1)
-#endif
-
-#endif /* CONFIG_PCI_HOST_ITE8152 */
-
 #endif /* __ASM_MACH_IRQS_H */
Signature · 1 line
1.7.0.4
#7 lore raw

PATCH 6/6 pxa/cm-x2xx: encode IRQ number into .nr_irqs

Hi Eric,

Quoted 7 lines · Eric Miao
Cc Mike Rapoport <[email protected]>
---
 arch/arm/mach-pxa/cm-x2xx-pci.h       |    6 ++++++
 arch/arm/mach-pxa/cm-x2xx.c           |    1 +
 arch/arm/mach-pxa/include/mach/irqs.h |   11 -----------
 3 files changed, 7 insertions(+), 11 deletions(-)

Looks Ok to me. Do you have a tree I can pull to test your changes?

Quoted 46 lines
arch/arm/mach-pxa/cm-x2xx-pci.h +6 -0
index e24aad2..9a87134 100644
@@ -11,3 +11,9 @@ extern void __cmx2xx_pci_resume(void);
 #define cmx2xx_pci_suspend(x) do {} while (0)
 #define cmx2xx_pci_resume(x) do {} while (0)
 #endif
+
+#ifdef CONFIG_PCI
+#define CMX2XX_NR_IRQS	(IRQ_BOARD_START + 41)
+#else
+#define CMX2XX_NR_IRQS	IRQ_BOARD_START
+#endif
arch/arm/mach-pxa/cm-x2xx.c +1 -0
index bff6e78..d10b733 100644
@@ -514,6 +514,7 @@ MACHINE_START(ARMCORE, "Compulab CM-X2XX")
 	.phys_io	= 0x40000000,
 	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
 	.map_io		= cmx2xx_map_io,
+	.nr_irqs	= CMX2XX_NR_IRQS,
 	.init_irq	= cmx2xx_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= cmx2xx_init,
arch/arm/mach-pxa/include/mach/irqs.h +0 -11
index 145fe1d..62d148c 100644
@@ -138,15 +138,4 @@
 #define NR_IRQS			(IRQ_BOARD_START)
 #endif
 
-/* add IT8152 IRQs beyond BOARD_END */
-#ifdef CONFIG_PCI_HOST_ITE8152
-#define IT8152_LAST_IRQ         (IRQ_BOARD_END + 40)
-
-#if NR_IRQS < (IT8152_LAST_IRQ+1)
-#undef NR_IRQS
-#define NR_IRQS (IT8152_LAST_IRQ+1)
-#endif
-
-#endif /* CONFIG_PCI_HOST_ITE8152 */
-
 #endif /* __ASM_MACH_IRQS_H */
Signature · 2 lines
Sincerely yours,
Mike.
author
#8 lore raw

PATCH 6/6 pxa/cm-x2xx: encode IRQ number into .nr_irqs

Should be in my irq_cleanup branch, test welcome

On May 24, 2010 3:34 PM, "Mike Rapoport" <[email protected]> wrote:

Hi Eric,

Quoted 3 lines · Eric Miao
Cc Mike Rapoport <[email protected]>
Signed-off-by Eric Miao <eric.y.mi...

Looks Ok to me. Do you have a tree I can pull to test your changes?

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-pxa/cm-x2xx-pci.h

Quoted 1 line

index e24aad2.....

Sincerely yours,
Mike.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100524/246da28a/attachment.htm>

#9 lore raw

PATCH 6/6 pxa/cm-x2xx: encode IRQ number into .nr_irqs

Hi Eric,

Quoted 1 line · Eric Miao

Should be in my irq_cleanup branch, test welcome

works with the below patch on top your irq_cleanup branch:

-
From: Mike Rapoport <[email protected]>
Date: Tue, 25 May 2010 11:28:08 +0300
Subject: [PATCH] [ARM] it8152: update interrupts numbering to work with sparse irqs

---
  arch/arm/include/asm/hardware/it8152.h |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/arch/arm/include/asm/hardware/it8152.h
index 6700c7f..b2f95c7 100644

arch/arm/include/asm/hardware/it8152.h +2 -1
@@ -75,7 +75,8 @@ extern unsigned long it8152_base_address;
    IT8152_PD_IRQ(1)  USB (USBR)
    IT8152_PD_IRQ(0)  Audio controller (ACR)
   */
-#define IT8152_IRQ(x)   (IRQ_BOARD_END + (x))
+#define IT8152_IRQ(x)   (IRQ_BOARD_START + (x))
+#define IT8152_LAST_IRQ	(IRQ_BOARD_START + 40)
 
  /* IRQ-sources in 3 groups - local devices, LPC (serial), and external 

PCI */
#define IT8152_LD_IRQ_COUNT 9

Signature · 1 line
1.6.4.4
Quoted 23 lines
Quoted 22 lines

On May 24, 2010 3:34 PM, "Mike Rapoport" <[email protected] <mailto:[email protected]>> wrote:

Hi Eric,

Quoted 3 lines · Eric Miao
Cc Mike Rapoport <mike at compulab.co.il <mailto:[email protected]>>
Signed-off-by Eric Miao <eric.y.mi...

Looks Ok to me. Do you have a tree I can pull to test your changes?

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-pxa/cm-x2xx-pci.h

Quoted 1 line

index e24aad2.....

Sincerely yours,
Mike.

Signature · 7 lines
Sincerely yours,
Mike.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-ARM-it8152-update-interrupts-numbering-to-work-with-.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100525/48b3b51a/attachment.el>
author
#10 lore raw

PATCH 6/6 pxa/cm-x2xx: encode IRQ number into .nr_irqs

Quoted 8 lines · Mike Rapoport

Hi Eric,

Quoted 2 lines · Eric Miao

Should be in my irq_cleanup branch, test welcome

works with the below patch on top your irq_cleanup branch:

Thanks Mike, looks like a fix. You mind if I merge this into the previous patch with your Signed-off-by?

Quoted 92 lines

-
From: Mike Rapoport <[email protected]>
Date: Tue, 25 May 2010 11:28:08 +0300
Subject: [PATCH] [ARM] it8152: update interrupts numbering to work with sparse irqs

---
?arch/arm/include/asm/hardware/it8152.h | ? ?3 ++- ?1 files changed, 2 insertions(+), 1 deletions(-)

arch/arm/include/asm/hardware/it8152.h +0 -0
index 6700c7f..b2f95c7 100644
@@ -75,7 +75,8 @@ extern unsigned long it8152_base_address;
 ? IT8152_PD_IRQ(1) ?USB (USBR)
 ? IT8152_PD_IRQ(0) ?Audio controller (ACR)

?*/

arch/arm/include/asm/hardware/it8152.h +2 -1
-#define IT8152_IRQ(x) ? (IRQ_BOARD_END + (x))
+#define IT8152_IRQ(x) ? (IRQ_BOARD_START + (x))
+#define IT8152_LAST_IRQ ? ? ? ?(IRQ_BOARD_START + 40)

?/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
?#define IT8152_LD_IRQ_COUNT ? ? 9
--
1.6.4.4

Quoted 16 lines
Quoted 16 lines

On May 24, 2010 3:34 PM, "Mike Rapoport" <[email protected] <mailto:[email protected]>> wrote:

Hi Eric,

Quoted 3 lines · Eric Miao
Cc Mike Rapoport <mike at compulab.co.il <mailto:[email protected]>>
Signed-off-by Eric Miao <eric.y.mi...

Looks Ok to me. Do you have a tree I can pull to test your changes?

Quoted 7 lines
Quoted 6 lines

arch/arm/mach-pxa/cm-x2xx-pci.h

Quoted 3 lines
arch/arm/mach-pxa/cm-x2xx-pci.h +0 -0
index e24aad2.....

Sincerely yours,
Mike.

--
Sincerely yours,
Mike.

From ec3ae629d9844ea5f6d7588ca7451377e640a960 Mon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Tue, 25 May 2010 11:28:08 +0300
Subject: [PATCH] [ARM] it8152: update interrupts numbering to work with sparse irqs

---
?arch/arm/include/asm/hardware/it8152.h | ? ?3 ++- ?1 files changed, 2 insertions(+), 1 deletions(-)

arch/arm/include/asm/hardware/it8152.h +0 -0
index 6700c7f..b2f95c7 100644
@@ -75,7 +75,8 @@ extern unsigned long it8152_base_address;
 ? IT8152_PD_IRQ(1) ?USB (USBR)
 ? IT8152_PD_IRQ(0) ?Audio controller (ACR)

?*/

arch/arm/include/asm/hardware/it8152.h +2 -1
-#define IT8152_IRQ(x) ? (IRQ_BOARD_END + (x))
+#define IT8152_IRQ(x) ? (IRQ_BOARD_START + (x))
+#define IT8152_LAST_IRQ ? ? ? ?(IRQ_BOARD_START + 40)

?/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
?#define IT8152_LD_IRQ_COUNT ? ? 9
--
1.6.4.4

#11 lore raw

PATCH 6/6 pxa/cm-x2xx: encode IRQ number into .nr_irqs

Quoted 10 lines · Eric Miao
Quoted 6 lines · Mike Rapoport

Hi Eric,

Quoted 1 line · Eric Miao

Should be in my irq_cleanup branch, test welcome

works with the below patch on top your irq_cleanup branch:

Thanks Mike, looks like a fix. You mind if I merge this into the previous patch with your Signed-off-by?

No problem.

Quoted 87 lines
Quoted 87 lines

-
From: Mike Rapoport <[email protected]>
Date: Tue, 25 May 2010 11:28:08 +0300
Subject: [PATCH] [ARM] it8152: update interrupts numbering to work with sparse irqs

---
 arch/arm/include/asm/hardware/it8152.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/include/asm/hardware/it8152.h +2 -1
index 6700c7f..b2f95c7 100644
@@ -75,7 +75,8 @@ extern unsigned long it8152_base_address;
  IT8152_PD_IRQ(1)  USB (USBR)
  IT8152_PD_IRQ(0)  Audio controller (ACR)
 */
-#define IT8152_IRQ(x)   (IRQ_BOARD_END + (x))
+#define IT8152_IRQ(x)   (IRQ_BOARD_START + (x))
+#define IT8152_LAST_IRQ        (IRQ_BOARD_START + 40)
 
 /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI
 */

#define IT8152_LD_IRQ_COUNT 9
--
1.6.4.4

Quoted 14 lines
Quoted 14 lines

On May 24, 2010 3:34 PM, "Mike Rapoport" <[email protected] <mailto:[email protected]>> wrote:

Hi Eric,

Quoted 2 lines · Eric Miao
Cc Mike Rapoport <mike at compulab.co.il <mailto:[email protected]>>
Signed-off-by Eric Miao <eric.y.mi...

Looks Ok to me. Do you have a tree I can pull to test your changes?

Quoted 5 lines
Quoted 5 lines

arch/arm/mach-pxa/cm-x2xx-pci.h

Quoted 3 lines
arch/arm/mach-pxa/cm-x2xx-pci.h +0 -0
index e24aad2.....

Sincerely yours,
Mike.

--
Sincerely yours,
Mike.

From ec3ae629d9844ea5f6d7588ca7451377e640a960 Mon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Tue, 25 May 2010 11:28:08 +0300
Subject: [PATCH] [ARM] it8152: update interrupts numbering to work with sparse irqs

---
 arch/arm/include/asm/hardware/it8152.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/include/asm/hardware/it8152.h +2 -1
index 6700c7f..b2f95c7 100644
@@ -75,7 +75,8 @@ extern unsigned long it8152_base_address;
  IT8152_PD_IRQ(1)  USB (USBR)
  IT8152_PD_IRQ(0)  Audio controller (ACR)
 */
-#define IT8152_IRQ(x)   (IRQ_BOARD_END + (x))
+#define IT8152_IRQ(x)   (IRQ_BOARD_START + (x))
+#define IT8152_LAST_IRQ        (IRQ_BOARD_START + 40)
 
 /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI
 */

#define IT8152_LD_IRQ_COUNT 9
--
1.6.4.4

Signature · 2 lines
Sincerely yours,
Mike.