Commit 57a7a62e authored by Marc Zyngier's avatar Marc Zyngier Committed by Russell King

[ARM] 5233/1: Allow PXA to have ISA IRQs numbered 0-15

Allow PXA IRQs to be numbered starting at 16, leaving 0 to 15 for the
ISA IRQs, if needed.

This patch depends on RMK's PXA_HAVE_BOARD_IRQS patch.
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@altran.com>
Acked-by: default avatarRussel King <linux@arm.linux.org.uk>
Acked-by: default avatarEric Miao <eric.y.miao@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7a5063d8
...@@ -353,4 +353,7 @@ config TOSA_BT ...@@ -353,4 +353,7 @@ config TOSA_BT
config PXA_HAVE_BOARD_IRQS config PXA_HAVE_BOARD_IRQS
bool bool
config PXA_HAVE_ISA_IRQS
bool
endif endif
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
and \irqstat, \irqstat, \irqnr and \irqstat, \irqstat, \irqnr
clz \irqnr, \irqstat clz \irqnr, \irqstat
rsb \irqnr, \irqnr, #31 rsb \irqnr, \irqnr, #31
add \irqnr, \irqnr, #32 add \irqnr, \irqnr, #(32 + PXA_IRQ(0))
b 1001f b 1001f
1003: 1003:
mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP
...@@ -52,6 +52,6 @@ ...@@ -52,6 +52,6 @@
rsb \irqstat, \irqnr, #0 rsb \irqstat, \irqnr, #0
and \irqstat, \irqstat, \irqnr and \irqstat, \irqstat, \irqnr
clz \irqnr, \irqstat clz \irqnr, \irqstat
rsb \irqnr, \irqnr, #31 rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0))
1001: 1001:
.endm .endm
...@@ -11,7 +11,14 @@ ...@@ -11,7 +11,14 @@
*/ */
#define PXA_IRQ(x) (x) #ifdef CONFIG_PXA_HAVE_ISA_IRQS
#define PXA_ISA_IRQ(x) (x)
#define PXA_ISA_IRQ_NUM (16)
#else
#define PXA_ISA_IRQ_NUM (0)
#endif
#define PXA_IRQ(x) (PXA_ISA_IRQ_NUM + (x))
#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
#define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
...@@ -73,7 +80,7 @@ ...@@ -73,7 +80,7 @@
#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */ #define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */
#endif #endif
#define PXA_GPIO_IRQ_BASE (64) #define PXA_GPIO_IRQ_BASE PXA_IRQ(64)
#define PXA_GPIO_IRQ_NUM (128) #define PXA_GPIO_IRQ_NUM (128)
#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
......
...@@ -57,7 +57,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) ...@@ -57,7 +57,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
pxa_internal_irq_nr = irq_nr; pxa_internal_irq_nr = irq_nr;
for (irq = 0; irq < irq_nr; irq += 32) { for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) {
_ICMR(irq) = 0; /* disable all IRQs */ _ICMR(irq) = 0; /* disable all IRQs */
_ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */ _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment