* [RFC PATCH 00/10] Make mach/irqs.h optional
@ 2012-01-13 16:34 Rob Herring
2012-01-13 16:34 ` [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h Rob Herring
` (10 more replies)
0 siblings, 11 replies; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
This series removes the include of mach/irqs.h from asm/irq.h when
SPARSE_IRQ is selected. Platforms which select SPARSE_IRQ have been
updated.
This breaks platforms where SPARSE_IRQ is user selectable. This is on
purpose so that SPARSE_IRQ gets properly supported. We could push
HAVE_SPARSE_IRQ option down to the platforms that select it if that is
preferred. But as recent experience has shown, perhaps breaking platforms
is the only way to get some platforms updated.
Platforms either need to set nr_irqs in their machine desc or all irqchips
used by a platform need to allocate their irq_descs. There cannot be a
mixture. Once this is done, the platforms can select SPARSE_IRQ. shmobile
does the latter, and mnp and pxa do the former.
I've built all defconfigs, but don't have any of the affected platforms to
boot test. I think shmobile is the main platform that needs testing here.
This series is available here:
git://sources.calxeda.com/kernel/linux.git sparse_irq
Rob
Rob Herring (10):
rtc: sa1100: include mach/irqs.h instead of asm/irq.h
sound: pxa2xx-ac97: include mach/irqs.h directly
ARM: mc146818rtc: remove unnecessary include of mach/irqs.h
ARM: it8152: explicitly include mach/irqs.h
sh: intc: remove dependency on NR_IRQS
ARM: mmp: remove NR_IRQS
ARM: pxa: remove NR_IRQS
ARM: shmobile: remove NR_IRQS
ARM: only include mach/irqs.h for !SPARSE_IRQ
ARM: highbank: select SPARSE_IRQ and remove irqs.h
arch/arm/Kconfig | 1 +
arch/arm/include/asm/hardware/it8152.h | 3 +++
arch/arm/include/asm/irq.h | 8 ++++++--
arch/arm/include/asm/mc146818rtc.h | 1 -
arch/arm/mach-highbank/highbank.c | 1 -
arch/arm/mach-highbank/include/mach/irqs.h | 6 ------
arch/arm/mach-mmp/avengers_lite.c | 1 +
arch/arm/mach-mmp/include/mach/irqs.h | 2 --
arch/arm/mach-mmp/irq-mmp2.c | 1 +
arch/arm/mach-mmp/jasper.c | 1 +
arch/arm/mach-mmp/tavorevb.c | 1 +
arch/arm/mach-pxa/capc7117.c | 1 +
arch/arm/mach-pxa/cm-x300.c | 1 +
arch/arm/mach-pxa/colibri-pxa270.c | 2 ++
arch/arm/mach-pxa/colibri-pxa300.c | 1 +
arch/arm/mach-pxa/colibri-pxa320.c | 1 +
arch/arm/mach-pxa/corgi.c | 3 +++
arch/arm/mach-pxa/csb726.c | 1 +
arch/arm/mach-pxa/devices.c | 1 +
arch/arm/mach-pxa/em-x270.c | 2 ++
arch/arm/mach-pxa/gumstix.c | 1 +
arch/arm/mach-pxa/h5000.c | 1 +
arch/arm/mach-pxa/himalaya.c | 1 +
arch/arm/mach-pxa/icontrol.c | 1 +
arch/arm/mach-pxa/idp.c | 1 +
arch/arm/mach-pxa/include/mach/irqs.h | 2 +-
arch/arm/mach-pxa/mioa701.c | 1 +
arch/arm/mach-pxa/mp900.c | 1 +
arch/arm/mach-pxa/palmld.c | 1 +
arch/arm/mach-pxa/palmt5.c | 1 +
arch/arm/mach-pxa/palmtc.c | 1 +
arch/arm/mach-pxa/palmte2.c | 1 +
arch/arm/mach-pxa/palmtreo.c | 2 ++
arch/arm/mach-pxa/palmtx.c | 1 +
arch/arm/mach-pxa/palmz72.c | 1 +
arch/arm/mach-pxa/raumfeld.c | 3 +++
arch/arm/mach-pxa/saar.c | 1 +
arch/arm/mach-pxa/spitz.c | 3 +++
arch/arm/mach-pxa/stargate2.c | 1 +
arch/arm/mach-pxa/tavorevb.c | 1 +
arch/arm/mach-pxa/time.c | 1 +
arch/arm/mach-pxa/trizeps4.c | 2 ++
arch/arm/mach-pxa/viper.c | 1 +
arch/arm/mach-pxa/vpac270.c | 1 +
arch/arm/mach-pxa/xcep.c | 1 +
arch/arm/mach-pxa/z2.c | 1 +
arch/arm/mach-shmobile/board-g3evm.c | 1 +
arch/arm/mach-shmobile/board-g4evm.c | 1 +
arch/arm/mach-shmobile/board-kota2.c | 1 +
arch/arm/mach-shmobile/board-mackerel.c | 1 +
arch/arm/mach-shmobile/include/mach/irqs.h | 2 --
arch/arm/mach-shmobile/intc-sh7367.c | 1 +
arch/arm/mach-shmobile/intc-sh7372.c | 1 +
arch/arm/mach-shmobile/intc-sh7377.c | 1 +
arch/arm/mach-shmobile/intc-sh73a0.c | 1 +
arch/arm/mach-shmobile/setup-sh7367.c | 1 +
arch/arm/mach-shmobile/setup-sh7372.c | 1 +
arch/arm/mach-shmobile/setup-sh7377.c | 1 +
arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
drivers/rtc/rtc-sa1100.c | 2 +-
drivers/sh/intc/balancing.c | 2 +-
drivers/sh/intc/core.c | 2 +-
drivers/sh/intc/handle.c | 2 +-
drivers/sh/intc/internals.h | 9 +++++++++
drivers/sh/intc/virq.c | 2 +-
sound/arm/pxa2xx-ac97-lib.c | 2 +-
66 files changed, 86 insertions(+), 21 deletions(-)
delete mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
--
1.7.5.4
^ permalink raw reply [flat|nested] 28+ messages in thread
* [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 16:43 ` Russell King - ARM Linux
2012-01-13 16:34 ` [RFC PATCH 02/10] sound: pxa2xx-ac97: include mach/irqs.h directly Rob Herring
` (9 subsequent siblings)
10 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
drivers/rtc/rtc-sa1100.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 4595d3e..144fa06 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -33,7 +33,7 @@
#include <linux/io.h>
#include <mach/hardware.h>
-#include <asm/irq.h>
+#include <mach/irqs.h>
#define RTC_DEF_DIVIDER (32768 - 1)
#define RTC_DEF_TRIM 0
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 02/10] sound: pxa2xx-ac97: include mach/irqs.h directly
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
2012-01-13 16:34 ` [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 16:34 ` [RFC PATCH 03/10] ARM: mc146818rtc: remove unnecessary include of mach/irqs.h Rob Herring
` (8 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
In preparation of removing mach/irqs.h include from asm/irq.h, include
mach/irqs.h directly.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
sound/arm/pxa2xx-ac97-lib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index d1aa421..0e9e822 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -21,7 +21,7 @@
#include <sound/ac97_codec.h>
#include <sound/pxa2xx-lib.h>
-#include <asm/irq.h>
+#include <mach/irqs.h>
#include <mach/regs-ac97.h>
#include <mach/audio.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 03/10] ARM: mc146818rtc: remove unnecessary include of mach/irqs.h
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
2012-01-13 16:34 ` [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h Rob Herring
2012-01-13 16:34 ` [RFC PATCH 02/10] sound: pxa2xx-ac97: include mach/irqs.h directly Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 16:52 ` Russell King - ARM Linux
2012-01-13 16:34 ` [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h Rob Herring
` (7 subsequent siblings)
10 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
The include of mach/irqs.h isn't needed, so remove it. Compiled CMOS rtc
driver.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/include/asm/mc146818rtc.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/arm/include/asm/mc146818rtc.h b/arch/arm/include/asm/mc146818rtc.h
index 6b884d2..d535470 100644
--- a/arch/arm/include/asm/mc146818rtc.h
+++ b/arch/arm/include/asm/mc146818rtc.h
@@ -5,7 +5,6 @@
#define _ASM_MC146818RTC_H
#include <linux/io.h>
-#include <mach/irqs.h>
#ifndef RTC_PORT
#define RTC_PORT(x) (0x70 + (x))
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (2 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 03/10] ARM: mc146818rtc: remove unnecessary include of mach/irqs.h Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 22:02 ` Rob Herring
2012-01-13 16:34 ` [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS Rob Herring
` (6 subsequent siblings)
10 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
In preparation to make mach/irqs.h optional, directly include mach/irq.h
to get IRQ_BOARD_START.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/include/asm/hardware/it8152.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
index 43cab49..73f84fa 100644
--- a/arch/arm/include/asm/hardware/it8152.h
+++ b/arch/arm/include/asm/hardware/it8152.h
@@ -9,6 +9,9 @@
#ifndef __ASM_HARDWARE_IT8152_H
#define __ASM_HARDWARE_IT8152_H
+
+#include <mach/irqs.h>
+
extern void __iomem *it8152_base_address;
#define IT8152_IO_BASE (it8152_base_address + 0x03e00000)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (3 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-17 1:54 ` Nobuhiro Iwamatsu
2012-01-13 16:34 ` [RFC PATCH 06/10] ARM: mmp: remove NR_IRQS Rob Herring
` (5 subsequent siblings)
10 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
SH intc has a compile time dependency on NR_IRQS. Make this dependency a
local define so that shmobile (and ARM in general) can have run-time
NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to
1024, so we are using the maximum.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
drivers/sh/intc/balancing.c | 2 +-
drivers/sh/intc/core.c | 2 +-
drivers/sh/intc/handle.c | 2 +-
drivers/sh/intc/internals.h | 9 +++++++++
drivers/sh/intc/virq.c | 2 +-
5 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c
index cec7a96..bc78080 100644
--- a/drivers/sh/intc/balancing.c
+++ b/drivers/sh/intc/balancing.c
@@ -9,7 +9,7 @@
*/
#include "internals.h"
-static unsigned long dist_handle[NR_IRQS];
+static unsigned long dist_handle[INTC_NR_IRQS];
void intc_balancing_enable(unsigned int irq)
{
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index e53e449..2fde897 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
* - this needs to be at least 2 for 5-bit priorities on 7780
*/
static unsigned int default_prio_level = 2; /* 2 - 16 */
-static unsigned int intc_prio_level[NR_IRQS]; /* for now */
+static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */
unsigned int intc_get_dfl_prio_level(void)
{
diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c
index 057ce56..f461d53 100644
--- a/drivers/sh/intc/handle.c
+++ b/drivers/sh/intc/handle.c
@@ -13,7 +13,7 @@
#include <linux/spinlock.h>
#include "internals.h"
-static unsigned long ack_handle[NR_IRQS];
+static unsigned long ack_handle[INTC_NR_IRQS];
static intc_enum __init intc_grp_id(struct intc_desc *desc,
intc_enum enum_id)
diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index b0e9155..469f092 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -6,6 +6,15 @@
#include <linux/radix-tree.h>
#include <linux/device.h>
+#define INTC_NR_IRQS 1024
+
+#ifndef evt2irq
+#define evt2irq(evt) (((evt) >> 5) - 16)
+#endif
+#ifndef irq2evt
+#define irq2evt(irq) (((irq) + 16) << 5)
+#endif
+
#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \
((addr_e) << 16) | ((addr_d << 24)))
diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c
index c7ec49f..93cec21 100644
--- a/drivers/sh/intc/virq.c
+++ b/drivers/sh/intc/virq.c
@@ -17,7 +17,7 @@
#include <linux/export.h>
#include "internals.h"
-static struct intc_map_entry intc_irq_xlate[NR_IRQS];
+static struct intc_map_entry intc_irq_xlate[INTC_NR_IRQS];
struct intc_virq_list {
unsigned int irq;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 06/10] ARM: mmp: remove NR_IRQS
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (4 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 20:30 ` Nicolas Pitre
2012-01-13 16:34 ` [RFC PATCH 07/10] ARM: pxa: " Rob Herring
` (4 subsequent siblings)
10 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Remove NR_IRQS and add a per machine .nr_irqs setting.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-mmp/avengers_lite.c | 1 +
arch/arm/mach-mmp/include/mach/irqs.h | 2 --
arch/arm/mach-mmp/irq-mmp2.c | 1 +
arch/arm/mach-mmp/jasper.c | 1 +
arch/arm/mach-mmp/tavorevb.c | 1 +
5 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c
index b148a9d..0fd60fb 100644
--- a/arch/arm/mach-mmp/avengers_lite.c
+++ b/arch/arm/mach-mmp/avengers_lite.c
@@ -43,6 +43,7 @@ static void __init avengers_lite_init(void)
MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
.map_io = mmp_map_io,
+ .nr_irqs = IRQ_BOARD_START,
.init_irq = pxa168_init_irq,
.timer = &pxa168_timer,
.init_machine = avengers_lite_init,
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
index 34635a0..25e6d60 100644
--- a/arch/arm/mach-mmp/include/mach/irqs.h
+++ b/arch/arm/mach-mmp/include/mach/irqs.h
@@ -224,6 +224,4 @@
#define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO)
-#define NR_IRQS (IRQ_BOARD_START)
-
#endif /* __ASM_MACH_IRQS_H */
diff --git a/arch/arm/mach-mmp/irq-mmp2.c b/arch/arm/mach-mmp/irq-mmp2.c
index d21c544..7895d27 100644
--- a/arch/arm/mach-mmp/irq-mmp2.c
+++ b/arch/arm/mach-mmp/irq-mmp2.c
@@ -15,6 +15,7 @@
#include <linux/irq.h>
#include <linux/io.h>
+#include <mach/irqs.h>
#include <mach/regs-icu.h>
#include <mach/mmp2.h>
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c
index 96cf5c8..8f80c31 100644
--- a/arch/arm/mach-mmp/jasper.c
+++ b/arch/arm/mach-mmp/jasper.c
@@ -19,6 +19,7 @@
#include <linux/mfd/max8925.h>
#include <linux/interrupt.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/addr-map.h>
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
index 8e3b5af0..d3ba655 100644
--- a/arch/arm/mach-mmp/tavorevb.c
+++ b/arch/arm/mach-mmp/tavorevb.c
@@ -102,6 +102,7 @@ static void __init tavorevb_init(void)
MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
.map_io = mmp_map_io,
+ .nr_irqs = IRQ_BOARD_START,
.init_irq = pxa910_init_irq,
.timer = &pxa910_timer,
.init_machine = tavorevb_init,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 07/10] ARM: pxa: remove NR_IRQS
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (5 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 06/10] ARM: mmp: remove NR_IRQS Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 16:34 ` [RFC PATCH 08/10] ARM: shmobile: " Rob Herring
` (3 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Remove NR_IRQS and add a per machine .nr_irqs setting.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-pxa/capc7117.c | 1 +
arch/arm/mach-pxa/cm-x300.c | 1 +
arch/arm/mach-pxa/colibri-pxa270.c | 2 ++
arch/arm/mach-pxa/colibri-pxa300.c | 1 +
arch/arm/mach-pxa/colibri-pxa320.c | 1 +
arch/arm/mach-pxa/corgi.c | 3 +++
arch/arm/mach-pxa/csb726.c | 1 +
arch/arm/mach-pxa/devices.c | 1 +
arch/arm/mach-pxa/em-x270.c | 2 ++
arch/arm/mach-pxa/gumstix.c | 1 +
arch/arm/mach-pxa/h5000.c | 1 +
arch/arm/mach-pxa/himalaya.c | 1 +
arch/arm/mach-pxa/icontrol.c | 1 +
arch/arm/mach-pxa/idp.c | 1 +
arch/arm/mach-pxa/include/mach/irqs.h | 2 +-
arch/arm/mach-pxa/mioa701.c | 1 +
arch/arm/mach-pxa/mp900.c | 1 +
arch/arm/mach-pxa/palmld.c | 1 +
arch/arm/mach-pxa/palmt5.c | 1 +
arch/arm/mach-pxa/palmtc.c | 1 +
arch/arm/mach-pxa/palmte2.c | 1 +
arch/arm/mach-pxa/palmtreo.c | 2 ++
arch/arm/mach-pxa/palmtx.c | 1 +
arch/arm/mach-pxa/palmz72.c | 1 +
arch/arm/mach-pxa/raumfeld.c | 3 +++
arch/arm/mach-pxa/saar.c | 1 +
arch/arm/mach-pxa/spitz.c | 3 +++
arch/arm/mach-pxa/stargate2.c | 1 +
arch/arm/mach-pxa/tavorevb.c | 1 +
arch/arm/mach-pxa/time.c | 1 +
arch/arm/mach-pxa/trizeps4.c | 2 ++
arch/arm/mach-pxa/viper.c | 1 +
arch/arm/mach-pxa/vpac270.c | 1 +
arch/arm/mach-pxa/xcep.c | 1 +
arch/arm/mach-pxa/z2.c | 1 +
35 files changed, 45 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c
index c91727d..9a8760b 100644
--- a/arch/arm/mach-pxa/capc7117.c
+++ b/arch/arm/mach-pxa/capc7117.c
@@ -150,6 +150,7 @@ MACHINE_START(CAPC7117,
"Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM")
.atag_offset = 0x100,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 4b981b8..133ccee 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -853,6 +853,7 @@ static void __init cm_x300_fixup(struct tag *tags, char **cmdline,
MACHINE_START(CM_X300, "CM-X300 module")
.atag_offset = 0x100,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 29d5d54..b2f227d 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -310,6 +310,7 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
.atag_offset = 0x100,
.init_machine = colibri_pxa270_init,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
@@ -320,6 +321,7 @@ MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
.atag_offset = 0x100,
.init_machine = colibri_pxa270_income_init,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 0846d21..bb6def8 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -186,6 +186,7 @@ MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
.atag_offset = 0x100,
.init_machine = colibri_pxa300_init,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 6ad3359..d88e7b3 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -256,6 +256,7 @@ MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
.atag_offset = 0x100,
.init_machine = colibri_pxa320_init,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 66600f0..e6285c8 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -721,6 +721,7 @@ static void __init fixup_corgi(struct tag *tags, char **cmdline,
MACHINE_START(CORGI, "SHARP Corgi")
.fixup = fixup_corgi,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.init_machine = corgi_init,
@@ -733,6 +734,7 @@ MACHINE_END
MACHINE_START(SHEPHERD, "SHARP Shepherd")
.fixup = fixup_corgi,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.init_machine = corgi_init,
@@ -745,6 +747,7 @@ MACHINE_END
MACHINE_START(HUSKY, "SHARP Husky")
.fixup = fixup_corgi,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.init_machine = corgi_init,
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
index fb5a51d..67f0de3 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -274,6 +274,7 @@ static void __init csb726_init(void)
MACHINE_START(CSB726, "Cogent CSB726")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.init_machine = csb726_init,
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 18fd177..72a15a6 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -12,6 +12,7 @@
#include <mach/pxafb.h>
#include <mach/mmc.h>
#include <mach/irda.h>
+#include <mach/irqs.h>
#include <mach/ohci.h>
#include <plat/pxa27x_keypad.h>
#include <mach/camera.h>
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index d80c0ba..c1b65da 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1301,6 +1301,7 @@ static void __init em_x270_init(void)
MACHINE_START(EM_X270, "Compulab EM-X270")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
@@ -1311,6 +1312,7 @@ MACHINE_END
MACHINE_START(EXEDA, "Compulab eXeda")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index ac3b1ce..e529a35 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -235,6 +235,7 @@ static void __init gumstix_init(void)
MACHINE_START(GUMSTIX, "Gumstix")
.atag_offset = 0x100, /* match u-boot bi_boot_params */
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
index fde6b4c..e7dec58 100644
--- a/arch/arm/mach-pxa/h5000.c
+++ b/arch/arm/mach-pxa/h5000.c
@@ -205,6 +205,7 @@ static void __init h5000_init(void)
MACHINE_START(H5400, "HP iPAQ H5000")
.atag_offset = 0x100,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
index 26d069a..2962de8 100644
--- a/arch/arm/mach-pxa/himalaya.c
+++ b/arch/arm/mach-pxa/himalaya.c
@@ -160,6 +160,7 @@ static void __init himalaya_init(void)
MACHINE_START(HIMALAYA, "HTC Himalaya")
.atag_offset = 0x100,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.init_machine = himalaya_init,
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c
index 6740019..1d02eab 100644
--- a/arch/arm/mach-pxa/icontrol.c
+++ b/arch/arm/mach-pxa/icontrol.c
@@ -193,6 +193,7 @@ static void __init icontrol_init(void)
MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM")
.atag_offset = 0x100,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 8af1840..6ff466b 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -195,6 +195,7 @@ static void __init idp_map_io(void)
MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
/* Maintainer: Vibren Technologies */
.map_io = idp_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h
index 32975ad..8765782 100644
--- a/arch/arm/mach-pxa/include/mach/irqs.h
+++ b/arch/arm/mach-pxa/include/mach/irqs.h
@@ -100,7 +100,7 @@
*/
#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_NR_BUILTIN_GPIO)
-#define NR_IRQS (IRQ_BOARD_START)
+#define PXA_NR_IRQS (IRQ_BOARD_START)
#ifndef __ASSEMBLY__
struct irq_data;
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index e80a3db..061d570 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -758,6 +758,7 @@ MACHINE_START(MIOA701, "MIO A701")
.atag_offset = 0x100,
.restart_mode = 's',
.map_io = &pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = &pxa27x_init_irq,
.handle_irq = &pxa27x_handle_irq,
.init_machine = mioa701_machine_init,
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
index 169bf8f..152efbf 100644
--- a/arch/arm/mach-pxa/mp900.c
+++ b/arch/arm/mach-pxa/mp900.c
@@ -95,6 +95,7 @@ MACHINE_START(NEC_MP900, "MobilePro900/C")
.atag_offset = 0x220100,
.timer = &pxa_timer,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.init_machine = mp900c_init,
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 1fa80f4f..31e0433 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -344,6 +344,7 @@ static void __init palmld_init(void)
MACHINE_START(PALMLD, "Palm LifeDrive")
.atag_offset = 0x100,
.map_io = palmld_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 5ba1431..0f6bd4f 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -205,6 +205,7 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
.reserve = palmt5_reserve,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 29b51b4..e2d97ee 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -539,6 +539,7 @@ static void __init palmtc_init(void)
MACHINE_START(PALMTC, "Palm Tungsten|C")
.atag_offset = 0x100,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index 5ebf49acb..c054827 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -358,6 +358,7 @@ static void __init palmte2_init(void)
MACHINE_START(PALMTE2, "Palm Tungsten|E2")
.atag_offset = 0x100,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index ec82491..fbdebee 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -448,6 +448,7 @@ MACHINE_START(TREO680, "Palm Treo 680")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
.reserve = treo_reserve,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
@@ -461,6 +462,7 @@ MACHINE_START(CENTRO, "Palm Centro 685")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
.reserve = treo_reserve,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 6170d76..9507605 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -366,6 +366,7 @@ static void __init palmtx_init(void)
MACHINE_START(PALMTX, "Palm T|X")
.atag_offset = 0x100,
.map_io = palmtx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index b2dff9d..a97b599 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -401,6 +401,7 @@ static void __init palmz72_init(void)
MACHINE_START(PALMZ72, "Palm Zire72")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 22818c7..7d691e5 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -1090,6 +1090,7 @@ MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
.atag_offset = 0x100,
.init_machine = raumfeld_controller_init,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
@@ -1102,6 +1103,7 @@ MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
.atag_offset = 0x100,
.init_machine = raumfeld_connector_init,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
@@ -1114,6 +1116,7 @@ MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
.atag_offset = 0x100,
.init_machine = raumfeld_speaker_init,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
index 0fe354e..86c95a5 100644
--- a/arch/arm/mach-pxa/saar.c
+++ b/arch/arm/mach-pxa/saar.c
@@ -598,6 +598,7 @@ MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
/* Maintainer: Eric Miao <eric.miao@marvell.com> */
.atag_offset = 0x100,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index abf355d..df2ab0f 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -984,6 +984,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
.restart_mode = 'g',
.fixup = spitz_fixup,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.init_machine = spitz_init,
@@ -997,6 +998,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
.restart_mode = 'g',
.fixup = spitz_fixup,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.init_machine = spitz_init,
@@ -1010,6 +1012,7 @@ MACHINE_START(AKITA, "SHARP Akita")
.restart_mode = 'g',
.fixup = spitz_fixup,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.init_machine = spitz_init,
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index d8a2467..1c1bbb7 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -1000,6 +1000,7 @@ static void __init stargate2_init(void)
#ifdef CONFIG_MACH_INTELMOTE2
MACHINE_START(INTELMOTE2, "IMOTE 2")
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index 9fb38e8..736bfdc 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -491,6 +491,7 @@ MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")
/* Maintainer: Eric Miao <eric.miao@marvell.com> */
.atag_offset = 0x100,
.map_io = pxa3xx_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa3xx_init_irq,
.handle_irq = pxa3xx_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index b503049..3d6c9bd 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -22,6 +22,7 @@
#include <asm/mach/time.h>
#include <asm/sched_clock.h>
#include <mach/regs-ost.h>
+#include <mach/irqs.h>
/*
* This is PXA's sched_clock implementation. This has a resolution
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 0f30af6..2b6ac00 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -558,6 +558,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
.atag_offset = 0x100,
.init_machine = trizeps4_init,
.map_io = trizeps4_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
@@ -569,6 +570,7 @@ MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
.atag_offset = 0x100,
.init_machine = trizeps4_init,
.map_io = trizeps4_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index 023d6ca..3143c39 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -994,6 +994,7 @@ MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")
/* Maintainer: Marc Zyngier <maz@misterjones.org> */
.atag_offset = 0x100,
.map_io = viper_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = viper_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 1f5cfa9..c57ab63 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -718,6 +718,7 @@ static void __init vpac270_init(void)
MACHINE_START(VPAC270, "Voipac PXA270")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 4bbe9a3..4275713 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -182,6 +182,7 @@ MACHINE_START(XCEP, "Iskratel XCEP")
.atag_offset = 0x100,
.init_machine = xcep_init,
.map_io = pxa25x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa25x_init_irq,
.handle_irq = pxa25x_handle_irq,
.timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index b647684..fa86199 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -721,6 +721,7 @@ static void __init z2_init(void)
MACHINE_START(ZIPIT2, "Zipit Z2")
.atag_offset = 0x100,
.map_io = pxa27x_map_io,
+ .nr_irqs = PXA_NR_IRQS,
.init_irq = pxa27x_init_irq,
.handle_irq = pxa27x_handle_irq,
.timer = &pxa_timer,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 08/10] ARM: shmobile: remove NR_IRQS
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (6 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 07/10] ARM: pxa: " Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 16:34 ` [RFC PATCH 09/10] ARM: only include mach/irqs.h for !SPARSE_IRQ Rob Herring
` (2 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Remove NR_IRQS and explicitly include mach/irqs.h as needed. shmobile
properly allocates irq_descs for each irqchip, so setting .nr_irqs for
each machine is not needed.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-shmobile/board-g3evm.c | 1 +
arch/arm/mach-shmobile/board-g4evm.c | 1 +
arch/arm/mach-shmobile/board-kota2.c | 1 +
arch/arm/mach-shmobile/board-mackerel.c | 1 +
arch/arm/mach-shmobile/include/mach/irqs.h | 2 --
arch/arm/mach-shmobile/intc-sh7367.c | 1 +
arch/arm/mach-shmobile/intc-sh7372.c | 1 +
arch/arm/mach-shmobile/intc-sh7377.c | 1 +
arch/arm/mach-shmobile/intc-sh73a0.c | 1 +
arch/arm/mach-shmobile/setup-sh7367.c | 1 +
arch/arm/mach-shmobile/setup-sh7372.c | 1 +
arch/arm/mach-shmobile/setup-sh7377.c | 1 +
arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
13 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
index 72d5572..6dbdc42 100644
--- a/arch/arm/mach-shmobile/board-g3evm.c
+++ b/arch/arm/mach-shmobile/board-g3evm.c
@@ -33,6 +33,7 @@
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
#include <linux/dma-mapping.h>
+#include <mach/irqs.h>
#include <mach/sh7367.h>
#include <mach/common.h>
#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
index 2220b88..2936ccc 100644
--- a/arch/arm/mach-shmobile/board-g4evm.c
+++ b/arch/arm/mach-shmobile/board-g4evm.c
@@ -34,6 +34,7 @@
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/gpio.h>
#include <linux/dma-mapping.h>
+#include <mach/irqs.h>
#include <mach/sh7377.h>
#include <mach/common.h>
#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index 857ceee..c71780b 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -39,6 +39,7 @@
#include <linux/mfd/tmio.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <mach/hardware.h>
+#include <mach/irqs.h>
#include <mach/sh73a0.h>
#include <mach/common.h>
#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index ed52566..a5d09f5 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -55,6 +55,7 @@
#include <sound/sh_fsi.h>
#include <mach/common.h>
+#include <mach/irqs.h>
#include <mach/sh7372.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
index dcb714f..4ccb562 100644
--- a/arch/arm/mach-shmobile/include/mach/irqs.h
+++ b/arch/arm/mach-shmobile/include/mach/irqs.h
@@ -1,8 +1,6 @@
#ifndef __ASM_MACH_IRQS_H
#define __ASM_MACH_IRQS_H
-#define NR_IRQS 1024
-
/* GIC */
#define gic_spi(nr) ((nr) + 32)
diff --git a/arch/arm/mach-shmobile/intc-sh7367.c b/arch/arm/mach-shmobile/intc-sh7367.c
index cfde9bf..5bf7764 100644
--- a/arch/arm/mach-shmobile/intc-sh7367.c
+++ b/arch/arm/mach-shmobile/intc-sh7367.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/sh_intc.h>
#include <mach/intc.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
index 89afcab..6447e0a 100644
--- a/arch/arm/mach-shmobile/intc-sh7372.c
+++ b/arch/arm/mach-shmobile/intc-sh7372.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/sh_intc.h>
#include <mach/intc.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c
index 2af4e6e..b84a460 100644
--- a/arch/arm/mach-shmobile/intc-sh7377.c
+++ b/arch/arm/mach-shmobile/intc-sh7377.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/sh_intc.h>
#include <mach/intc.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
index 1eda6b0..9a8207c 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/sh_intc.h>
#include <mach/intc.h>
+#include <mach/irqs.h>
#include <mach/sh73a0.h>
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c
index e546017..8e848198 100644
--- a/arch/arm/mach-shmobile/setup-sh7367.c
+++ b/arch/arm/mach-shmobile/setup-sh7367.c
@@ -29,6 +29,7 @@
#include <linux/serial_sci.h>
#include <linux/sh_timer.h>
#include <mach/hardware.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index c197f9d..6045b79 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -32,6 +32,7 @@
#include <linux/sh_timer.h>
#include <linux/pm_domain.h>
#include <mach/hardware.h>
+#include <mach/irqs.h>
#include <mach/sh7372.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c
index bb405b8..747ed8e 100644
--- a/arch/arm/mach-shmobile/setup-sh7377.c
+++ b/arch/arm/mach-shmobile/setup-sh7377.c
@@ -30,6 +30,7 @@
#include <linux/sh_intc.h>
#include <linux/sh_timer.h>
#include <mach/hardware.h>
+#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e46821c..dcf00ef 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -31,6 +31,7 @@
#include <linux/sh_intc.h>
#include <linux/sh_timer.h>
#include <mach/hardware.h>
+#include <mach/irqs.h>
#include <mach/sh73a0.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 09/10] ARM: only include mach/irqs.h for !SPARSE_IRQ
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (7 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 08/10] ARM: shmobile: " Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 16:34 ` [RFC PATCH 10/10] ARM: highbank: select SPARSE_IRQ and remove irqs.h Rob Herring
2012-01-13 17:42 ` [RFC PATCH 00/10] Make mach/irqs.h optional Jamie Iles
10 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Make mach/irqs.h optional for SPARSE_IRQ. With this change irqs.h can be
removed by converting platforms over to sparse irq.
This intentionally breaks platforms that enable SPARSE_IRQ.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/include/asm/irq.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 5a526af..35c21c3 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -1,14 +1,18 @@
#ifndef __ASM_ARM_IRQ_H
#define __ASM_ARM_IRQ_H
+#define NR_IRQS_LEGACY 16
+
+#ifndef CONFIG_SPARSE_IRQ
#include <mach/irqs.h>
+#else
+#define NR_IRQS NR_IRQS_LEGACY
+#endif
#ifndef irq_canonicalize
#define irq_canonicalize(i) (i)
#endif
-#define NR_IRQS_LEGACY 16
-
/*
* Use this value to indicate lack of interrupt
* capability
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 10/10] ARM: highbank: select SPARSE_IRQ and remove irqs.h
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (8 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 09/10] ARM: only include mach/irqs.h for !SPARSE_IRQ Rob Herring
@ 2012-01-13 16:34 ` Rob Herring
2012-01-13 17:42 ` [RFC PATCH 00/10] Make mach/irqs.h optional Jamie Iles
10 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:34 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
irqs.h is optional now for SPARSE_IRQ, so select it and remove mach/irqs.h
from highbank.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/Kconfig | 1 +
arch/arm/mach-highbank/highbank.c | 1 -
arch/arm/mach-highbank/include/mach/irqs.h | 6 ------
3 files changed, 1 insertions(+), 7 deletions(-)
delete mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 24626b0..a3c19cb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -350,6 +350,7 @@ config ARCH_HIGHBANK
select GENERIC_CLOCKEVENTS
select HAVE_ARM_SCU
select HAVE_SMP
+ select SPARSE_IRQ
select USE_OF
help
Support for the Calxeda Highbank SoC based boards.
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 804c4a5..3257d48 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -34,7 +34,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
-#include <mach/irqs.h>
#include "core.h"
#include "sysregs.h"
diff --git a/arch/arm/mach-highbank/include/mach/irqs.h b/arch/arm/mach-highbank/include/mach/irqs.h
deleted file mode 100644
index 9746aab..0000000
--- a/arch/arm/mach-highbank/include/mach/irqs.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __MACH_IRQS_H
-#define __MACH_IRQS_H
-
-#define NR_IRQS 192
-
-#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 16:34 ` [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h Rob Herring
@ 2012-01-13 16:43 ` Russell King - ARM Linux
2012-01-13 16:58 ` Rob Herring
0 siblings, 1 reply; 28+ messages in thread
From: Russell King - ARM Linux @ 2012-01-13 16:43 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 13, 2012 at 10:34:02AM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.
Rather than doing this, we should be eliminating the need for these
old drivers to include mach/irqs.h at all.
Adding the resources to the platform device, and then using at least
the IRQ resource(s) would be a definite step forward (and a relatively
easy one to do.)
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> drivers/rtc/rtc-sa1100.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
> index 4595d3e..144fa06 100644
> --- a/drivers/rtc/rtc-sa1100.c
> +++ b/drivers/rtc/rtc-sa1100.c
> @@ -33,7 +33,7 @@
> #include <linux/io.h>
>
> #include <mach/hardware.h>
> -#include <asm/irq.h>
> +#include <mach/irqs.h>
>
> #define RTC_DEF_DIVIDER (32768 - 1)
> #define RTC_DEF_TRIM 0
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 03/10] ARM: mc146818rtc: remove unnecessary include of mach/irqs.h
2012-01-13 16:34 ` [RFC PATCH 03/10] ARM: mc146818rtc: remove unnecessary include of mach/irqs.h Rob Herring
@ 2012-01-13 16:52 ` Russell King - ARM Linux
0 siblings, 0 replies; 28+ messages in thread
From: Russell King - ARM Linux @ 2012-01-13 16:52 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 13, 2012 at 10:34:04AM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> The include of mach/irqs.h isn't needed, so remove it. Compiled CMOS rtc
> driver.
I'm not sure how safe this is - there are some drivers using mc146818rtc.h
which get their IRQ via this header file (it's known as RTC_IRQ.) So we
need to verify that nothing breaks as a result of that definition going
away when this file is included.
It looks like it's just drivers/char/rtc.c, which we don't use anymore
on ARM. So this should be safe.
It might be worth adding:
#define RTC_IRQ BUILD_BUG_ON(true)
or something like that, to catch any users of it (even though that'll then
cause drivers/char/rtc.c to fail if built on ARM, which it shouldn't be.)
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 16:43 ` Russell King - ARM Linux
@ 2012-01-13 16:58 ` Rob Herring
2012-01-13 20:46 ` Nicolas Pitre
0 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 16:58 UTC (permalink / raw)
To: linux-arm-kernel
On 01/13/2012 10:43 AM, Russell King - ARM Linux wrote:
> On Fri, Jan 13, 2012 at 10:34:02AM -0600, Rob Herring wrote:
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.
>
> Rather than doing this, we should be eliminating the need for these
> old drivers to include mach/irqs.h at all.
>
> Adding the resources to the platform device, and then using at least
> the IRQ resource(s) would be a definite step forward (and a relatively
> easy one to do.)
>
Well, this has just happened in 3.3. So I can now drop this one I think.
Rob
>>
>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>> ---
>> drivers/rtc/rtc-sa1100.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
>> index 4595d3e..144fa06 100644
>> --- a/drivers/rtc/rtc-sa1100.c
>> +++ b/drivers/rtc/rtc-sa1100.c
>> @@ -33,7 +33,7 @@
>> #include <linux/io.h>
>>
>> #include <mach/hardware.h>
>> -#include <asm/irq.h>
>> +#include <mach/irqs.h>
>>
>> #define RTC_DEF_DIVIDER (32768 - 1)
>> #define RTC_DEF_TRIM 0
>> --
>> 1.7.5.4
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 00/10] Make mach/irqs.h optional
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
` (9 preceding siblings ...)
2012-01-13 16:34 ` [RFC PATCH 10/10] ARM: highbank: select SPARSE_IRQ and remove irqs.h Rob Herring
@ 2012-01-13 17:42 ` Jamie Iles
10 siblings, 0 replies; 28+ messages in thread
From: Jamie Iles @ 2012-01-13 17:42 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 13, 2012 at 10:34:01AM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> This series removes the include of mach/irqs.h from asm/irq.h when
> SPARSE_IRQ is selected. Platforms which select SPARSE_IRQ have been
> updated.
>
> This breaks platforms where SPARSE_IRQ is user selectable. This is on
> purpose so that SPARSE_IRQ gets properly supported. We could push
> HAVE_SPARSE_IRQ option down to the platforms that select it if that is
> preferred. But as recent experience has shown, perhaps breaking platforms
> is the only way to get some platforms updated.
Nice one Rob! Patch below to remove irqs.h for picoxcell too if you
could add that one to your series.
Tested-by: Jamie Iles <jamie@jamieiles.com>
Jamie
8<---
From 2d07b017bb06be86bd01686f98c699f1eff0ac10 Mon Sep 17 00:00:00 2001
From: Jamie Iles <jamie@jamieiles.com>
Date: Fri, 13 Jan 2012 17:40:05 +0000
Subject: [PATCH] ARM: picoxcell: remove mach/irqs.h
picoxcell uses SPARSE_IRQ which means we don't need a mach/irqs.h
anymore so kill it off.
Cc: Rob Herring <robherring2@gmail.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
arch/arm/mach-picoxcell/include/mach/irqs.h | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
delete mode 100644 arch/arm/mach-picoxcell/include/mach/irqs.h
diff --git a/arch/arm/mach-picoxcell/include/mach/irqs.h b/arch/arm/mach-picoxcell/include/mach/irqs.h
deleted file mode 100644
index 59eac1e..0000000
--- a/arch/arm/mach-picoxcell/include/mach/irqs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-#ifndef __MACH_IRQS_H
-#define __MACH_IRQS_H
-
-/* We dynamically allocate our irq_desc's. */
-#define NR_IRQS 0
-
-#endif /* __MACH_IRQS_H */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 06/10] ARM: mmp: remove NR_IRQS
2012-01-13 16:34 ` [RFC PATCH 06/10] ARM: mmp: remove NR_IRQS Rob Herring
@ 2012-01-13 20:30 ` Nicolas Pitre
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Pitre @ 2012-01-13 20:30 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 13 Jan 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Remove NR_IRQS and add a per machine .nr_irqs setting.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
While it is true that NR_IRQS was defined in terms of IRQ_BOARD_START
down in the confines of mach/irqs.h, I don't think IRQ_BOARD_START is
such a good macro name to spread around for what it should mean.
Perhaps MMP_MAX_IRQS or the like would be more self describing.
> ---
> arch/arm/mach-mmp/avengers_lite.c | 1 +
> arch/arm/mach-mmp/include/mach/irqs.h | 2 --
> arch/arm/mach-mmp/irq-mmp2.c | 1 +
> arch/arm/mach-mmp/jasper.c | 1 +
> arch/arm/mach-mmp/tavorevb.c | 1 +
> 5 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c
> index b148a9d..0fd60fb 100644
> --- a/arch/arm/mach-mmp/avengers_lite.c
> +++ b/arch/arm/mach-mmp/avengers_lite.c
> @@ -43,6 +43,7 @@ static void __init avengers_lite_init(void)
>
> MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
> .map_io = mmp_map_io,
> + .nr_irqs = IRQ_BOARD_START,
> .init_irq = pxa168_init_irq,
> .timer = &pxa168_timer,
> .init_machine = avengers_lite_init,
> diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
> index 34635a0..25e6d60 100644
> --- a/arch/arm/mach-mmp/include/mach/irqs.h
> +++ b/arch/arm/mach-mmp/include/mach/irqs.h
> @@ -224,6 +224,4 @@
>
> #define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO)
>
> -#define NR_IRQS (IRQ_BOARD_START)
> -
> #endif /* __ASM_MACH_IRQS_H */
> diff --git a/arch/arm/mach-mmp/irq-mmp2.c b/arch/arm/mach-mmp/irq-mmp2.c
> index d21c544..7895d27 100644
> --- a/arch/arm/mach-mmp/irq-mmp2.c
> +++ b/arch/arm/mach-mmp/irq-mmp2.c
> @@ -15,6 +15,7 @@
> #include <linux/irq.h>
> #include <linux/io.h>
>
> +#include <mach/irqs.h>
> #include <mach/regs-icu.h>
> #include <mach/mmp2.h>
>
> diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c
> index 96cf5c8..8f80c31 100644
> --- a/arch/arm/mach-mmp/jasper.c
> +++ b/arch/arm/mach-mmp/jasper.c
> @@ -19,6 +19,7 @@
> #include <linux/mfd/max8925.h>
> #include <linux/interrupt.h>
>
> +#include <mach/irqs.h>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
> #include <mach/addr-map.h>
> diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
> index 8e3b5af0..d3ba655 100644
> --- a/arch/arm/mach-mmp/tavorevb.c
> +++ b/arch/arm/mach-mmp/tavorevb.c
> @@ -102,6 +102,7 @@ static void __init tavorevb_init(void)
>
> MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
> .map_io = mmp_map_io,
> + .nr_irqs = IRQ_BOARD_START,
> .init_irq = pxa910_init_irq,
> .timer = &pxa910_timer,
> .init_machine = tavorevb_init,
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 16:58 ` Rob Herring
@ 2012-01-13 20:46 ` Nicolas Pitre
2012-01-13 21:45 ` Russell King - ARM Linux
2012-01-13 23:21 ` Rob Herring
0 siblings, 2 replies; 28+ messages in thread
From: Nicolas Pitre @ 2012-01-13 20:46 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 13 Jan 2012, Rob Herring wrote:
> On 01/13/2012 10:43 AM, Russell King - ARM Linux wrote:
> > On Fri, Jan 13, 2012 at 10:34:02AM -0600, Rob Herring wrote:
> >> From: Rob Herring <rob.herring@calxeda.com>
> >>
> >> Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.
> >
> > Rather than doing this, we should be eliminating the need for these
> > old drivers to include mach/irqs.h at all.
> >
> > Adding the resources to the platform device, and then using at least
> > the IRQ resource(s) would be a definite step forward (and a relatively
> > easy one to do.)
> >
>
> Well, this has just happened in 3.3. So I can now drop this one I think.
Another problem that resources solve (and your original patch didn't
make it any better nor worse) has to do with include file search paths.
Once we start building more than one SOC in the kernel, we won't be able
to support the inclusion of <mach/whatever.h> from driver code anymore
since this could refer to more than one instances of
arch/arm/mach-*/include/mach/whatever.h.
Nicolas
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 20:46 ` Nicolas Pitre
@ 2012-01-13 21:45 ` Russell King - ARM Linux
2012-01-13 22:26 ` Nicolas Pitre
2012-01-13 23:21 ` Rob Herring
1 sibling, 1 reply; 28+ messages in thread
From: Russell King - ARM Linux @ 2012-01-13 21:45 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 13, 2012 at 03:46:03PM -0500, Nicolas Pitre wrote:
> Another problem that resources solve (and your original patch didn't
> make it any better nor worse) has to do with include file search paths.
> Once we start building more than one SOC in the kernel, we won't be able
> to support the inclusion of <mach/whatever.h> from driver code anymore
> since this could refer to more than one instances of
> arch/arm/mach-*/include/mach/whatever.h.
As a general principle, yes. We're going to run into some big horrible
problem cases with it though. The biggest few areas I think will be the
USB host drivers, ALSA ASoC board specifics and PCMCIA board specifics.
I don't particularly see the SA-11x0 code having that sorted out in short
time - we have too many cases where we share registers throughout the code
in all sorts of places. Eg, things like the peripheral controller registers
and the watchdog stuff accesses the OS timer registers directly.
Things will gradually get better over time - the StrongARM code still has
at least two interested parties on it (one being for Simpad, the other
being me.)
I've been toying with a DMA engine driver for the SA11x0 recently (because
I wanted a platform to chase up my idea of providing a generic virtual DMA
channel library to the DMA engine code). This includes converting the IrDA
driver to use it and resurecting the audio on the Assabet via the UDA1341.
We're going to need this library - if we're going to see people moving
their private DMA engine APIs over to the established one, we'll see
multiple reimplementations of this all over the place (just like we have
in amba-pl08x and others.)
Why put so much work into a mostly dead platform? Well, it's one of the
few decent platforms which I have, which actually has working DMA hardware.
Why audio? It's one of those which provides a significant stress test on
DMA stuff being correct. Why IrDA? It can reconfigure a DMA channel (eg,
burst size) on the fly when it switches between SIR/FIR mode.
It may be 12 years old but it's still a very useful platform to develop
non-hardware specific features on!
I've also been adding GPIO support to PCMCIA soc-common. That helps to
remove some open-coded platform specifics from drivers/pcmcia, but doesn't
entirely eliminate them. If this progresses sufficiently, we may be able
to get rid of a fair number of platform files in there.
Obviously, patches haven't been posted yet... I'll probably push some of
the patch sets shortly after -rc1 hits.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h
2012-01-13 16:34 ` [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h Rob Herring
@ 2012-01-13 22:02 ` Rob Herring
2012-01-13 22:36 ` Nicolas Pitre
0 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 22:02 UTC (permalink / raw)
To: linux-arm-kernel
On 01/13/2012 10:34 AM, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> In preparation to make mach/irqs.h optional, directly include mach/irq.h
> to get IRQ_BOARD_START.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/include/asm/hardware/it8152.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
> index 43cab49..73f84fa 100644
> --- a/arch/arm/include/asm/hardware/it8152.h
> +++ b/arch/arm/include/asm/hardware/it8152.h
> @@ -9,6 +9,9 @@
>
> #ifndef __ASM_HARDWARE_IT8152_H
> #define __ASM_HARDWARE_IT8152_H
> +
> +#include <mach/irqs.h>
> +
This include is needed for IRQ_BOARD_START which could also be
problematic outside a single mach dir. The IT8152 is only used on 1
family of pxa2xx boards. The part and board with it are EOL as well, so
we're not going to see new users of this code. Perhaps the it8152 code
should just be moved into mach-pxa?
Rob
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 21:45 ` Russell King - ARM Linux
@ 2012-01-13 22:26 ` Nicolas Pitre
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Pitre @ 2012-01-13 22:26 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 13 Jan 2012, Russell King - ARM Linux wrote:
> Why put so much work into a mostly dead platform? Well, it's one of the
> few decent platforms which I have, which actually has working DMA hardware.
> Why audio? It's one of those which provides a significant stress test on
> DMA stuff being correct. Why IrDA? It can reconfigure a DMA channel (eg,
> burst size) on the fly when it switches between SIR/FIR mode.
>
> It may be 12 years old but it's still a very useful platform to develop
> non-hardware specific features on!
Absolutely. Having a simple (by today's standard) platform to develop
new interfaces is certainly a good way to make sure things work in
practice, and that provides a nice examples for others to follow.
Nicolas
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h
2012-01-13 22:02 ` Rob Herring
@ 2012-01-13 22:36 ` Nicolas Pitre
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Pitre @ 2012-01-13 22:36 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 13 Jan 2012, Rob Herring wrote:
> On 01/13/2012 10:34 AM, Rob Herring wrote:
> > From: Rob Herring <rob.herring@calxeda.com>
> >
> > In preparation to make mach/irqs.h optional, directly include mach/irq.h
> > to get IRQ_BOARD_START.
> >
> > Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> > ---
> > arch/arm/include/asm/hardware/it8152.h | 3 +++
> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
> > index 43cab49..73f84fa 100644
> > --- a/arch/arm/include/asm/hardware/it8152.h
> > +++ b/arch/arm/include/asm/hardware/it8152.h
> > @@ -9,6 +9,9 @@
> >
> > #ifndef __ASM_HARDWARE_IT8152_H
> > #define __ASM_HARDWARE_IT8152_H
> > +
> > +#include <mach/irqs.h>
> > +
>
> This include is needed for IRQ_BOARD_START which could also be
> problematic outside a single mach dir. The IT8152 is only used on 1
> family of pxa2xx boards. The part and board with it are EOL as well, so
> we're not going to see new users of this code. Perhaps the it8152 code
> should just be moved into mach-pxa?
No no. Any reason will be good to do the same for other stuff and we
really don't want to go back there. If anything it is the needed
defines that need to move closer to the driver code not the other way
around.
And by the time the EOL'd boards are really getting into the way of
cleanups we could do one of two things: simply leave them alone and
prevent them from participating into a multi-SOC kernel config. Or add a
#error "Do you care about me?" in them (and remove them from any
defconfig) and see if anyone notices. If not then we just delete them.
Nicolas
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 20:46 ` Nicolas Pitre
2012-01-13 21:45 ` Russell King - ARM Linux
@ 2012-01-13 23:21 ` Rob Herring
2012-01-13 23:51 ` Nicolas Pitre
1 sibling, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-13 23:21 UTC (permalink / raw)
To: linux-arm-kernel
Nicolas,
On 01/13/2012 02:46 PM, Nicolas Pitre wrote:
> On Fri, 13 Jan 2012, Rob Herring wrote:
>
>> On 01/13/2012 10:43 AM, Russell King - ARM Linux wrote:
>>> On Fri, Jan 13, 2012 at 10:34:02AM -0600, Rob Herring wrote:
>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>
>>>> Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.
>>>
>>> Rather than doing this, we should be eliminating the need for these
>>> old drivers to include mach/irqs.h at all.
>>>
>>> Adding the resources to the platform device, and then using at least
>>> the IRQ resource(s) would be a definite step forward (and a relatively
>>> easy one to do.)
>>>
>>
>> Well, this has just happened in 3.3. So I can now drop this one I think.
>
> Another problem that resources solve (and your original patch didn't
> make it any better nor worse) has to do with include file search paths.
> Once we start building more than one SOC in the kernel, we won't be able
> to support the inclusion of <mach/whatever.h> from driver code anymore
> since this could refer to more than one instances of
> arch/arm/mach-*/include/mach/whatever.h.
I'm fully aware of this issue and was not trying to solve that here. On
the positive side, it does help highlight drivers which are not single
kernel ready by explicitly including mach headers which is easily
searched for.
I'm finding some new breakage as I rebase to the latest mainline
(gpio-pxa.c). So the next version may have a few more fixes like this one.
Rob
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h
2012-01-13 23:21 ` Rob Herring
@ 2012-01-13 23:51 ` Nicolas Pitre
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Pitre @ 2012-01-13 23:51 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 13 Jan 2012, Rob Herring wrote:
> On 01/13/2012 02:46 PM, Nicolas Pitre wrote:
> > Another problem that resources solve (and your original patch didn't
> > make it any better nor worse) has to do with include file search paths.
> > Once we start building more than one SOC in the kernel, we won't be able
> > to support the inclusion of <mach/whatever.h> from driver code anymore
> > since this could refer to more than one instances of
> > arch/arm/mach-*/include/mach/whatever.h.
>
> I'm fully aware of this issue and was not trying to solve that here.
I know you are aware (maybe I should have mentioned it explicitly).
This comment was more for the wider audience.
Nicolas
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS
2012-01-13 16:34 ` [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS Rob Herring
@ 2012-01-17 1:54 ` Nobuhiro Iwamatsu
2012-01-17 2:37 ` Rob Herring
0 siblings, 1 reply; 28+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-01-17 1:54 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
2012/1/14 Rob Herring <robherring2@gmail.com>:
> From: Rob Herring <rob.herring@calxeda.com>
>
> SH intc has a compile time dependency on NR_IRQS. Make this dependency a
> local define so that shmobile (and ARM in general) can have run-time
> NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to
> 1024, so we are using the maximum.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> drivers/sh/intc/balancing.c | 2 +-
> drivers/sh/intc/core.c | 2 +-
> drivers/sh/intc/handle.c | 2 +-
> drivers/sh/intc/internals.h | 9 +++++++++
> drivers/sh/intc/virq.c | 2 +-
> 5 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c
> index cec7a96..bc78080 100644
> --- a/drivers/sh/intc/balancing.c
> +++ b/drivers/sh/intc/balancing.c
> @@ -9,7 +9,7 @@
> */
> #include "internals.h"
>
> -static unsigned long dist_handle[NR_IRQS];
> +static unsigned long dist_handle[INTC_NR_IRQS];
>
> void intc_balancing_enable(unsigned int irq)
> {
> diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
> index e53e449..2fde897 100644
> --- a/drivers/sh/intc/core.c
> +++ b/drivers/sh/intc/core.c
> @@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
> * - this needs to be at least 2 for 5-bit priorities on 7780
> */
> static unsigned int default_prio_level = 2; /* 2 - 16 */
> -static unsigned int intc_prio_level[NR_IRQS]; /* for now */
> +static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */
>
> unsigned int intc_get_dfl_prio_level(void)
> {
> diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c
> index 057ce56..f461d53 100644
> --- a/drivers/sh/intc/handle.c
> +++ b/drivers/sh/intc/handle.c
> @@ -13,7 +13,7 @@
> #include <linux/spinlock.h>
> #include "internals.h"
>
> -static unsigned long ack_handle[NR_IRQS];
> +static unsigned long ack_handle[INTC_NR_IRQS];
>
> static intc_enum __init intc_grp_id(struct intc_desc *desc,
> intc_enum enum_id)
> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> index b0e9155..469f092 100644
> --- a/drivers/sh/intc/internals.h
> +++ b/drivers/sh/intc/internals.h
> @@ -6,6 +6,15 @@
> #include <linux/radix-tree.h>
> #include <linux/device.h>
>
> +#define INTC_NR_IRQS 1024
On SH, INTC_NR_IRQS ( NR_IRQS ) is using to by arch/sh/kernel/machvec.c.
And, this is defined by arch/sh/include/asm/irq.h.
You need to remove or rename from these.
> +
> +#ifndef evt2irq
> +#define evt2irq(evt) (((evt) >> 5) - 16)
> +#endif
> +#ifndef irq2evt
> +#define irq2evt(irq) (((irq) + 16) << 5)
> +#endif
> +
These are defined in arch/arm/mach-shmobile/include/mach/irqs.h and
arch/sh/include/asm/irq.h.
I propose that linux/sh_intc.h defines these.
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS
2012-01-17 1:54 ` Nobuhiro Iwamatsu
@ 2012-01-17 2:37 ` Rob Herring
2012-01-17 5:09 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-17 2:37 UTC (permalink / raw)
To: linux-arm-kernel
On 01/16/2012 07:54 PM, Nobuhiro Iwamatsu wrote:
> Hi,
>
> 2012/1/14 Rob Herring <robherring2@gmail.com>:
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> SH intc has a compile time dependency on NR_IRQS. Make this dependency a
>> local define so that shmobile (and ARM in general) can have run-time
>> NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to
>> 1024, so we are using the maximum.
>>
>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>> ---
>> drivers/sh/intc/balancing.c | 2 +-
>> drivers/sh/intc/core.c | 2 +-
>> drivers/sh/intc/handle.c | 2 +-
>> drivers/sh/intc/internals.h | 9 +++++++++
>> drivers/sh/intc/virq.c | 2 +-
>> 5 files changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c
>> index cec7a96..bc78080 100644
>> --- a/drivers/sh/intc/balancing.c
>> +++ b/drivers/sh/intc/balancing.c
>> @@ -9,7 +9,7 @@
>> */
>> #include "internals.h"
>>
>> -static unsigned long dist_handle[NR_IRQS];
>> +static unsigned long dist_handle[INTC_NR_IRQS];
>>
>> void intc_balancing_enable(unsigned int irq)
>> {
>> diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
>> index e53e449..2fde897 100644
>> --- a/drivers/sh/intc/core.c
>> +++ b/drivers/sh/intc/core.c
>> @@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
>> * - this needs to be at least 2 for 5-bit priorities on 7780
>> */
>> static unsigned int default_prio_level = 2; /* 2 - 16 */
>> -static unsigned int intc_prio_level[NR_IRQS]; /* for now */
>> +static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */
>>
>> unsigned int intc_get_dfl_prio_level(void)
>> {
>> diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c
>> index 057ce56..f461d53 100644
>> --- a/drivers/sh/intc/handle.c
>> +++ b/drivers/sh/intc/handle.c
>> @@ -13,7 +13,7 @@
>> #include <linux/spinlock.h>
>> #include "internals.h"
>>
>> -static unsigned long ack_handle[NR_IRQS];
>> +static unsigned long ack_handle[INTC_NR_IRQS];
>>
>> static intc_enum __init intc_grp_id(struct intc_desc *desc,
>> intc_enum enum_id)
>> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>> index b0e9155..469f092 100644
>> --- a/drivers/sh/intc/internals.h
>> +++ b/drivers/sh/intc/internals.h
>> @@ -6,6 +6,15 @@
>> #include <linux/radix-tree.h>
>> #include <linux/device.h>
>>
>> +#define INTC_NR_IRQS 1024
>
> On SH, INTC_NR_IRQS ( NR_IRQS ) is using to by arch/sh/kernel/machvec.c.
> And, this is defined by arch/sh/include/asm/irq.h.
> You need to remove or rename from these.
>
machvec.c will still pickup NR_IRQS from arch/sh/include/asm/irq.h, so
there is no change there. The value here is increased from 512 for SH to
1024, but that should not have any functional impact only array storage
space. Where it is used is a bit of a hack as the comment indicates. The
only other easy way to fix it I see is with an #ifdef CONFIG_SH or
CONFIG_ARM here. I welcome patches if you've got better ideas.
>> +
>> +#ifndef evt2irq
>> +#define evt2irq(evt) (((evt) >> 5) - 16)
>> +#endif
>> +#ifndef irq2evt
>> +#define irq2evt(irq) (((irq) + 16) << 5)
>> +#endif
>> +
>
> These are defined in arch/arm/mach-shmobile/include/mach/irqs.h and
> arch/sh/include/asm/irq.h.
>
> I propose that linux/sh_intc.h defines these.
>
Agreed. I will combine both versions there.
Rob
> Best regards,
> Nobuhiro
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS
2012-01-17 2:37 ` Rob Herring
@ 2012-01-17 5:09 ` Nobuhiro Iwamatsu
2012-01-17 16:24 ` Rob Herring
0 siblings, 1 reply; 28+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-01-17 5:09 UTC (permalink / raw)
To: linux-arm-kernel
2012/1/17 Rob Herring <robherring2@gmail.com>:
> On 01/16/2012 07:54 PM, Nobuhiro Iwamatsu wrote:
>> Hi,
>>
>> 2012/1/14 Rob Herring <robherring2@gmail.com>:
>>> From: Rob Herring <rob.herring@calxeda.com>
>>>
>>> SH intc has a compile time dependency on NR_IRQS. Make this dependency a
>>> local define so that shmobile (and ARM in general) can have run-time
>>> NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to
>>> 1024, so we are using the maximum.
>>>
>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>> ---
>>> drivers/sh/intc/balancing.c | 2 +-
>>> drivers/sh/intc/core.c | 2 +-
>>> drivers/sh/intc/handle.c | 2 +-
>>> drivers/sh/intc/internals.h | 9 +++++++++
>>> drivers/sh/intc/virq.c | 2 +-
>>> 5 files changed, 13 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c
>>> index cec7a96..bc78080 100644
>>> --- a/drivers/sh/intc/balancing.c
>>> +++ b/drivers/sh/intc/balancing.c
>>> @@ -9,7 +9,7 @@
>>> */
>>> #include "internals.h"
>>>
>>> -static unsigned long dist_handle[NR_IRQS];
>>> +static unsigned long dist_handle[INTC_NR_IRQS];
>>>
>>> void intc_balancing_enable(unsigned int irq)
>>> {
>>> diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
>>> index e53e449..2fde897 100644
>>> --- a/drivers/sh/intc/core.c
>>> +++ b/drivers/sh/intc/core.c
>>> @@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
>>> * - this needs to be at least 2 for 5-bit priorities on 7780
>>> */
>>> static unsigned int default_prio_level = 2; /* 2 - 16 */
>>> -static unsigned int intc_prio_level[NR_IRQS]; /* for now */
>>> +static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */
>>>
>>> unsigned int intc_get_dfl_prio_level(void)
>>> {
>>> diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c
>>> index 057ce56..f461d53 100644
>>> --- a/drivers/sh/intc/handle.c
>>> +++ b/drivers/sh/intc/handle.c
>>> @@ -13,7 +13,7 @@
>>> #include <linux/spinlock.h>
>>> #include "internals.h"
>>>
>>> -static unsigned long ack_handle[NR_IRQS];
>>> +static unsigned long ack_handle[INTC_NR_IRQS];
>>>
>>> static intc_enum __init intc_grp_id(struct intc_desc *desc,
>>> intc_enum enum_id)
>>> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>>> index b0e9155..469f092 100644
>>> --- a/drivers/sh/intc/internals.h
>>> +++ b/drivers/sh/intc/internals.h
>>> @@ -6,6 +6,15 @@
>>> #include <linux/radix-tree.h>
>>> #include <linux/device.h>
>>>
>>> +#define INTC_NR_IRQS 1024
>>
>> On SH, INTC_NR_IRQS ( NR_IRQS ) is using to by arch/sh/kernel/machvec.c.
>> And, this is defined by arch/sh/include/asm/irq.h.
>> You need to remove or rename from these.
>>
>
> machvec.c will still pickup NR_IRQS from arch/sh/include/asm/irq.h, so
> there is no change there. The value here is increased from 512 for SH to
> 1024, but that should not have any functional impact only array storage
> space. Where it is used is a bit of a hack as the comment indicates. The
> only other easy way to fix it I see is with an #ifdef CONFIG_SH or
> CONFIG_ARM here. I welcome patches if you've got better ideas.
>
I also cared about the problem from which array increases in SH.
Since drivers/sh/intc/internals.h is referred to only from intc function,
it needs to define INTC_NR_IRQS as other places.
How is it that defines by Kconfig?
I created a patch on your patch. Could you give comment?
Best regards,
Nobuhiro
------
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
index 45d08b6..9278bb0 100644
--- a/arch/sh/include/asm/irq.h
+++ b/arch/sh/include/asm/irq.h
@@ -9,7 +9,6 @@
* advised to cap this at the hard limit that they're interested in
* through the machvec.
*/
-#define NR_IRQS 512
#define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */
/*
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index 3d722e4..e6b12b4 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -123,5 +123,5 @@ void __init sh_mv_setup(void)
mv_set(mem_init);
if (!sh_mv.mv_nr_irqs)
- sh_mv.mv_nr_irqs = NR_IRQS;
+ sh_mv.mv_nr_irqs = CONFIG_SH_NR_IRQS;
}
diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
index c88cbcc..38d51f1 100644
--- a/drivers/sh/intc/Kconfig
+++ b/drivers/sh/intc/Kconfig
@@ -33,3 +33,9 @@ config INTC_MAPPING_DEBUG
between system IRQs and the per-controller id tables.
If in doubt, say N.
+
+config SH_NR_IRQS
+ int
+ depends on ARCH_SHMOBILE || SUPERH
+ default 1024 if ARCH_SHMOBILE
+ default 512 if SUPERH
diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 469f092..076c286 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -6,7 +6,7 @@
#include <linux/radix-tree.h>
#include <linux/device.h>
-#define INTC_NR_IRQS 1024
+#define INTC_NR_IRQS CONFIG_SH_NR_IRQS
#ifndef evt2irq
#define evt2irq(evt) (((evt) >> 5) - 16)
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS
2012-01-17 5:09 ` Nobuhiro Iwamatsu
@ 2012-01-17 16:24 ` Rob Herring
2012-01-19 3:44 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 28+ messages in thread
From: Rob Herring @ 2012-01-17 16:24 UTC (permalink / raw)
To: linux-arm-kernel
On 01/16/2012 11:09 PM, Nobuhiro Iwamatsu wrote:
> 2012/1/17 Rob Herring <robherring2@gmail.com>:
>> On 01/16/2012 07:54 PM, Nobuhiro Iwamatsu wrote:
>>> Hi,
>>>
>>> 2012/1/14 Rob Herring <robherring2@gmail.com>:
>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>
>>>> SH intc has a compile time dependency on NR_IRQS. Make this dependency a
>>>> local define so that shmobile (and ARM in general) can have run-time
>>>> NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to
>>>> 1024, so we are using the maximum.
>>>>
>>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>>> ---
>>>> drivers/sh/intc/balancing.c | 2 +-
>>>> drivers/sh/intc/core.c | 2 +-
>>>> drivers/sh/intc/handle.c | 2 +-
>>>> drivers/sh/intc/internals.h | 9 +++++++++
>>>> drivers/sh/intc/virq.c | 2 +-
>>>> 5 files changed, 13 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c
>>>> index cec7a96..bc78080 100644
>>>> --- a/drivers/sh/intc/balancing.c
>>>> +++ b/drivers/sh/intc/balancing.c
>>>> @@ -9,7 +9,7 @@
>>>> */
>>>> #include "internals.h"
>>>>
>>>> -static unsigned long dist_handle[NR_IRQS];
>>>> +static unsigned long dist_handle[INTC_NR_IRQS];
>>>>
>>>> void intc_balancing_enable(unsigned int irq)
>>>> {
>>>> diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
>>>> index e53e449..2fde897 100644
>>>> --- a/drivers/sh/intc/core.c
>>>> +++ b/drivers/sh/intc/core.c
>>>> @@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
>>>> * - this needs to be at least 2 for 5-bit priorities on 7780
>>>> */
>>>> static unsigned int default_prio_level = 2; /* 2 - 16 */
>>>> -static unsigned int intc_prio_level[NR_IRQS]; /* for now */
>>>> +static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */
>>>>
>>>> unsigned int intc_get_dfl_prio_level(void)
>>>> {
>>>> diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c
>>>> index 057ce56..f461d53 100644
>>>> --- a/drivers/sh/intc/handle.c
>>>> +++ b/drivers/sh/intc/handle.c
>>>> @@ -13,7 +13,7 @@
>>>> #include <linux/spinlock.h>
>>>> #include "internals.h"
>>>>
>>>> -static unsigned long ack_handle[NR_IRQS];
>>>> +static unsigned long ack_handle[INTC_NR_IRQS];
>>>>
>>>> static intc_enum __init intc_grp_id(struct intc_desc *desc,
>>>> intc_enum enum_id)
>>>> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>>>> index b0e9155..469f092 100644
>>>> --- a/drivers/sh/intc/internals.h
>>>> +++ b/drivers/sh/intc/internals.h
>>>> @@ -6,6 +6,15 @@
>>>> #include <linux/radix-tree.h>
>>>> #include <linux/device.h>
>>>>
>>>> +#define INTC_NR_IRQS 1024
>>>
>>> On SH, INTC_NR_IRQS ( NR_IRQS ) is using to by arch/sh/kernel/machvec.c.
>>> And, this is defined by arch/sh/include/asm/irq.h.
>>> You need to remove or rename from these.
>>>
>>
>> machvec.c will still pickup NR_IRQS from arch/sh/include/asm/irq.h, so
>> there is no change there. The value here is increased from 512 for SH to
>> 1024, but that should not have any functional impact only array storage
>> space. Where it is used is a bit of a hack as the comment indicates. The
>> only other easy way to fix it I see is with an #ifdef CONFIG_SH or
>> CONFIG_ARM here. I welcome patches if you've got better ideas.
>>
>
> I also cared about the problem from which array increases in SH.
> Since drivers/sh/intc/internals.h is referred to only from intc function,
> it needs to define INTC_NR_IRQS as other places.
>
> How is it that defines by Kconfig?
> I created a patch on your patch. Could you give comment?
>
> Best regards,
> Nobuhiro
>
> ------
> diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
> index 45d08b6..9278bb0 100644
> --- a/arch/sh/include/asm/irq.h
> +++ b/arch/sh/include/asm/irq.h
> @@ -9,7 +9,6 @@
> * advised to cap this at the hard limit that they're interested in
> * through the machvec.
> */
> -#define NR_IRQS 512
> #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */
>
> /*
> diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
> index 3d722e4..e6b12b4 100644
> --- a/arch/sh/kernel/machvec.c
> +++ b/arch/sh/kernel/machvec.c
> @@ -123,5 +123,5 @@ void __init sh_mv_setup(void)
> mv_set(mem_init);
>
> if (!sh_mv.mv_nr_irqs)
> - sh_mv.mv_nr_irqs = NR_IRQS;
> + sh_mv.mv_nr_irqs = CONFIG_SH_NR_IRQS;
> }
> diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
> index c88cbcc..38d51f1 100644
> --- a/drivers/sh/intc/Kconfig
> +++ b/drivers/sh/intc/Kconfig
> @@ -33,3 +33,9 @@ config INTC_MAPPING_DEBUG
> between system IRQs and the per-controller id tables.
>
> If in doubt, say N.
> +
> +config SH_NR_IRQS
> + int
> + depends on ARCH_SHMOBILE || SUPERH
> + default 1024 if ARCH_SHMOBILE
> + default 512 if SUPERH
> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> index 469f092..076c286 100644
> --- a/drivers/sh/intc/internals.h
> +++ b/drivers/sh/intc/internals.h
> @@ -6,7 +6,7 @@
> #include <linux/radix-tree.h>
> #include <linux/device.h>
>
> -#define INTC_NR_IRQS 1024
> +#define INTC_NR_IRQS CONFIG_SH_NR_IRQS
>
> #ifndef evt2irq
> #define evt2irq(evt) (((evt) >> 5) - 16)
>
If we went this route I wonder if it would be better for this to be more
generic and have CONFIG_NR_IRQS like powerpc. However, I don't see
having CONFIG_NR_IRQS as being that useful in the SPARSE_IRQ case. Plus
it would be a much more invasive. I think I'll just add this to
linux/sh_intc.h:
#ifdef CONFIG_SUPERH
#define INTC_NR_IRQS 512
#else
#define INTC_NR_IRQS 1024
#endif
Rob
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS
2012-01-17 16:24 ` Rob Herring
@ 2012-01-19 3:44 ` Nobuhiro Iwamatsu
0 siblings, 0 replies; 28+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-01-19 3:44 UTC (permalink / raw)
To: linux-arm-kernel
2012/1/18 Rob Herring <robherring2@gmail.com>:
> On 01/16/2012 11:09 PM, Nobuhiro Iwamatsu wrote:
>> 2012/1/17 Rob Herring <robherring2@gmail.com>:
>>> On 01/16/2012 07:54 PM, Nobuhiro Iwamatsu wrote:
>>>> Hi,
>>>>
>>>> 2012/1/14 Rob Herring <robherring2@gmail.com>:
>>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>>
>>>>> SH intc has a compile time dependency on NR_IRQS. Make this dependency a
>>>>> local define so that shmobile (and ARM in general) can have run-time
>>>>> NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to
>>>>> 1024, so we are using the maximum.
>>>>>
>>>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>>>> ---
>>>>> drivers/sh/intc/balancing.c | 2 +-
>>>>> drivers/sh/intc/core.c | 2 +-
>>>>> drivers/sh/intc/handle.c | 2 +-
>>>>> drivers/sh/intc/internals.h | 9 +++++++++
>>>>> drivers/sh/intc/virq.c | 2 +-
>>>>> 5 files changed, 13 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c
>>>>> index cec7a96..bc78080 100644
>>>>> --- a/drivers/sh/intc/balancing.c
>>>>> +++ b/drivers/sh/intc/balancing.c
>>>>> @@ -9,7 +9,7 @@
>>>>> */
>>>>> #include "internals.h"
>>>>>
>>>>> -static unsigned long dist_handle[NR_IRQS];
>>>>> +static unsigned long dist_handle[INTC_NR_IRQS];
>>>>>
>>>>> void intc_balancing_enable(unsigned int irq)
>>>>> {
>>>>> diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
>>>>> index e53e449..2fde897 100644
>>>>> --- a/drivers/sh/intc/core.c
>>>>> +++ b/drivers/sh/intc/core.c
>>>>> @@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
>>>>> * - this needs to be at least 2 for 5-bit priorities on 7780
>>>>> */
>>>>> static unsigned int default_prio_level = 2; /* 2 - 16 */
>>>>> -static unsigned int intc_prio_level[NR_IRQS]; /* for now */
>>>>> +static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */
>>>>>
>>>>> unsigned int intc_get_dfl_prio_level(void)
>>>>> {
>>>>> diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c
>>>>> index 057ce56..f461d53 100644
>>>>> --- a/drivers/sh/intc/handle.c
>>>>> +++ b/drivers/sh/intc/handle.c
>>>>> @@ -13,7 +13,7 @@
>>>>> #include <linux/spinlock.h>
>>>>> #include "internals.h"
>>>>>
>>>>> -static unsigned long ack_handle[NR_IRQS];
>>>>> +static unsigned long ack_handle[INTC_NR_IRQS];
>>>>>
>>>>> static intc_enum __init intc_grp_id(struct intc_desc *desc,
>>>>> intc_enum enum_id)
>>>>> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>>>>> index b0e9155..469f092 100644
>>>>> --- a/drivers/sh/intc/internals.h
>>>>> +++ b/drivers/sh/intc/internals.h
>>>>> @@ -6,6 +6,15 @@
>>>>> #include <linux/radix-tree.h>
>>>>> #include <linux/device.h>
>>>>>
>>>>> +#define INTC_NR_IRQS 1024
>>>>
>>>> On SH, INTC_NR_IRQS ( NR_IRQS ) is using to by arch/sh/kernel/machvec.c.
>>>> And, this is defined by arch/sh/include/asm/irq.h.
>>>> You need to remove or rename from these.
>>>>
>>>
>>> machvec.c will still pickup NR_IRQS from arch/sh/include/asm/irq.h, so
>>> there is no change there. The value here is increased from 512 for SH to
>>> 1024, but that should not have any functional impact only array storage
>>> space. Where it is used is a bit of a hack as the comment indicates. The
>>> only other easy way to fix it I see is with an #ifdef CONFIG_SH or
>>> CONFIG_ARM here. I welcome patches if you've got better ideas.
>>>
>>
>> I also cared about the problem from which array increases in SH.
>> Since drivers/sh/intc/internals.h is referred to only from intc function,
>> it needs to define INTC_NR_IRQS as other places.
>>
>> How is it that defines by Kconfig?
>> I created a patch on your patch. Could you give comment?
>>
>> Best regards,
>> Nobuhiro
>>
>> ------
>> diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
>> index 45d08b6..9278bb0 100644
>> --- a/arch/sh/include/asm/irq.h
>> +++ b/arch/sh/include/asm/irq.h
>> @@ -9,7 +9,6 @@
>> * advised to cap this at the hard limit that they're interested in
>> * through the machvec.
>> */
>> -#define NR_IRQS 512
>> #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */
>>
>> /*
>> diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
>> index 3d722e4..e6b12b4 100644
>> --- a/arch/sh/kernel/machvec.c
>> +++ b/arch/sh/kernel/machvec.c
>> @@ -123,5 +123,5 @@ void __init sh_mv_setup(void)
>> mv_set(mem_init);
>>
>> if (!sh_mv.mv_nr_irqs)
>> - sh_mv.mv_nr_irqs = NR_IRQS;
>> + sh_mv.mv_nr_irqs = CONFIG_SH_NR_IRQS;
>> }
>> diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
>> index c88cbcc..38d51f1 100644
>> --- a/drivers/sh/intc/Kconfig
>> +++ b/drivers/sh/intc/Kconfig
>> @@ -33,3 +33,9 @@ config INTC_MAPPING_DEBUG
>> between system IRQs and the per-controller id tables.
>>
>> If in doubt, say N.
>> +
>> +config SH_NR_IRQS
>> + int
>> + depends on ARCH_SHMOBILE || SUPERH
>> + default 1024 if ARCH_SHMOBILE
>> + default 512 if SUPERH
>> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>> index 469f092..076c286 100644
>> --- a/drivers/sh/intc/internals.h
>> +++ b/drivers/sh/intc/internals.h
>> @@ -6,7 +6,7 @@
>> #include <linux/radix-tree.h>
>> #include <linux/device.h>
>>
>> -#define INTC_NR_IRQS 1024
>> +#define INTC_NR_IRQS CONFIG_SH_NR_IRQS
>>
>> #ifndef evt2irq
>> #define evt2irq(evt) (((evt) >> 5) - 16)
>>
>
> If we went this route I wonder if it would be better for this to be more
> generic and have CONFIG_NR_IRQS like powerpc. However, I don't see
> having CONFIG_NR_IRQS as being that useful in the SPARSE_IRQ case. Plus
> it would be a much more invasive. I think I'll just add this to
> linux/sh_intc.h:
>
> #ifdef CONFIG_SUPERH
> #define INTC_NR_IRQS 512
> #else
> #define INTC_NR_IRQS 1024
> #endif
>
I think that this is good.
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2012-01-19 3:44 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 16:34 [RFC PATCH 00/10] Make mach/irqs.h optional Rob Herring
2012-01-13 16:34 ` [RFC PATCH 01/10] rtc: sa1100: include mach/irqs.h instead of asm/irq.h Rob Herring
2012-01-13 16:43 ` Russell King - ARM Linux
2012-01-13 16:58 ` Rob Herring
2012-01-13 20:46 ` Nicolas Pitre
2012-01-13 21:45 ` Russell King - ARM Linux
2012-01-13 22:26 ` Nicolas Pitre
2012-01-13 23:21 ` Rob Herring
2012-01-13 23:51 ` Nicolas Pitre
2012-01-13 16:34 ` [RFC PATCH 02/10] sound: pxa2xx-ac97: include mach/irqs.h directly Rob Herring
2012-01-13 16:34 ` [RFC PATCH 03/10] ARM: mc146818rtc: remove unnecessary include of mach/irqs.h Rob Herring
2012-01-13 16:52 ` Russell King - ARM Linux
2012-01-13 16:34 ` [RFC PATCH 04/10] ARM: it8152: explicitly include mach/irqs.h Rob Herring
2012-01-13 22:02 ` Rob Herring
2012-01-13 22:36 ` Nicolas Pitre
2012-01-13 16:34 ` [RFC PATCH 05/10] sh: intc: remove dependency on NR_IRQS Rob Herring
2012-01-17 1:54 ` Nobuhiro Iwamatsu
2012-01-17 2:37 ` Rob Herring
2012-01-17 5:09 ` Nobuhiro Iwamatsu
2012-01-17 16:24 ` Rob Herring
2012-01-19 3:44 ` Nobuhiro Iwamatsu
2012-01-13 16:34 ` [RFC PATCH 06/10] ARM: mmp: remove NR_IRQS Rob Herring
2012-01-13 20:30 ` Nicolas Pitre
2012-01-13 16:34 ` [RFC PATCH 07/10] ARM: pxa: " Rob Herring
2012-01-13 16:34 ` [RFC PATCH 08/10] ARM: shmobile: " Rob Herring
2012-01-13 16:34 ` [RFC PATCH 09/10] ARM: only include mach/irqs.h for !SPARSE_IRQ Rob Herring
2012-01-13 16:34 ` [RFC PATCH 10/10] ARM: highbank: select SPARSE_IRQ and remove irqs.h Rob Herring
2012-01-13 17:42 ` [RFC PATCH 00/10] Make mach/irqs.h optional Jamie Iles
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).