diff options
author | Marc Zyngier <maz@misterjones.org> | 2008-09-01 08:03:32 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-01 12:13:26 -0400 |
commit | 57a7a62eb65b35f51814382b0841ff99be242880 (patch) | |
tree | 9cdabcea5ed96a33b26f58430b0b3c36257670cb | |
parent | 7a5063d86e95774ada66baac58fdfb7a80c75180 (diff) |
[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: Marc Zyngier <marc.zyngier@altran.com>
Acked-by: Russel King <linux@arm.linux.org.uk>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/entry-macro.S | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/irqs.h | 11 | ||||
-rw-r--r-- | arch/arm/mach-pxa/irq.c | 2 |
4 files changed, 15 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index c9643bd4849c..b0417122d4e4 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -353,4 +353,7 @@ config TOSA_BT | |||
353 | config PXA_HAVE_BOARD_IRQS | 353 | config PXA_HAVE_BOARD_IRQS |
354 | bool | 354 | bool |
355 | 355 | ||
356 | config PXA_HAVE_ISA_IRQS | ||
357 | bool | ||
358 | |||
356 | endif | 359 | endif |
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S index de16c12d5232..f6b4bf3e73d2 100644 --- a/arch/arm/mach-pxa/include/mach/entry-macro.S +++ b/arch/arm/mach-pxa/include/mach/entry-macro.S | |||
@@ -41,7 +41,7 @@ | |||
41 | and \irqstat, \irqstat, \irqnr | 41 | and \irqstat, \irqstat, \irqnr |
42 | clz \irqnr, \irqstat | 42 | clz \irqnr, \irqstat |
43 | rsb \irqnr, \irqnr, #31 | 43 | rsb \irqnr, \irqnr, #31 |
44 | add \irqnr, \irqnr, #32 | 44 | add \irqnr, \irqnr, #(32 + PXA_IRQ(0)) |
45 | b 1001f | 45 | b 1001f |
46 | 1003: | 46 | 1003: |
47 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP | 47 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP |
@@ -52,6 +52,6 @@ | |||
52 | rsb \irqstat, \irqnr, #0 | 52 | rsb \irqstat, \irqnr, #0 |
53 | and \irqstat, \irqstat, \irqnr | 53 | and \irqstat, \irqstat, \irqnr |
54 | clz \irqnr, \irqstat | 54 | clz \irqnr, \irqstat |
55 | rsb \irqnr, \irqnr, #31 | 55 | rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0)) |
56 | 1001: | 56 | 1001: |
57 | .endm | 57 | .endm |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index ce3ce17ce3d3..9c163e19ada9 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -11,7 +11,14 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | 13 | ||
14 | #define PXA_IRQ(x) (x) | 14 | #ifdef CONFIG_PXA_HAVE_ISA_IRQS |
15 | #define PXA_ISA_IRQ(x) (x) | ||
16 | #define PXA_ISA_IRQ_NUM (16) | ||
17 | #else | ||
18 | #define PXA_ISA_IRQ_NUM (0) | ||
19 | #endif | ||
20 | |||
21 | #define PXA_IRQ(x) (PXA_ISA_IRQ_NUM + (x)) | ||
15 | 22 | ||
16 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | 23 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) |
17 | #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ | 24 | #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ |
@@ -73,7 +80,7 @@ | |||
73 | #define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */ | 80 | #define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */ |
74 | #endif | 81 | #endif |
75 | 82 | ||
76 | #define PXA_GPIO_IRQ_BASE (64) | 83 | #define PXA_GPIO_IRQ_BASE PXA_IRQ(64) |
77 | #define PXA_GPIO_IRQ_NUM (128) | 84 | #define PXA_GPIO_IRQ_NUM (128) |
78 | 85 | ||
79 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) | 86 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 5e95c5372fec..fa69c3a6a38e 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -57,7 +57,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) | |||
57 | 57 | ||
58 | pxa_internal_irq_nr = irq_nr; | 58 | pxa_internal_irq_nr = irq_nr; |
59 | 59 | ||
60 | for (irq = 0; irq < irq_nr; irq += 32) { | 60 | for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) { |
61 | _ICMR(irq) = 0; /* disable all IRQs */ | 61 | _ICMR(irq) = 0; /* disable all IRQs */ |
62 | _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */ | 62 | _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */ |
63 | } | 63 | } |