diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-20 17:00:53 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-01-10 12:44:38 -0500 |
commit | 73171d15873e9246c82aeda5c7fd8ec11cb97be9 (patch) | |
tree | c6076389bb2727156c649cb345b6cff864336e2d | |
parent | f6e916b82022cba67bdd0ec7df84e2bce2ef3f73 (diff) |
arm: add set_handle_irq() to register the parent IRQ controller handler function
In order to allow irqchip drivers to register their IRQ handling
function as the parent IRQ controller handler function, we provide a
convenience function. This will avoid poking directly into the global
handle_arch_irq variable.
Suggested by Arnd Bergmann.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rob Herring: remove warning. 1st one to initialize wins.]
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/include/asm/mach/irq.h | 1 | ||||
-rw-r--r-- | arch/arm/kernel/irq.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 15cb035309f7..18c883023339 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
@@ -22,6 +22,7 @@ extern int show_fiq_list(struct seq_file *, int); | |||
22 | 22 | ||
23 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 23 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
24 | extern void (*handle_arch_irq)(struct pt_regs *); | 24 | extern void (*handle_arch_irq)(struct pt_regs *); |
25 | extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); | ||
25 | #endif | 26 | #endif |
26 | 27 | ||
27 | /* | 28 | /* |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 896165096d6a..8e4ef4c83a74 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -117,6 +117,16 @@ void __init init_IRQ(void) | |||
117 | machine_desc->init_irq(); | 117 | machine_desc->init_irq(); |
118 | } | 118 | } |
119 | 119 | ||
120 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
121 | void __init set_handle_irq(void (*handle_irq)(struct pt_regs *)) | ||
122 | { | ||
123 | if (handle_arch_irq) | ||
124 | return; | ||
125 | |||
126 | handle_arch_irq = handle_irq; | ||
127 | } | ||
128 | #endif | ||
129 | |||
120 | #ifdef CONFIG_SPARSE_IRQ | 130 | #ifdef CONFIG_SPARSE_IRQ |
121 | int __init arch_probe_nr_irqs(void) | 131 | int __init arch_probe_nr_irqs(void) |
122 | { | 132 | { |