diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-07-04 12:31:36 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-11-07 04:37:37 -0500 |
commit | 5702941eec32cfd7b8cf9e36a0936e48170011a4 (patch) | |
tree | f9a04d0c3b9683de5d02af31366dd8acbc0bb972 /drivers/irqchip | |
parent | b8d490c3de797c88cfcc3364c6e04d8900121cf9 (diff) |
irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
This patch converts irq-bcm2835 driver to use the new IRQCHIP_DECLARE and
irqchip_init.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Olof Johansson <olof@lixom.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-bcm2835.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c index 16c78f1c5ef2..1693b8e7f26a 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c | |||
@@ -49,9 +49,11 @@ | |||
49 | #include <linux/of_address.h> | 49 | #include <linux/of_address.h> |
50 | #include <linux/of_irq.h> | 50 | #include <linux/of_irq.h> |
51 | #include <linux/irqdomain.h> | 51 | #include <linux/irqdomain.h> |
52 | #include <linux/irqchip/bcm2835.h> | ||
53 | 52 | ||
54 | #include <asm/exception.h> | 53 | #include <asm/exception.h> |
54 | #include <asm/mach/irq.h> | ||
55 | |||
56 | #include "irqchip.h" | ||
55 | 57 | ||
56 | /* Put the bank and irq (32 bits) into the hwirq */ | 58 | /* Put the bank and irq (32 bits) into the hwirq */ |
57 | #define MAKE_HWIRQ(b, n) ((b << 5) | (n)) | 59 | #define MAKE_HWIRQ(b, n) ((b << 5) | (n)) |
@@ -93,6 +95,8 @@ struct armctrl_ic { | |||
93 | }; | 95 | }; |
94 | 96 | ||
95 | static struct armctrl_ic intc __read_mostly; | 97 | static struct armctrl_ic intc __read_mostly; |
98 | static asmlinkage void __exception_irq_entry bcm2835_handle_irq( | ||
99 | struct pt_regs *regs); | ||
96 | 100 | ||
97 | static void armctrl_mask_irq(struct irq_data *d) | 101 | static void armctrl_mask_irq(struct irq_data *d) |
98 | { | 102 | { |
@@ -164,17 +168,9 @@ static int __init armctrl_of_init(struct device_node *node, | |||
164 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 168 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
165 | } | 169 | } |
166 | } | 170 | } |
167 | return 0; | ||
168 | } | ||
169 | |||
170 | static struct of_device_id irq_of_match[] __initconst = { | ||
171 | { .compatible = "brcm,bcm2835-armctrl-ic", .data = armctrl_of_init }, | ||
172 | { } | ||
173 | }; | ||
174 | 171 | ||
175 | void __init bcm2835_init_irq(void) | 172 | set_handle_irq(bcm2835_handle_irq); |
176 | { | 173 | return 0; |
177 | of_irq_init(irq_of_match); | ||
178 | } | 174 | } |
179 | 175 | ||
180 | /* | 176 | /* |
@@ -200,7 +196,7 @@ static void armctrl_handle_shortcut(int bank, struct pt_regs *regs, | |||
200 | handle_IRQ(irq_linear_revmap(intc.domain, irq), regs); | 196 | handle_IRQ(irq_linear_revmap(intc.domain, irq), regs); |
201 | } | 197 | } |
202 | 198 | ||
203 | asmlinkage void __exception_irq_entry bcm2835_handle_irq( | 199 | static asmlinkage void __exception_irq_entry bcm2835_handle_irq( |
204 | struct pt_regs *regs) | 200 | struct pt_regs *regs) |
205 | { | 201 | { |
206 | u32 stat, irq; | 202 | u32 stat, irq; |
@@ -222,3 +218,5 @@ asmlinkage void __exception_irq_entry bcm2835_handle_irq( | |||
222 | } | 218 | } |
223 | } | 219 | } |
224 | } | 220 | } |
221 | |||
222 | IRQCHIP_DECLARE(bcm2835_armctrl_ic, "brcm,bcm2835-armctrl-ic", armctrl_of_init); | ||