diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-04-28 09:33:47 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-04 11:53:37 -0400 |
commit | 3108e6ab21a9b9dbd88f0b2ff99f73e95b8b1580 (patch) | |
tree | 9e87e1e4196849090103317d109dc95ba9d159f8 /arch/arm/mach-versatile | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
ARM: 7389/2: plat-versatile: modernize FPGA IRQ controller
This does two things to the FPGA IRQ controller in the versatile
family:
- Convert to MULTI_IRQ_HANDLER so we can drop the entry macro
from the Integrator. The C IRQ handler was inspired from
arch/arm/common/vic.c, recent bug discovered in this handler was
accounted for.
- Convert to using IRQ domains so we can get rid of the NO_IRQ
mess and proceed with device tree and such stuff.
As part of the exercise, bump all the low IRQ numbers on the
Integrator PIC to start from 1 rather than 0, since IRQ 0 is
now NO_IRQ. The Linux IRQ numbers are thus entirely decoupled
from the hardware IRQ numbers in this controller.
I was unable to split this patch. The main reason is the half-done
conversion to device tree in Versatile.
Tested on Integrator/AP and Integrator/CP.
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r-- | arch/arm/mach-versatile/core.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 6bbd74e950ab..6f5fb466a273 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -66,12 +66,6 @@ | |||
66 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) | 66 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) |
67 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) | 67 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) |
68 | 68 | ||
69 | static struct fpga_irq_data sic_irq = { | ||
70 | .base = VA_SIC_BASE, | ||
71 | .irq_start = IRQ_SIC_START, | ||
72 | .chip.name = "SIC", | ||
73 | }; | ||
74 | |||
75 | #if 1 | 69 | #if 1 |
76 | #define IRQ_MMCI0A IRQ_VICSOURCE22 | 70 | #define IRQ_MMCI0A IRQ_VICSOURCE22 |
77 | #define IRQ_AACI IRQ_VICSOURCE24 | 71 | #define IRQ_AACI IRQ_VICSOURCE24 |
@@ -105,8 +99,11 @@ void __init versatile_init_irq(void) | |||
105 | 99 | ||
106 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); | 100 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); |
107 | 101 | ||
108 | fpga_irq_init(IRQ_VICSOURCE31, ~PIC_MASK, &sic_irq); | 102 | np = of_find_matching_node_by_address(NULL, sic_of_match, |
109 | irq_domain_generate_simple(sic_of_match, VERSATILE_SIC_BASE, IRQ_SIC_START); | 103 | VERSATILE_SIC_BASE); |
104 | |||
105 | fpga_irq_init(VA_SIC_BASE, "SIC", IRQ_SIC_START, | ||
106 | IRQ_VICSOURCE31, ~PIC_MASK, np); | ||
110 | 107 | ||
111 | /* | 108 | /* |
112 | * Interrupts on secondary controller from 0 to 8 are routed to | 109 | * Interrupts on secondary controller from 0 to 8 are routed to |