diff options
-rw-r--r-- | arch/arm/mach-sunxi/sunxi.c | 5 | ||||
-rw-r--r-- | drivers/irqchip/irq-sunxi.c | 22 | ||||
-rw-r--r-- | include/linux/irqchip/sunxi.h | 27 |
3 files changed, 12 insertions, 42 deletions
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index b26748d82045..c99ab1bdee4d 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c | |||
@@ -14,13 +14,13 @@ | |||
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/irqchip.h> | ||
17 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
18 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
19 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
20 | #include <linux/io.h> | 21 | #include <linux/io.h> |
21 | 22 | ||
22 | #include <linux/clk/sunxi.h> | 23 | #include <linux/clk/sunxi.h> |
23 | #include <linux/irqchip/sunxi.h> | ||
24 | 24 | ||
25 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
@@ -104,8 +104,7 @@ static const char * const sunxi_board_dt_compat[] = { | |||
104 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | 104 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") |
105 | .init_machine = sunxi_dt_init, | 105 | .init_machine = sunxi_dt_init, |
106 | .map_io = sunxi_map_io, | 106 | .map_io = sunxi_map_io, |
107 | .init_irq = sunxi_init_irq, | 107 | .init_irq = irqchip_init, |
108 | .handle_irq = sunxi_handle_irq, | ||
109 | .restart = sunxi_restart, | 108 | .restart = sunxi_restart, |
110 | .init_time = sunxi_timer_init, | 109 | .init_time = sunxi_timer_init, |
111 | .dt_compat = sunxi_board_dt_compat, | 110 | .dt_compat = sunxi_board_dt_compat, |
diff --git a/drivers/irqchip/irq-sunxi.c b/drivers/irqchip/irq-sunxi.c index 10974fa42653..0fc49c577033 100644 --- a/drivers/irqchip/irq-sunxi.c +++ b/drivers/irqchip/irq-sunxi.c | |||
@@ -20,7 +20,10 @@ | |||
20 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
21 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
22 | 22 | ||
23 | #include <linux/irqchip/sunxi.h> | 23 | #include <asm/exception.h> |
24 | #include <asm/mach/irq.h> | ||
25 | |||
26 | #include "irqchip.h" | ||
24 | 27 | ||
25 | #define SUNXI_IRQ_VECTOR_REG 0x00 | 28 | #define SUNXI_IRQ_VECTOR_REG 0x00 |
26 | #define SUNXI_IRQ_PROTECTION_REG 0x08 | 29 | #define SUNXI_IRQ_PROTECTION_REG 0x08 |
@@ -33,6 +36,8 @@ | |||
33 | static void __iomem *sunxi_irq_base; | 36 | static void __iomem *sunxi_irq_base; |
34 | static struct irq_domain *sunxi_irq_domain; | 37 | static struct irq_domain *sunxi_irq_domain; |
35 | 38 | ||
39 | static asmlinkage void __exception_irq_entry sunxi_handle_irq(struct pt_regs *regs); | ||
40 | |||
36 | void sunxi_irq_ack(struct irq_data *irqd) | 41 | void sunxi_irq_ack(struct irq_data *irqd) |
37 | { | 42 | { |
38 | unsigned int irq = irqd_to_hwirq(irqd); | 43 | unsigned int irq = irqd_to_hwirq(irqd); |
@@ -125,20 +130,13 @@ static int __init sunxi_of_init(struct device_node *node, | |||
125 | if (!sunxi_irq_domain) | 130 | if (!sunxi_irq_domain) |
126 | panic("%s: unable to create IRQ domain\n", node->full_name); | 131 | panic("%s: unable to create IRQ domain\n", node->full_name); |
127 | 132 | ||
128 | return 0; | 133 | set_handle_irq(sunxi_handle_irq); |
129 | } | ||
130 | |||
131 | static struct of_device_id sunxi_irq_dt_ids[] __initconst = { | ||
132 | { .compatible = "allwinner,sunxi-ic", .data = sunxi_of_init }, | ||
133 | { } | ||
134 | }; | ||
135 | 134 | ||
136 | void __init sunxi_init_irq(void) | 135 | return 0; |
137 | { | ||
138 | of_irq_init(sunxi_irq_dt_ids); | ||
139 | } | 136 | } |
137 | IRQCHIP_DECLARE(allwinner_sunxi_ic, "allwinner,sunxi-ic", sunxi_of_init); | ||
140 | 138 | ||
141 | asmlinkage void __exception_irq_entry sunxi_handle_irq(struct pt_regs *regs) | 139 | static asmlinkage void __exception_irq_entry sunxi_handle_irq(struct pt_regs *regs) |
142 | { | 140 | { |
143 | u32 irq, hwirq; | 141 | u32 irq, hwirq; |
144 | 142 | ||
diff --git a/include/linux/irqchip/sunxi.h b/include/linux/irqchip/sunxi.h deleted file mode 100644 index 1fe2c2260e2b..000000000000 --- a/include/linux/irqchip/sunxi.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __LINUX_IRQCHIP_SUNXI_H | ||
18 | #define __LINUX_IRQCHIP_SUNXI_H | ||
19 | |||
20 | #include <asm/exception.h> | ||
21 | |||
22 | extern void sunxi_init_irq(void); | ||
23 | |||
24 | extern asmlinkage void __exception_irq_entry sunxi_handle_irq( | ||
25 | struct pt_regs *regs); | ||
26 | |||
27 | #endif | ||