aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-10-31 17:04:31 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-11-04 12:09:12 -0500
commit2389d5014342e9535aad212d0c68d439aaf534ba (patch)
treeb0ebf2e8a58b7776e4982b9039439b8e6af457c2
parentda72a66ba852fef3d5dfe02ab311a894e7d791e9 (diff)
ARM: plat-versatile: move FPGA irq driver to drivers/irqchip
This moves the Versatile FPGA interrupt controller driver, used in the Integrator/AP, Integrator/CP and some Versatile boards, out of arch/arm/plat-versatile and down to drivers/irqchip where we have consensus that such drivers belong. The header file is consequently moved to <linux/platform_data/irq-versatile-fpga.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c3
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c2
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/plat-versatile/Kconfig9
-rw-r--r--arch/arm/plat-versatile/Makefile1
-rw-r--r--drivers/irqchip/Kconfig9
-rw-r--r--drivers/irqchip/Makefile1
-rw-r--r--drivers/irqchip/irq-versatile-fpga.c (renamed from arch/arm/plat-versatile/fpga-irq.c)4
-rw-r--r--include/linux/irqchip/versatile-fpga.h (renamed from arch/arm/plat-versatile/include/plat/fpga-irq.h)0
10 files changed, 16 insertions, 19 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 73067efd4845..2205e3eb55bf 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -284,8 +284,8 @@ config ARCH_INTEGRATOR
284 select MULTI_IRQ_HANDLER 284 select MULTI_IRQ_HANDLER
285 select NEED_MACH_MEMORY_H 285 select NEED_MACH_MEMORY_H
286 select PLAT_VERSATILE 286 select PLAT_VERSATILE
287 select PLAT_VERSATILE_FPGA_IRQ
288 select SPARSE_IRQ 287 select SPARSE_IRQ
288 select VERSATILE_FPGA_IRQ
289 help 289 help
290 Support for ARM's Integrator platform. 290 Support for ARM's Integrator platform.
291 291
@@ -318,7 +318,7 @@ config ARCH_VERSATILE
318 select PLAT_VERSATILE 318 select PLAT_VERSATILE
319 select PLAT_VERSATILE_CLCD 319 select PLAT_VERSATILE_CLCD
320 select PLAT_VERSATILE_CLOCK 320 select PLAT_VERSATILE_CLOCK
321 select PLAT_VERSATILE_FPGA_IRQ 321 select VERSATILE_FPGA_IRQ
322 help 322 help
323 This enables support for ARM Ltd Versatile board. 323 This enables support for ARM Ltd Versatile board.
324 324
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 4f13bc57e5a4..e67a9fe18d1b 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -31,6 +31,7 @@
31#include <linux/clockchips.h> 31#include <linux/clockchips.h>
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/io.h> 33#include <linux/io.h>
34#include <linux/irqchip/versatile-fpga.h>
34#include <linux/mtd/physmap.h> 35#include <linux/mtd/physmap.h>
35#include <linux/clk.h> 36#include <linux/clk.h>
36#include <linux/platform_data/clk-integrator.h> 37#include <linux/platform_data/clk-integrator.h>
@@ -56,8 +57,6 @@
56#include <asm/mach/pci.h> 57#include <asm/mach/pci.h>
57#include <asm/mach/time.h> 58#include <asm/mach/time.h>
58 59
59#include <plat/fpga-irq.h>
60
61#include "common.h" 60#include "common.h"
62 61
63/* 62/*
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 4423bc8e84c5..acecf04f50f7 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -20,6 +20,7 @@
20#include <linux/amba/clcd.h> 20#include <linux/amba/clcd.h>
21#include <linux/amba/mmci.h> 21#include <linux/amba/mmci.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/irqchip/versatile-fpga.h>
23#include <linux/gfp.h> 24#include <linux/gfp.h>
24#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
25#include <linux/platform_data/clk-integrator.h> 26#include <linux/platform_data/clk-integrator.h>
@@ -46,7 +47,6 @@
46#include <asm/hardware/timer-sp.h> 47#include <asm/hardware/timer-sp.h>
47 48
48#include <plat/clcd.h> 49#include <plat/clcd.h>
49#include <plat/fpga-irq.h>
50#include <plat/sched_clock.h> 50#include <plat/sched_clock.h>
51 51
52#include "common.h" 52#include "common.h"
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 5b5c1eeb5b5c..5d5929450366 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -32,6 +32,7 @@
32#include <linux/amba/mmci.h> 32#include <linux/amba/mmci.h>
33#include <linux/amba/pl022.h> 33#include <linux/amba/pl022.h>
34#include <linux/io.h> 34#include <linux/io.h>
35#include <linux/irqchip/versatile-fpga.h>
35#include <linux/gfp.h> 36#include <linux/gfp.h>
36#include <linux/clkdev.h> 37#include <linux/clkdev.h>
37#include <linux/mtd/physmap.h> 38#include <linux/mtd/physmap.h>
@@ -51,7 +52,6 @@
51#include <asm/hardware/timer-sp.h> 52#include <asm/hardware/timer-sp.h>
52 53
53#include <plat/clcd.h> 54#include <plat/clcd.h>
54#include <plat/fpga-irq.h>
55#include <plat/sched_clock.h> 55#include <plat/sched_clock.h>
56 56
57#include "core.h" 57#include "core.h"
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig
index 2a4ae8a6a081..619f0fa0f06c 100644
--- a/arch/arm/plat-versatile/Kconfig
+++ b/arch/arm/plat-versatile/Kconfig
@@ -6,15 +6,6 @@ config PLAT_VERSATILE_CLOCK
6config PLAT_VERSATILE_CLCD 6config PLAT_VERSATILE_CLCD
7 bool 7 bool
8 8
9config PLAT_VERSATILE_FPGA_IRQ
10 bool
11 select IRQ_DOMAIN
12
13config PLAT_VERSATILE_FPGA_IRQ_NR
14 int
15 default 4
16 depends on PLAT_VERSATILE_FPGA_IRQ
17
18config PLAT_VERSATILE_LEDS 9config PLAT_VERSATILE_LEDS
19 def_bool y if NEW_LEDS 10 def_bool y if NEW_LEDS
20 depends on ARCH_REALVIEW || ARCH_VERSATILE 11 depends on ARCH_REALVIEW || ARCH_VERSATILE
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile
index 74cfd94cbf80..f88d448b629c 100644
--- a/arch/arm/plat-versatile/Makefile
+++ b/arch/arm/plat-versatile/Makefile
@@ -2,7 +2,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
2 2
3obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o 3obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o
4obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o 4obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o
5obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o
6obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o 5obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o
7obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o 6obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o
8obj-$(CONFIG_SMP) += headsmp.o platsmp.o 7obj-$(CONFIG_SMP) += headsmp.o platsmp.o
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 1bb8bf6d7fd4..62ca575701d3 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -1 +1,8 @@
1# empty 1config VERSATILE_FPGA_IRQ
2 bool
3 select IRQ_DOMAIN
4
5config VERSATILE_FPGA_IRQ_NR
6 int
7 default 4
8 depends on VERSATILE_FPGA_IRQ
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 054321db4350..e2e6eb5d32f4 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -1 +1,2 @@
1obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o 1obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
2obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/drivers/irqchip/irq-versatile-fpga.c
index dfe317c20354..789b3e526930 100644
--- a/arch/arm/plat-versatile/fpga-irq.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -4,6 +4,7 @@
4#include <linux/bitops.h> 4#include <linux/bitops.h>
5#include <linux/irq.h> 5#include <linux/irq.h>
6#include <linux/io.h> 6#include <linux/io.h>
7#include <linux/irqchip/versatile-fpga.h>
7#include <linux/irqdomain.h> 8#include <linux/irqdomain.h>
8#include <linux/module.h> 9#include <linux/module.h>
9#include <linux/of.h> 10#include <linux/of.h>
@@ -11,7 +12,6 @@
11 12
12#include <asm/exception.h> 13#include <asm/exception.h>
13#include <asm/mach/irq.h> 14#include <asm/mach/irq.h>
14#include <plat/fpga-irq.h>
15 15
16#define IRQ_STATUS 0x00 16#define IRQ_STATUS 0x00
17#define IRQ_RAW_STATUS 0x04 17#define IRQ_RAW_STATUS 0x04
@@ -42,7 +42,7 @@ struct fpga_irq_data {
42}; 42};
43 43
44/* we cannot allocate memory when the controllers are initially registered */ 44/* we cannot allocate memory when the controllers are initially registered */
45static struct fpga_irq_data fpga_irq_devices[CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR]; 45static struct fpga_irq_data fpga_irq_devices[CONFIG_VERSATILE_FPGA_IRQ_NR];
46static int fpga_irq_id; 46static int fpga_irq_id;
47 47
48static void fpga_irq_mask(struct irq_data *d) 48static void fpga_irq_mask(struct irq_data *d)
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/include/linux/irqchip/versatile-fpga.h
index 1fac9651d3ca..1fac9651d3ca 100644
--- a/arch/arm/plat-versatile/include/plat/fpga-irq.h
+++ b/include/linux/irqchip/versatile-fpga.h