diff options
author | Rob Herring <robh@kernel.org> | 2014-05-29 17:39:43 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-06-24 15:15:58 -0400 |
commit | 2920bc9abedf87451e9ba2695a4c418c567046b6 (patch) | |
tree | c5115b0a519cf52a2ae42f5c317095549b65df3e /drivers/irqchip | |
parent | 0ba6c5d26a31789fc89ebadccd8d3604e0994a51 (diff) |
irqchip: versatile-fpga: Add IRQCHIP_DECLARE support
Add support for initialization using IRQCHIP_DECLARE. This also requires
that the controller initialization set the handle_irq function pointer
itself when it is a primary controller.
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-versatile-fpga.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 3ae2bb8d9cf2..8e0bb566bfaa 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <asm/exception.h> | 14 | #include <asm/exception.h> |
15 | #include <asm/mach/irq.h> | 15 | #include <asm/mach/irq.h> |
16 | 16 | ||
17 | #include "irqchip.h" | ||
18 | |||
17 | #define IRQ_STATUS 0x00 | 19 | #define IRQ_STATUS 0x00 |
18 | #define IRQ_RAW_STATUS 0x04 | 20 | #define IRQ_RAW_STATUS 0x04 |
19 | #define IRQ_ENABLE_SET 0x08 | 21 | #define IRQ_ENABLE_SET 0x08 |
@@ -201,8 +203,10 @@ int __init fpga_irq_of_init(struct device_node *node, | |||
201 | 203 | ||
202 | /* Some chips are cascaded from a parent IRQ */ | 204 | /* Some chips are cascaded from a parent IRQ */ |
203 | parent_irq = irq_of_parse_and_map(node, 0); | 205 | parent_irq = irq_of_parse_and_map(node, 0); |
204 | if (!parent_irq) | 206 | if (!parent_irq) { |
207 | set_handle_irq(fpga_handle_irq); | ||
205 | parent_irq = -1; | 208 | parent_irq = -1; |
209 | } | ||
206 | 210 | ||
207 | fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); | 211 | fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); |
208 | 212 | ||
@@ -211,4 +215,5 @@ int __init fpga_irq_of_init(struct device_node *node, | |||
211 | 215 | ||
212 | return 0; | 216 | return 0; |
213 | } | 217 | } |
218 | IRQCHIP_DECLARE(arm_fpga, "arm,versatile-fpga-irq", fpga_irq_of_init); | ||
214 | #endif | 219 | #endif |