diff options
-rw-r--r-- | arch/arm/mach-bcm2835/bcm2835.c | 5 | ||||
-rw-r--r-- | drivers/irqchip/irq-bcm2835.c | 22 | ||||
-rw-r--r-- | include/linux/irqchip/bcm2835.h | 29 |
3 files changed, 12 insertions, 44 deletions
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 40686d7ef500..a4abd851905a 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/irqchip/bcm2835.h> | 17 | #include <linux/irqchip.h> |
18 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #include <linux/clk/bcm2835.h> | 20 | #include <linux/clk/bcm2835.h> |
@@ -131,8 +131,7 @@ static const char * const bcm2835_compat[] = { | |||
131 | 131 | ||
132 | DT_MACHINE_START(BCM2835, "BCM2835") | 132 | DT_MACHINE_START(BCM2835, "BCM2835") |
133 | .map_io = bcm2835_map_io, | 133 | .map_io = bcm2835_map_io, |
134 | .init_irq = bcm2835_init_irq, | 134 | .init_irq = irqchip_init, |
135 | .handle_irq = bcm2835_handle_irq, | ||
136 | .init_machine = bcm2835_init, | 135 | .init_machine = bcm2835_init, |
137 | .init_time = clocksource_of_init, | 136 | .init_time = clocksource_of_init, |
138 | .restart = bcm2835_restart, | 137 | .restart = bcm2835_restart, |
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); | ||
diff --git a/include/linux/irqchip/bcm2835.h b/include/linux/irqchip/bcm2835.h deleted file mode 100644 index 48a859bc9dca..000000000000 --- a/include/linux/irqchip/bcm2835.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Broadcom | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef __LINUX_IRQCHIP_BCM2835_H_ | ||
20 | #define __LINUX_IRQCHIP_BCM2835_H_ | ||
21 | |||
22 | #include <asm/exception.h> | ||
23 | |||
24 | extern void bcm2835_init_irq(void); | ||
25 | |||
26 | extern asmlinkage void __exception_irq_entry bcm2835_handle_irq( | ||
27 | struct pt_regs *regs); | ||
28 | |||
29 | #endif | ||