2013-05-23 11:33:09

by Boris BREZILLON

[permalink] [raw]
Subject: [RESEND PATCH 0/3] ARM: at91: move aic driver to drivers/irqchip

Hello,

Sorry for the resend. This version is made using git format-patch -M.

This patch series move the at91 AIC (Advance Interrupt Controller)
driver to the irqchip subsystem directory (drivers/irqchip).

It also make use of IRQCHIP_DECLARE to register irqchip for dt boards
instead of using the machine specific "init_irq" function.

Finally it register the arch specific irq handler inside the the init
functions using set_handle_irq. This way we can remove all the machine
specific "handle_irq".

This patch series was tested on kizbox board (sam9g20 SoC) using
device tree. Could someone test it on other boards (both dt and non dt)?

Best Regards,
Boris

Boris BREZILLON (3):
ARM: at91: move at91 aic driver to drivers/irqchip
ARM: at91: use IRQCHIP_DECLARE instead of machine specific init_irq
ARM: at91: use set_handle_irq instead of machine specific handle_irq

arch/arm/mach-at91/Makefile | 2 +-
arch/arm/mach-at91/at91rm9200.c | 2 +-
arch/arm/mach-at91/at91sam9260.c | 2 +-
arch/arm/mach-at91/at91sam9261.c | 2 +-
arch/arm/mach-at91/at91sam9263.c | 2 +-
arch/arm/mach-at91/at91sam9g45.c | 2 +-
arch/arm/mach-at91/at91sam9rl.c | 2 +-
arch/arm/mach-at91/at91x40.c | 2 +-
arch/arm/mach-at91/board-1arm.c | 3 +--
arch/arm/mach-at91/board-afeb-9260v1.c | 3 +--
arch/arm/mach-at91/board-cam60.c | 3 +--
arch/arm/mach-at91/board-carmeva.c | 3 +--
arch/arm/mach-at91/board-cpu9krea.c | 3 +--
arch/arm/mach-at91/board-cpuat91.c | 3 +--
arch/arm/mach-at91/board-csb337.c | 3 +--
arch/arm/mach-at91/board-csb637.c | 3 +--
arch/arm/mach-at91/board-dt-rm9200.c | 15 ++-------------
arch/arm/mach-at91/board-dt-sam9.c | 16 ++--------------
arch/arm/mach-at91/board-dt-sama5.c | 16 ++--------------
arch/arm/mach-at91/board-eb01.c | 4 ++--
arch/arm/mach-at91/board-eb9200.c | 4 ++--
arch/arm/mach-at91/board-ecbat91.c | 3 +--
arch/arm/mach-at91/board-eco920.c | 3 +--
arch/arm/mach-at91/board-flexibity.c | 3 +--
arch/arm/mach-at91/board-foxg20.c | 3 +--
arch/arm/mach-at91/board-gsia18s.c | 3 +--
arch/arm/mach-at91/board-kafa.c | 3 +--
arch/arm/mach-at91/board-kb9202.c | 3 +--
arch/arm/mach-at91/board-pcontrol-g20.c | 3 +--
arch/arm/mach-at91/board-picotux200.c | 3 +--
arch/arm/mach-at91/board-qil-a9260.c | 3 +--
arch/arm/mach-at91/board-rm9200dk.c | 3 +--
arch/arm/mach-at91/board-rm9200ek.c | 3 +--
arch/arm/mach-at91/board-rsi-ews.c | 4 ++--
arch/arm/mach-at91/board-sam9-l9260.c | 3 +--
arch/arm/mach-at91/board-sam9260ek.c | 3 +--
arch/arm/mach-at91/board-sam9261ek.c | 3 +--
arch/arm/mach-at91/board-sam9263ek.c | 3 +--
arch/arm/mach-at91/board-sam9g20ek.c | 4 +---
arch/arm/mach-at91/board-sam9m10g45ek.c | 3 +--
arch/arm/mach-at91/board-sam9rlek.c | 3 +--
arch/arm/mach-at91/board-snapper9260.c | 3 +--
arch/arm/mach-at91/board-stamp9g20.c | 4 +---
arch/arm/mach-at91/board-usb-a926x.c | 5 +----
arch/arm/mach-at91/board-yl-9200.c | 3 +--
arch/arm/mach-at91/generic.h | 5 -----
arch/arm/mach-at91/{ => include/mach}/at91_aic.h | 3 ---
arch/arm/mach-at91/pm.c | 2 +-
drivers/irqchip/Makefile | 1 +
.../mach-at91/irq.c => drivers/irqchip/irq-at91.c | 12 +++++++++++-
50 files changed, 64 insertions(+), 131 deletions(-)
rename arch/arm/mach-at91/{ => include/mach}/at91_aic.h (97%)
rename arch/arm/mach-at91/irq.c => drivers/irqchip/irq-at91.c (97%)

--
1.7.9.5


2013-05-23 09:06:38

by Boris BREZILLON

[permalink] [raw]
Subject: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

Move arch/arm/mach-at91/irq.c to drivers/irqchip/irq-at91.c.
Move arch/arm/mach-at91/at91_aic.h to
arch/arm/mach-at91/include/mach/at91_aic.h to avoid ugly reference
to header file :
#include "../../arch/arm/mach-at91/at91_aic.h"

Signed-off-by: Boris BREZILLON <[email protected]>
---
arch/arm/mach-at91/Makefile | 2 +-
arch/arm/mach-at91/at91rm9200.c | 2 +-
arch/arm/mach-at91/at91sam9260.c | 2 +-
arch/arm/mach-at91/at91sam9261.c | 2 +-
arch/arm/mach-at91/at91sam9263.c | 2 +-
arch/arm/mach-at91/at91sam9g45.c | 2 +-
arch/arm/mach-at91/at91sam9rl.c | 2 +-
arch/arm/mach-at91/at91x40.c | 2 +-
arch/arm/mach-at91/board-1arm.c | 2 +-
arch/arm/mach-at91/board-afeb-9260v1.c | 2 +-
arch/arm/mach-at91/board-cam60.c | 2 +-
arch/arm/mach-at91/board-carmeva.c | 2 +-
arch/arm/mach-at91/board-cpu9krea.c | 2 +-
arch/arm/mach-at91/board-cpuat91.c | 2 +-
arch/arm/mach-at91/board-csb337.c | 2 +-
arch/arm/mach-at91/board-csb637.c | 2 +-
arch/arm/mach-at91/board-dt-rm9200.c | 3 ++-
arch/arm/mach-at91/board-dt-sam9.c | 3 ++-
arch/arm/mach-at91/board-dt-sama5.c | 3 ++-
arch/arm/mach-at91/board-eb01.c | 3 ++-
arch/arm/mach-at91/board-eb9200.c | 3 ++-
arch/arm/mach-at91/board-ecbat91.c | 2 +-
arch/arm/mach-at91/board-eco920.c | 2 +-
arch/arm/mach-at91/board-flexibity.c | 2 +-
arch/arm/mach-at91/board-foxg20.c | 2 +-
arch/arm/mach-at91/board-gsia18s.c | 2 +-
arch/arm/mach-at91/board-kafa.c | 2 +-
arch/arm/mach-at91/board-kb9202.c | 2 +-
arch/arm/mach-at91/board-pcontrol-g20.c | 2 +-
arch/arm/mach-at91/board-picotux200.c | 2 +-
arch/arm/mach-at91/board-qil-a9260.c | 2 +-
arch/arm/mach-at91/board-rm9200dk.c | 2 +-
arch/arm/mach-at91/board-rm9200ek.c | 2 +-
arch/arm/mach-at91/board-rsi-ews.c | 3 ++-
arch/arm/mach-at91/board-sam9-l9260.c | 2 +-
arch/arm/mach-at91/board-sam9260ek.c | 2 +-
arch/arm/mach-at91/board-sam9261ek.c | 2 +-
arch/arm/mach-at91/board-sam9263ek.c | 2 +-
arch/arm/mach-at91/board-sam9g20ek.c | 2 +-
arch/arm/mach-at91/board-sam9m10g45ek.c | 2 +-
arch/arm/mach-at91/board-sam9rlek.c | 2 +-
arch/arm/mach-at91/board-snapper9260.c | 2 +-
arch/arm/mach-at91/board-stamp9g20.c | 2 +-
arch/arm/mach-at91/board-usb-a926x.c | 2 +-
arch/arm/mach-at91/board-yl-9200.c | 2 +-
arch/arm/mach-at91/{ => include/mach}/at91_aic.h | 0
arch/arm/mach-at91/pm.c | 2 +-
drivers/irqchip/Makefile | 1 +
.../mach-at91/irq.c => drivers/irqchip/irq-at91.c | 2 +-
49 files changed, 54 insertions(+), 47 deletions(-)

diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 788562d..5333701 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

-obj-y := irq.o gpio.o setup.o
+obj-y := gpio.o setup.o
obj-m :=
obj-n :=
obj- :=
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index d193a40..6c1204a 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -20,8 +20,8 @@
#include <mach/at91_pmc.h>
#include <mach/at91_st.h>
#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "soc.h"
#include "generic.h"
#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index a8ce245..55332fa 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -21,8 +21,8 @@
#include <mach/at91_dbgu.h>
#include <mach/at91sam9260.h>
#include <mach/at91_pmc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_rstc.h"
#include "soc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 25efb5a..6db61e6 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -20,8 +20,8 @@
#include <mach/cpu.h>
#include <mach/at91sam9261.h>
#include <mach/at91_pmc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_rstc.h"
#include "soc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index f44ffd2..b9ec043 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -19,8 +19,8 @@
#include <asm/system_misc.h>
#include <mach/at91sam9263.h>
#include <mach/at91_pmc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_rstc.h"
#include "soc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 8b7fce0..1270707 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -20,8 +20,8 @@
#include <mach/at91sam9g45.h>
#include <mach/at91_pmc.h>
#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "soc.h"
#include "generic.h"
#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index f77fae5..d5f77d6 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -20,8 +20,8 @@
#include <mach/at91_dbgu.h>
#include <mach/at91sam9rl.h>
#include <mach/at91_pmc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_rstc.h"
#include "soc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index 19ca793..e8b30fb 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -20,8 +20,8 @@
#include <mach/at91x40.h>
#include <mach/at91_st.h>
#include <mach/timex.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "generic.h"

/*
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index 35ab632..8037dfe 100644
--- a/arch/arm/mach-at91/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -34,9 +34,9 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

+#include <mach/at91_aic.h>
#include <mach/cpu.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
index f95e31c..28bea23 100644
--- a/arch/arm/mach-at91/board-afeb-9260v1.c
+++ b/arch/arm/mach-at91/board-afeb-9260v1.c
@@ -42,8 +42,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index ade948b..6ebdf32 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -39,8 +39,8 @@
#include <asm/mach/irq.h>

#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index 9298305..842db49 100644
--- a/arch/arm/mach-at91/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -35,8 +35,8 @@
#include <asm/mach/irq.h>

#include <mach/hardware.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
index 008527e..4714e9e 100644
--- a/arch/arm/mach-at91/board-cpu9krea.c
+++ b/arch/arm/mach-at91/board-cpu9krea.c
@@ -43,8 +43,8 @@
#include <mach/at91sam9_smc.h>
#include <mach/at91sam9260_matrix.h>
#include <mach/at91_matrix.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
index 42f1353..c1663ed 100644
--- a/arch/arm/mach-at91/board-cpuat91.c
+++ b/arch/arm/mach-at91/board-cpuat91.c
@@ -39,8 +39,8 @@
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index e5fde215..3231703 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -38,8 +38,8 @@
#include <asm/mach/irq.h>

#include <mach/hardware.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index fdf1106..d58c7e6 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -35,8 +35,8 @@
#include <asm/mach/irq.h>

#include <mach/hardware.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
index 3fcb662..0c2a06d 100644
--- a/arch/arm/mach-at91/board-dt-rm9200.c
+++ b/arch/arm/mach-at91/board-dt-rm9200.c
@@ -22,7 +22,8 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>
+
#include "generic.h"


diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index 8db3013..ac899d8 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -21,7 +21,8 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>
+
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
index 705305e..43b8f7a 100644
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ b/arch/arm/mach-at91/board-dt-sama5.c
@@ -23,7 +23,8 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>
+
#include "generic.h"


diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
index becf0a6..4097ede 100644
--- a/arch/arm/mach-at91/board-eb01.c
+++ b/arch/arm/mach-at91/board-eb01.c
@@ -28,7 +28,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>
+
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index f9be816..afa5ebb 100644
--- a/arch/arm/mach-at91/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -35,7 +35,8 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>
+
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index b2fcd71..c794768 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -38,8 +38,8 @@
#include <asm/mach/irq.h>

#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
index 77de410..fc3e373 100644
--- a/arch/arm/mach-at91/board-eco920.c
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -27,8 +27,8 @@
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
index 737c085..59a1958 100644
--- a/arch/arm/mach-at91/board-flexibity.c
+++ b/arch/arm/mach-at91/board-flexibity.c
@@ -33,8 +33,8 @@
#include <asm/mach/irq.h>

#include <mach/hardware.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
index c20a870..4b4df05 100644
--- a/arch/arm/mach-at91/board-foxg20.c
+++ b/arch/arm/mach-at91/board-foxg20.c
@@ -42,8 +42,8 @@
#include <asm/mach/irq.h>

#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
index c1d61d2..1babcbd 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -31,8 +31,8 @@
#include <asm/mach/arch.h>

#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index 88e2f5d..aca52d3 100644
--- a/arch/arm/mach-at91/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -35,8 +35,8 @@
#include <asm/mach/irq.h>

#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 0c519d9..7768df0 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -38,8 +38,8 @@
#include <mach/cpu.h>
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
index 65c0d6b..6df21db 100644
--- a/arch/arm/mach-at91/board-pcontrol-g20.c
+++ b/arch/arm/mach-at91/board-pcontrol-g20.c
@@ -30,8 +30,8 @@
#include <asm/mach/arch.h>

#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
index ab2b2ec..566b30c 100644
--- a/arch/arm/mach-at91/board-picotux200.c
+++ b/arch/arm/mach-at91/board-picotux200.c
@@ -39,8 +39,8 @@

#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
index aa3bc9b..0ae5eb1 100644
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ b/arch/arm/mach-at91/board-qil-a9260.c
@@ -41,8 +41,8 @@

#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
index 690541b..82f0335e 100644
--- a/arch/arm/mach-at91/board-rm9200dk.c
+++ b/arch/arm/mach-at91/board-rm9200dk.c
@@ -41,8 +41,8 @@
#include <mach/hardware.h>
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
index 8b17dad..5e8a4f7 100644
--- a/arch/arm/mach-at91/board-rm9200ek.c
+++ b/arch/arm/mach-at91/board-rm9200ek.c
@@ -41,8 +41,8 @@
#include <mach/hardware.h>
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
index f6d7f19..e7d0a69 100644
--- a/arch/arm/mach-at91/board-rsi-ews.c
+++ b/arch/arm/mach-at91/board-rsi-ews.c
@@ -28,7 +28,8 @@

#include <linux/gpio.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>
+
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index 43ee4dc..2e400cd 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -38,8 +38,8 @@
#include <asm/mach/irq.h>

#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index 0b153c8..66ee7ac 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -43,8 +43,8 @@
#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
#include <mach/system_rev.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index b446645..515957e 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -47,8 +47,8 @@
#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
#include <mach/system_rev.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 3284df0..1099272 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -46,8 +46,8 @@
#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
#include <mach/system_rev.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index f9cd1f2..9fe718b 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -45,8 +45,8 @@

#include <mach/at91sam9_smc.h>
#include <mach/system_rev.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index 2a94896..1846647 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -44,8 +44,8 @@

#include <mach/at91sam9_smc.h>
#include <mach/system_rev.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index aa265dc..623f2d1 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -31,9 +31,9 @@

#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>


-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
index 3aaa978..8fef38a 100644
--- a/arch/arm/mach-at91/board-snapper9260.c
+++ b/arch/arm/mach-at91/board-snapper9260.c
@@ -33,8 +33,8 @@

#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index 869cbec..6bda942 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -26,8 +26,8 @@
#include <asm/mach/arch.h>

#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
index 2487d94..cedbc66 100644
--- a/arch/arm/mach-at91/board-usb-a926x.c
+++ b/arch/arm/mach-at91/board-usb-a926x.c
@@ -42,8 +42,8 @@

#include <mach/hardware.h>
#include <mach/at91sam9_smc.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "at91_shdwc.h"
#include "board.h"
#include "sam9_smc.h"
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index be08377..c61d8c9 100644
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -46,8 +46,8 @@
#include <mach/at91rm9200_mc.h>
#include <mach/at91_ramc.h>
#include <mach/cpu.h>
+#include <mach/at91_aic.h>

-#include "at91_aic.h"
#include "board.h"
#include "generic.h"

diff --git a/arch/arm/mach-at91/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
similarity index 100%
rename from arch/arm/mach-at91/at91_aic.h
rename to arch/arm/mach-at91/include/mach/at91_aic.h
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 530db30..d2a24e8 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -26,9 +26,9 @@
#include <asm/mach/irq.h>

#include <mach/at91_pmc.h>
+#include <mach/at91_aic.h>
#include <mach/cpu.h>

-#include "at91_aic.h"
#include "generic.h"
#include "pm.h"

diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index cda4cb5..208b708 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -1,5 +1,6 @@
obj-$(CONFIG_IRQCHIP) += irqchip.o

+obj-$(CONFIG_ARCH_AT91) += irq-at91.o
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
obj-$(CONFIG_ARCH_EXYNOS) += exynos-combiner.o
obj-$(CONFIG_ARCH_MVEBU) += irq-armada-370-xp.o
diff --git a/arch/arm/mach-at91/irq.c b/drivers/irqchip/irq-at91.c
similarity index 99%
rename from arch/arm/mach-at91/irq.c
rename to drivers/irqchip/irq-at91.c
index e0ca591..daf2959 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/drivers/irqchip/irq-at91.c
@@ -42,7 +42,7 @@
#include <asm/mach/irq.h>
#include <asm/mach/map.h>

-#include "at91_aic.h"
+#include <mach/at91_aic.h>

void __iomem *at91_aic_base;
static struct irq_domain *at91_aic_domain;
--
1.7.9.5

2013-05-23 09:13:22

by Boris BREZILLON

[permalink] [raw]
Subject: [PATCH 2/3] ARM: at91: use IRQCHIP_DECLARE instead of machine specific init_irq

Replace machine specific init_irq functions with IRQCHIP_DECLARE.

Signed-off-by: Boris BREZILLON <[email protected]>
---
arch/arm/mach-at91/board-dt-rm9200.c | 11 -----------
arch/arm/mach-at91/board-dt-sam9.c | 12 ------------
arch/arm/mach-at91/board-dt-sama5.c | 12 ------------
arch/arm/mach-at91/generic.h | 5 -----
drivers/irqchip/irq-at91.c | 4 ++++
5 files changed, 4 insertions(+), 40 deletions(-)

diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
index 0c2a06d..523a9ae 100644
--- a/arch/arm/mach-at91/board-dt-rm9200.c
+++ b/arch/arm/mach-at91/board-dt-rm9200.c
@@ -27,16 +27,6 @@
#include "generic.h"


-static const struct of_device_id irq_of_match[] __initconst = {
- { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
- { /*sentinel*/ }
-};
-
-static void __init at91rm9200_dt_init_irq(void)
-{
- of_irq_init(irq_of_match);
-}
-
static void __init at91rm9200_dt_device_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -52,7 +42,6 @@ DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
.map_io = at91_map_io,
.handle_irq = at91_aic_handle_irq,
.init_early = at91rm9200_dt_initialize,
- .init_irq = at91rm9200_dt_init_irq,
.init_machine = at91rm9200_dt_device_init,
.dt_compat = at91rm9200_dt_board_compat,
MACHINE_END
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index ac899d8..a07da3b 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -27,17 +27,6 @@
#include "generic.h"


-static const struct of_device_id irq_of_match[] __initconst = {
-
- { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
- { /*sentinel*/ }
-};
-
-static void __init at91_dt_init_irq(void)
-{
- of_irq_init(irq_of_match);
-}
-
static void __init at91_dt_device_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -54,7 +43,6 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
.map_io = at91_map_io,
.handle_irq = at91_aic_handle_irq,
.init_early = at91_dt_initialize,
- .init_irq = at91_dt_init_irq,
.init_machine = at91_dt_device_init,
.dt_compat = at91_dt_board_compat,
MACHINE_END
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
index 43b8f7a..65cf099 100644
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ b/arch/arm/mach-at91/board-dt-sama5.c
@@ -28,17 +28,6 @@
#include "generic.h"


-static const struct of_device_id irq_of_match[] __initconst = {
-
- { .compatible = "atmel,sama5d3-aic", .data = at91_aic5_of_init },
- { /*sentinel*/ }
-};
-
-static void __init at91_dt_init_irq(void)
-{
- of_irq_init(irq_of_match);
-}
-
static int ksz9021rn_phy_fixup(struct phy_device *phy)
{
int value;
@@ -81,7 +70,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
.map_io = at91_map_io,
.handle_irq = at91_aic5_handle_irq,
.init_early = at91_dt_initialize,
- .init_irq = at91_dt_init_irq,
.init_machine = sama5_dt_device_init,
.dt_compat = sama5_dt_board_compat,
MACHINE_END
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 78ab065..23077cf 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -29,11 +29,6 @@ extern void __init at91_init_interrupts(unsigned int priority[]);
extern void __init at91x40_init_interrupts(unsigned int priority[]);
extern void __init at91_aic_init(unsigned int priority[],
unsigned int ext_irq_mask);
-extern int __init at91_aic_of_init(struct device_node *node,
- struct device_node *parent);
-extern int __init at91_aic5_of_init(struct device_node *node,
- struct device_node *parent);
-

/* Timer */
extern void at91rm9200_ioremap_st(u32 addr);
diff --git a/drivers/irqchip/irq-at91.c b/drivers/irqchip/irq-at91.c
index daf2959..b45fe2c 100644
--- a/drivers/irqchip/irq-at91.c
+++ b/drivers/irqchip/irq-at91.c
@@ -44,6 +44,8 @@

#include <mach/at91_aic.h>

+#include "irqchip.h"
+
void __iomem *at91_aic_base;
static struct irq_domain *at91_aic_domain;
static struct device_node *at91_aic_np;
@@ -471,6 +473,7 @@ int __init at91_aic_of_init(struct device_node *node,

return 0;
}
+IRQCHIP_DECLARE(at91rm9200_aic, "atmel,at91rm9200-aic", at91_aic_of_init);

int __init at91_aic5_of_init(struct device_node *node,
struct device_node *parent)
@@ -493,6 +496,7 @@ int __init at91_aic5_of_init(struct device_node *node,

return 0;
}
+IRQCHIP_DECLARE(sama5d3_aic, "atmel,sama5d3-aic", at91_aic5_of_init);
#endif

/*
--
1.7.9.5

2013-05-23 09:13:51

by Boris BREZILLON

[permalink] [raw]
Subject: [PATCH 3/3] ARM: at91: use set_handle_irq instead of machine specific handle_irq

Set machine specific irq handler using set_handle_irq inside aic init functions
instead of handle_irq pointer from machine_desc.

Signed-off-by: Boris BREZILLON <[email protected]>
---
arch/arm/mach-at91/board-1arm.c | 1 -
arch/arm/mach-at91/board-afeb-9260v1.c | 1 -
arch/arm/mach-at91/board-cam60.c | 1 -
arch/arm/mach-at91/board-carmeva.c | 1 -
arch/arm/mach-at91/board-cpu9krea.c | 1 -
arch/arm/mach-at91/board-cpuat91.c | 1 -
arch/arm/mach-at91/board-csb337.c | 1 -
arch/arm/mach-at91/board-csb637.c | 1 -
arch/arm/mach-at91/board-dt-rm9200.c | 1 -
arch/arm/mach-at91/board-dt-sam9.c | 1 -
arch/arm/mach-at91/board-dt-sama5.c | 1 -
arch/arm/mach-at91/board-eb01.c | 1 -
arch/arm/mach-at91/board-eb9200.c | 1 -
arch/arm/mach-at91/board-ecbat91.c | 1 -
arch/arm/mach-at91/board-eco920.c | 1 -
arch/arm/mach-at91/board-flexibity.c | 1 -
arch/arm/mach-at91/board-foxg20.c | 1 -
arch/arm/mach-at91/board-gsia18s.c | 1 -
arch/arm/mach-at91/board-kafa.c | 1 -
arch/arm/mach-at91/board-kb9202.c | 1 -
arch/arm/mach-at91/board-pcontrol-g20.c | 1 -
arch/arm/mach-at91/board-picotux200.c | 1 -
arch/arm/mach-at91/board-qil-a9260.c | 1 -
arch/arm/mach-at91/board-rm9200dk.c | 1 -
arch/arm/mach-at91/board-rm9200ek.c | 1 -
arch/arm/mach-at91/board-rsi-ews.c | 1 -
arch/arm/mach-at91/board-sam9-l9260.c | 1 -
arch/arm/mach-at91/board-sam9260ek.c | 1 -
arch/arm/mach-at91/board-sam9261ek.c | 1 -
arch/arm/mach-at91/board-sam9263ek.c | 1 -
arch/arm/mach-at91/board-sam9g20ek.c | 2 --
arch/arm/mach-at91/board-sam9m10g45ek.c | 1 -
arch/arm/mach-at91/board-sam9rlek.c | 1 -
arch/arm/mach-at91/board-snapper9260.c | 1 -
arch/arm/mach-at91/board-stamp9g20.c | 2 --
arch/arm/mach-at91/board-usb-a926x.c | 3 ---
arch/arm/mach-at91/board-yl-9200.c | 1 -
arch/arm/mach-at91/include/mach/at91_aic.h | 3 ---
drivers/irqchip/irq-at91.c | 6 ++++++
39 files changed, 6 insertions(+), 44 deletions(-)

diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index 8037dfe..33366d04 100644
--- a/arch/arm/mach-at91/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -92,7 +92,6 @@ MACHINE_START(ONEARM, "Ajeco 1ARM single board computer")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = onearm_init_early,
.init_irq = at91_init_irq_default,
.init_machine = onearm_board_init,
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
index 28bea23..c2026ff 100644
--- a/arch/arm/mach-at91/board-afeb-9260v1.c
+++ b/arch/arm/mach-at91/board-afeb-9260v1.c
@@ -212,7 +212,6 @@ MACHINE_START(AFEB9260, "Custom afeb9260 board")
/* Maintainer: Sergey Lapin <[email protected]> */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = afeb9260_init_early,
.init_irq = at91_init_irq_default,
.init_machine = afeb9260_board_init,
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index 6ebdf32..64deb3d 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -189,7 +189,6 @@ MACHINE_START(CAM60, "KwikByte CAM60")
/* Maintainer: KwikByte */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = cam60_init_early,
.init_irq = at91_init_irq_default,
.init_machine = cam60_board_init,
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index 842db49..6c4a243 100644
--- a/arch/arm/mach-at91/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -159,7 +159,6 @@ MACHINE_START(CARMEVA, "Carmeva")
/* Maintainer: Conitec Datasystems */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = carmeva_init_early,
.init_irq = at91_init_irq_default,
.init_machine = carmeva_board_init,
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
index 4714e9e..80c5a94 100644
--- a/arch/arm/mach-at91/board-cpu9krea.c
+++ b/arch/arm/mach-at91/board-cpu9krea.c
@@ -376,7 +376,6 @@ MACHINE_START(CPUAT9G20, "Eukrea CPU9G20")
/* Maintainer: Eric Benard - EUKREA Electromatique */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = cpu9krea_init_early,
.init_irq = at91_init_irq_default,
.init_machine = cpu9krea_board_init,
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
index c1663ed..d91ec57 100644
--- a/arch/arm/mach-at91/board-cpuat91.c
+++ b/arch/arm/mach-at91/board-cpuat91.c
@@ -180,7 +180,6 @@ MACHINE_START(CPUAT91, "Eukrea")
/* Maintainer: Eric Benard - EUKREA Electromatique */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = cpuat91_init_early,
.init_irq = at91_init_irq_default,
.init_machine = cpuat91_board_init,
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index 3231703..f660331 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -253,7 +253,6 @@ MACHINE_START(CSB337, "Cogent CSB337")
/* Maintainer: Bill Gatliff */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = csb337_init_early,
.init_irq = at91_init_irq_default,
.init_machine = csb337_board_init,
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index d58c7e6..27ce1ce 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -134,7 +134,6 @@ MACHINE_START(CSB637, "Cogent CSB637")
/* Maintainer: Bill Gatliff */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = csb637_init_early,
.init_irq = at91_init_irq_default,
.init_machine = csb637_board_init,
diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
index 523a9ae..72a0658 100644
--- a/arch/arm/mach-at91/board-dt-rm9200.c
+++ b/arch/arm/mach-at91/board-dt-rm9200.c
@@ -40,7 +40,6 @@ static const char *at91rm9200_dt_board_compat[] __initdata = {
DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = at91rm9200_dt_initialize,
.init_machine = at91rm9200_dt_device_init,
.dt_compat = at91rm9200_dt_board_compat,
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index a07da3b..404a45c 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -41,7 +41,6 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = at91_dt_initialize,
.init_machine = at91_dt_device_init,
.dt_compat = at91_dt_board_compat,
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
index 65cf099..68619a8 100644
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ b/arch/arm/mach-at91/board-dt-sama5.c
@@ -68,7 +68,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic5_handle_irq,
.init_early = at91_dt_initialize,
.init_machine = sama5_dt_device_init,
.dt_compat = sama5_dt_board_compat,
diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
index 4097ede..6159ba1 100644
--- a/arch/arm/mach-at91/board-eb01.c
+++ b/arch/arm/mach-at91/board-eb01.c
@@ -46,7 +46,6 @@ static void __init at91eb01_init_early(void)
MACHINE_START(AT91EB01, "Atmel AT91 EB01")
/* Maintainer: Greg Ungerer <[email protected]> */
.init_time = at91x40_timer_init,
- .handle_irq = at91_aic_handle_irq,
.init_early = at91eb01_init_early,
.init_irq = at91eb01_init_irq,
MACHINE_END
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index afa5ebb..f1459c5 100644
--- a/arch/arm/mach-at91/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -119,7 +119,6 @@ static void __init eb9200_board_init(void)
MACHINE_START(ATEB9200, "Embest ATEB9200")
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = eb9200_init_early,
.init_irq = at91_init_irq_default,
.init_machine = eb9200_board_init,
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index c794768..38e4fec 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -183,7 +183,6 @@ MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
/* Maintainer: emQbit.com */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ecb_at91init_early,
.init_irq = at91_init_irq_default,
.init_machine = ecb_at91board_init,
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
index fc3e373..f89904f 100644
--- a/arch/arm/mach-at91/board-eco920.c
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -151,7 +151,6 @@ MACHINE_START(ECO920, "eco920")
/* Maintainer: Sascha Hauer */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = eco920_init_early,
.init_irq = at91_init_irq_default,
.init_machine = eco920_board_init,
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
index 59a1958..090b17a 100644
--- a/arch/arm/mach-at91/board-flexibity.c
+++ b/arch/arm/mach-at91/board-flexibity.c
@@ -161,7 +161,6 @@ MACHINE_START(FLEXIBITY, "Flexibity Connect")
/* Maintainer: Maxim Osipov */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = flexibity_init_early,
.init_irq = at91_init_irq_default,
.init_machine = flexibity_board_init,
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
index 4b4df05..6c90394 100644
--- a/arch/arm/mach-at91/board-foxg20.c
+++ b/arch/arm/mach-at91/board-foxg20.c
@@ -264,7 +264,6 @@ MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
/* Maintainer: Sergio Tanzilli */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = foxg20_init_early,
.init_irq = at91_init_irq_default,
.init_machine = foxg20_board_init,
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
index 1babcbd..07ebfd3 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -576,7 +576,6 @@ static void __init gsia18s_board_init(void)
MACHINE_START(GSIA18S, "GS_IA18_S")
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = gsia18s_init_early,
.init_irq = at91_init_irq_default,
.init_machine = gsia18s_board_init,
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index aca52d3..82d2113 100644
--- a/arch/arm/mach-at91/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -105,7 +105,6 @@ MACHINE_START(KAFA, "Sperry-Sun KAFA")
/* Maintainer: Sergei Sharonov */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = kafa_init_early,
.init_irq = at91_init_irq_default,
.init_machine = kafa_board_init,
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 7768df0..3a2040f 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -151,7 +151,6 @@ MACHINE_START(KB9200, "KB920x")
/* Maintainer: KwikByte, Inc. */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = kb9202_init_early,
.init_irq = at91_init_irq_default,
.init_machine = kb9202_board_init,
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
index 6df21db..0df7d60 100644
--- a/arch/arm/mach-at91/board-pcontrol-g20.c
+++ b/arch/arm/mach-at91/board-pcontrol-g20.c
@@ -219,7 +219,6 @@ MACHINE_START(PCONTROL_G20, "PControl G20")
/* Maintainer: [email protected] */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = pcontrol_g20_init_early,
.init_irq = at91_init_irq_default,
.init_machine = pcontrol_g20_board_init,
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
index 566b30c..eada86d 100644
--- a/arch/arm/mach-at91/board-picotux200.c
+++ b/arch/arm/mach-at91/board-picotux200.c
@@ -121,7 +121,6 @@ MACHINE_START(PICOTUX2XX, "picotux 200")
/* Maintainer: Kleinhenz Elektronik GmbH */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = picotux200_init_early,
.init_irq = at91_init_irq_default,
.init_machine = picotux200_board_init,
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
index 0ae5eb1..19096a1 100644
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ b/arch/arm/mach-at91/board-qil-a9260.c
@@ -259,7 +259,6 @@ MACHINE_START(QIL_A9260, "CALAO QIL_A9260")
/* Maintainer: calao-systems */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
index 82f0335e..30b23cc 100644
--- a/arch/arm/mach-at91/board-rm9200dk.c
+++ b/arch/arm/mach-at91/board-rm9200dk.c
@@ -221,7 +221,6 @@ MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
/* Maintainer: SAN People/Atmel */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = dk_init_early,
.init_irq = at91_init_irq_default,
.init_machine = dk_board_init,
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
index 5e8a4f7..e31b069 100644
--- a/arch/arm/mach-at91/board-rm9200ek.c
+++ b/arch/arm/mach-at91/board-rm9200ek.c
@@ -188,7 +188,6 @@ MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
/* Maintainer: SAN People/Atmel */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
index e7d0a69..5fc429b 100644
--- a/arch/arm/mach-at91/board-rsi-ews.c
+++ b/arch/arm/mach-at91/board-rsi-ews.c
@@ -225,7 +225,6 @@ MACHINE_START(RSI_EWS, "RSI EWS")
/* Maintainer: Josef Holzmayr <[email protected]> */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = rsi_ews_init_early,
.init_irq = at91_init_irq_default,
.init_machine = rsi_ews_board_init,
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index 2e400cd..d2e1d70 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -220,7 +220,6 @@ MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")
/* Maintainer: Olimex */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index 66ee7ac..a7b2e65 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -345,7 +345,6 @@ MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 515957e..3971f1d 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -614,7 +614,6 @@ MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 1099272..3530eff 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -445,7 +445,6 @@ MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index 9fe718b..154f71e 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -411,7 +411,6 @@ MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
@@ -421,7 +420,6 @@ MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index 1846647..d87ffb5 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -504,7 +504,6 @@ MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 623f2d1..1a0737a 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -322,7 +322,6 @@ MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
/* Maintainer: Atmel */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
index 8fef38a..2c1cfeb 100644
--- a/arch/arm/mach-at91/board-snapper9260.c
+++ b/arch/arm/mach-at91/board-snapper9260.c
@@ -179,7 +179,6 @@ static void __init snapper9260_board_init(void)
MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module")
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = snapper9260_init_early,
.init_irq = at91_init_irq_default,
.init_machine = snapper9260_board_init,
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index 6bda942..9ded44b 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -275,7 +275,6 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20")
/* Maintainer: taskit GmbH */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = stamp9g20_init_early,
.init_irq = at91_init_irq_default,
.init_machine = portuxg20_board_init,
@@ -285,7 +284,6 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20")
/* Maintainer: taskit GmbH */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = stamp9g20_init_early,
.init_irq = at91_init_irq_default,
.init_machine = stamp9g20evb_board_init,
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
index cedbc66..b51978a 100644
--- a/arch/arm/mach-at91/board-usb-a926x.c
+++ b/arch/arm/mach-at91/board-usb-a926x.c
@@ -357,7 +357,6 @@ MACHINE_START(USB_A9263, "CALAO USB_A9263")
/* Maintainer: calao-systems */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
@@ -367,7 +366,6 @@ MACHINE_START(USB_A9260, "CALAO USB_A9260")
/* Maintainer: calao-systems */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
@@ -377,7 +375,6 @@ MACHINE_START(USB_A9G20, "CALAO USB_A92G0")
/* Maintainer: Jean-Christophe PLAGNIOL-VILLARD */
.init_time = at91sam926x_pit_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = ek_init_early,
.init_irq = at91_init_irq_default,
.init_machine = ek_board_init,
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index c61d8c9..874a6b7 100644
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -589,7 +589,6 @@ MACHINE_START(YL9200, "uCdragon YL-9200")
/* Maintainer: S.Birtles */
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
- .handle_irq = at91_aic_handle_irq,
.init_early = yl9200_init_early,
.init_irq = at91_init_irq_default,
.init_machine = yl9200_board_init,
diff --git a/arch/arm/mach-at91/include/mach/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
index eaea661..be8680d 100644
--- a/arch/arm/mach-at91/include/mach/at91_aic.h
+++ b/arch/arm/mach-at91/include/mach/at91_aic.h
@@ -93,7 +93,4 @@ extern void __iomem *at91_aic_base;
#define AT91_AIC_FFSR 0x148 /* Fast Forcing Status Register [SAM9 only] */
#define AT91_AIC5_FFSR 0x58 /* Fast Forcing Status Register [AIC5] */

-void at91_aic_handle_irq(struct pt_regs *regs);
-void at91_aic5_handle_irq(struct pt_regs *regs);
-
#endif
diff --git a/drivers/irqchip/irq-at91.c b/drivers/irqchip/irq-at91.c
index b45fe2c..d20053f 100644
--- a/drivers/irqchip/irq-at91.c
+++ b/drivers/irqchip/irq-at91.c
@@ -471,6 +471,8 @@ int __init at91_aic_of_init(struct device_node *node,

at91_aic_hw_init(n_irqs);

+ set_handle_irq(at91_aic_handle_irq);
+
return 0;
}
IRQCHIP_DECLARE(at91rm9200_aic, "atmel,at91rm9200-aic", at91_aic_of_init);
@@ -494,6 +496,8 @@ int __init at91_aic5_of_init(struct device_node *node,

at91_aic5_hw_init(n_irqs);

+ set_handle_irq(at91_aic5_handle_irq);
+
return 0;
}
IRQCHIP_DECLARE(sama5d3_aic, "atmel,sama5d3-aic", at91_aic5_of_init);
@@ -548,4 +552,6 @@ void __init at91_aic_init(unsigned int *priority, unsigned int ext_irq_mask)
}

at91_aic_hw_init(n_irqs);
+
+ set_handle_irq(at91_aic_handle_irq);
}
--
1.7.9.5

Subject: Re: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

On 11:05 Thu 23 May , Boris BREZILLON wrote:
> Move arch/arm/mach-at91/irq.c to drivers/irqchip/irq-at91.c.
> Move arch/arm/mach-at91/at91_aic.h to
> arch/arm/mach-at91/include/mach/at91_aic.h to avoid ugly reference
> to header file :
> #include "../../arch/arm/mach-at91/at91_aic.h"
no we are going to drop arch/arm/mach-at91/include/mach for multi support

arch/arm/mach-at91/include/mach is for removal

Best Regards,
J.
>
> Signed-off-by: Boris BREZILLON <[email protected]>
> ---
> arch/arm/mach-at91/Makefile | 2 +-
> arch/arm/mach-at91/at91rm9200.c | 2 +-
> arch/arm/mach-at91/at91sam9260.c | 2 +-
> arch/arm/mach-at91/at91sam9261.c | 2 +-
> arch/arm/mach-at91/at91sam9263.c | 2 +-
> arch/arm/mach-at91/at91sam9g45.c | 2 +-
> arch/arm/mach-at91/at91sam9rl.c | 2 +-
> arch/arm/mach-at91/at91x40.c | 2 +-
> arch/arm/mach-at91/board-1arm.c | 2 +-
> arch/arm/mach-at91/board-afeb-9260v1.c | 2 +-
> arch/arm/mach-at91/board-cam60.c | 2 +-
> arch/arm/mach-at91/board-carmeva.c | 2 +-
> arch/arm/mach-at91/board-cpu9krea.c | 2 +-
> arch/arm/mach-at91/board-cpuat91.c | 2 +-
> arch/arm/mach-at91/board-csb337.c | 2 +-
> arch/arm/mach-at91/board-csb637.c | 2 +-
> arch/arm/mach-at91/board-dt-rm9200.c | 3 ++-
> arch/arm/mach-at91/board-dt-sam9.c | 3 ++-
> arch/arm/mach-at91/board-dt-sama5.c | 3 ++-
> arch/arm/mach-at91/board-eb01.c | 3 ++-
> arch/arm/mach-at91/board-eb9200.c | 3 ++-
> arch/arm/mach-at91/board-ecbat91.c | 2 +-
> arch/arm/mach-at91/board-eco920.c | 2 +-
> arch/arm/mach-at91/board-flexibity.c | 2 +-
> arch/arm/mach-at91/board-foxg20.c | 2 +-
> arch/arm/mach-at91/board-gsia18s.c | 2 +-
> arch/arm/mach-at91/board-kafa.c | 2 +-
> arch/arm/mach-at91/board-kb9202.c | 2 +-
> arch/arm/mach-at91/board-pcontrol-g20.c | 2 +-
> arch/arm/mach-at91/board-picotux200.c | 2 +-
> arch/arm/mach-at91/board-qil-a9260.c | 2 +-
> arch/arm/mach-at91/board-rm9200dk.c | 2 +-
> arch/arm/mach-at91/board-rm9200ek.c | 2 +-
> arch/arm/mach-at91/board-rsi-ews.c | 3 ++-
> arch/arm/mach-at91/board-sam9-l9260.c | 2 +-
> arch/arm/mach-at91/board-sam9260ek.c | 2 +-
> arch/arm/mach-at91/board-sam9261ek.c | 2 +-
> arch/arm/mach-at91/board-sam9263ek.c | 2 +-
> arch/arm/mach-at91/board-sam9g20ek.c | 2 +-
> arch/arm/mach-at91/board-sam9m10g45ek.c | 2 +-
> arch/arm/mach-at91/board-sam9rlek.c | 2 +-
> arch/arm/mach-at91/board-snapper9260.c | 2 +-
> arch/arm/mach-at91/board-stamp9g20.c | 2 +-
> arch/arm/mach-at91/board-usb-a926x.c | 2 +-
> arch/arm/mach-at91/board-yl-9200.c | 2 +-
> arch/arm/mach-at91/{ => include/mach}/at91_aic.h | 0
> arch/arm/mach-at91/pm.c | 2 +-
> drivers/irqchip/Makefile | 1 +
> .../mach-at91/irq.c => drivers/irqchip/irq-at91.c | 2 +-
> 49 files changed, 54 insertions(+), 47 deletions(-)
>
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 788562d..5333701 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -2,7 +2,7 @@
> # Makefile for the linux kernel.
> #
>
> -obj-y := irq.o gpio.o setup.o
> +obj-y := gpio.o setup.o
> obj-m :=
> obj-n :=
> obj- :=
> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
> index d193a40..6c1204a 100644
> --- a/arch/arm/mach-at91/at91rm9200.c
> +++ b/arch/arm/mach-at91/at91rm9200.c
> @@ -20,8 +20,8 @@
> #include <mach/at91_pmc.h>
> #include <mach/at91_st.h>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "soc.h"
> #include "generic.h"
> #include "clock.h"
> diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
> index a8ce245..55332fa 100644
> --- a/arch/arm/mach-at91/at91sam9260.c
> +++ b/arch/arm/mach-at91/at91sam9260.c
> @@ -21,8 +21,8 @@
> #include <mach/at91_dbgu.h>
> #include <mach/at91sam9260.h>
> #include <mach/at91_pmc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_rstc.h"
> #include "soc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
> index 25efb5a..6db61e6 100644
> --- a/arch/arm/mach-at91/at91sam9261.c
> +++ b/arch/arm/mach-at91/at91sam9261.c
> @@ -20,8 +20,8 @@
> #include <mach/cpu.h>
> #include <mach/at91sam9261.h>
> #include <mach/at91_pmc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_rstc.h"
> #include "soc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
> index f44ffd2..b9ec043 100644
> --- a/arch/arm/mach-at91/at91sam9263.c
> +++ b/arch/arm/mach-at91/at91sam9263.c
> @@ -19,8 +19,8 @@
> #include <asm/system_misc.h>
> #include <mach/at91sam9263.h>
> #include <mach/at91_pmc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_rstc.h"
> #include "soc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
> index 8b7fce0..1270707 100644
> --- a/arch/arm/mach-at91/at91sam9g45.c
> +++ b/arch/arm/mach-at91/at91sam9g45.c
> @@ -20,8 +20,8 @@
> #include <mach/at91sam9g45.h>
> #include <mach/at91_pmc.h>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "soc.h"
> #include "generic.h"
> #include "clock.h"
> diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
> index f77fae5..d5f77d6 100644
> --- a/arch/arm/mach-at91/at91sam9rl.c
> +++ b/arch/arm/mach-at91/at91sam9rl.c
> @@ -20,8 +20,8 @@
> #include <mach/at91_dbgu.h>
> #include <mach/at91sam9rl.h>
> #include <mach/at91_pmc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_rstc.h"
> #include "soc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
> index 19ca793..e8b30fb 100644
> --- a/arch/arm/mach-at91/at91x40.c
> +++ b/arch/arm/mach-at91/at91x40.c
> @@ -20,8 +20,8 @@
> #include <mach/at91x40.h>
> #include <mach/at91_st.h>
> #include <mach/timex.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "generic.h"
>
> /*
> diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
> index 35ab632..8037dfe 100644
> --- a/arch/arm/mach-at91/board-1arm.c
> +++ b/arch/arm/mach-at91/board-1arm.c
> @@ -34,9 +34,9 @@
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
>
> +#include <mach/at91_aic.h>
> #include <mach/cpu.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
> index f95e31c..28bea23 100644
> --- a/arch/arm/mach-at91/board-afeb-9260v1.c
> +++ b/arch/arm/mach-at91/board-afeb-9260v1.c
> @@ -42,8 +42,8 @@
> #include <asm/mach/arch.h>
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
> index ade948b..6ebdf32 100644
> --- a/arch/arm/mach-at91/board-cam60.c
> +++ b/arch/arm/mach-at91/board-cam60.c
> @@ -39,8 +39,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
> index 9298305..842db49 100644
> --- a/arch/arm/mach-at91/board-carmeva.c
> +++ b/arch/arm/mach-at91/board-carmeva.c
> @@ -35,8 +35,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/hardware.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
> index 008527e..4714e9e 100644
> --- a/arch/arm/mach-at91/board-cpu9krea.c
> +++ b/arch/arm/mach-at91/board-cpu9krea.c
> @@ -43,8 +43,8 @@
> #include <mach/at91sam9_smc.h>
> #include <mach/at91sam9260_matrix.h>
> #include <mach/at91_matrix.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
> index 42f1353..c1663ed 100644
> --- a/arch/arm/mach-at91/board-cpuat91.c
> +++ b/arch/arm/mach-at91/board-cpuat91.c
> @@ -39,8 +39,8 @@
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
> index e5fde215..3231703 100644
> --- a/arch/arm/mach-at91/board-csb337.c
> +++ b/arch/arm/mach-at91/board-csb337.c
> @@ -38,8 +38,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/hardware.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
> index fdf1106..d58c7e6 100644
> --- a/arch/arm/mach-at91/board-csb637.c
> +++ b/arch/arm/mach-at91/board-csb637.c
> @@ -35,8 +35,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/hardware.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
> index 3fcb662..0c2a06d 100644
> --- a/arch/arm/mach-at91/board-dt-rm9200.c
> +++ b/arch/arm/mach-at91/board-dt-rm9200.c
> @@ -22,7 +22,8 @@
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
> +
> #include "generic.h"
>
>
> diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
> index 8db3013..ac899d8 100644
> --- a/arch/arm/mach-at91/board-dt-sam9.c
> +++ b/arch/arm/mach-at91/board-dt-sam9.c
> @@ -21,7 +21,8 @@
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
> +
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
> index 705305e..43b8f7a 100644
> --- a/arch/arm/mach-at91/board-dt-sama5.c
> +++ b/arch/arm/mach-at91/board-dt-sama5.c
> @@ -23,7 +23,8 @@
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
> +
> #include "generic.h"
>
>
> diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
> index becf0a6..4097ede 100644
> --- a/arch/arm/mach-at91/board-eb01.c
> +++ b/arch/arm/mach-at91/board-eb01.c
> @@ -28,7 +28,8 @@
> #include <asm/mach/arch.h>
> #include <asm/mach/map.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
> +
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
> index f9be816..afa5ebb 100644
> --- a/arch/arm/mach-at91/board-eb9200.c
> +++ b/arch/arm/mach-at91/board-eb9200.c
> @@ -35,7 +35,8 @@
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
> +
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
> index b2fcd71..c794768 100644
> --- a/arch/arm/mach-at91/board-ecbat91.c
> +++ b/arch/arm/mach-at91/board-ecbat91.c
> @@ -38,8 +38,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
> index 77de410..fc3e373 100644
> --- a/arch/arm/mach-at91/board-eco920.c
> +++ b/arch/arm/mach-at91/board-eco920.c
> @@ -27,8 +27,8 @@
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
> index 737c085..59a1958 100644
> --- a/arch/arm/mach-at91/board-flexibity.c
> +++ b/arch/arm/mach-at91/board-flexibity.c
> @@ -33,8 +33,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/hardware.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
> index c20a870..4b4df05 100644
> --- a/arch/arm/mach-at91/board-foxg20.c
> +++ b/arch/arm/mach-at91/board-foxg20.c
> @@ -42,8 +42,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
> index c1d61d2..1babcbd 100644
> --- a/arch/arm/mach-at91/board-gsia18s.c
> +++ b/arch/arm/mach-at91/board-gsia18s.c
> @@ -31,8 +31,8 @@
> #include <asm/mach/arch.h>
>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
> index 88e2f5d..aca52d3 100644
> --- a/arch/arm/mach-at91/board-kafa.c
> +++ b/arch/arm/mach-at91/board-kafa.c
> @@ -35,8 +35,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
> index 0c519d9..7768df0 100644
> --- a/arch/arm/mach-at91/board-kb9202.c
> +++ b/arch/arm/mach-at91/board-kb9202.c
> @@ -38,8 +38,8 @@
> #include <mach/cpu.h>
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
> index 65c0d6b..6df21db 100644
> --- a/arch/arm/mach-at91/board-pcontrol-g20.c
> +++ b/arch/arm/mach-at91/board-pcontrol-g20.c
> @@ -30,8 +30,8 @@
> #include <asm/mach/arch.h>
>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
> index ab2b2ec..566b30c 100644
> --- a/arch/arm/mach-at91/board-picotux200.c
> +++ b/arch/arm/mach-at91/board-picotux200.c
> @@ -39,8 +39,8 @@
>
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
> index aa3bc9b..0ae5eb1 100644
> --- a/arch/arm/mach-at91/board-qil-a9260.c
> +++ b/arch/arm/mach-at91/board-qil-a9260.c
> @@ -41,8 +41,8 @@
>
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
> index 690541b..82f0335e 100644
> --- a/arch/arm/mach-at91/board-rm9200dk.c
> +++ b/arch/arm/mach-at91/board-rm9200dk.c
> @@ -41,8 +41,8 @@
> #include <mach/hardware.h>
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
> index 8b17dad..5e8a4f7 100644
> --- a/arch/arm/mach-at91/board-rm9200ek.c
> +++ b/arch/arm/mach-at91/board-rm9200ek.c
> @@ -41,8 +41,8 @@
> #include <mach/hardware.h>
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
> index f6d7f19..e7d0a69 100644
> --- a/arch/arm/mach-at91/board-rsi-ews.c
> +++ b/arch/arm/mach-at91/board-rsi-ews.c
> @@ -28,7 +28,8 @@
>
> #include <linux/gpio.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
> +
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
> index 43ee4dc..2e400cd 100644
> --- a/arch/arm/mach-at91/board-sam9-l9260.c
> +++ b/arch/arm/mach-at91/board-sam9-l9260.c
> @@ -38,8 +38,8 @@
> #include <asm/mach/irq.h>
>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
> index 0b153c8..66ee7ac 100644
> --- a/arch/arm/mach-at91/board-sam9260ek.c
> +++ b/arch/arm/mach-at91/board-sam9260ek.c
> @@ -43,8 +43,8 @@
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> #include <mach/system_rev.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> index b446645..515957e 100644
> --- a/arch/arm/mach-at91/board-sam9261ek.c
> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> @@ -47,8 +47,8 @@
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> #include <mach/system_rev.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
> index 3284df0..1099272 100644
> --- a/arch/arm/mach-at91/board-sam9263ek.c
> +++ b/arch/arm/mach-at91/board-sam9263ek.c
> @@ -46,8 +46,8 @@
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> #include <mach/system_rev.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
> index f9cd1f2..9fe718b 100644
> --- a/arch/arm/mach-at91/board-sam9g20ek.c
> +++ b/arch/arm/mach-at91/board-sam9g20ek.c
> @@ -45,8 +45,8 @@
>
> #include <mach/at91sam9_smc.h>
> #include <mach/system_rev.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
> index 2a94896..1846647 100644
> --- a/arch/arm/mach-at91/board-sam9m10g45ek.c
> +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
> @@ -44,8 +44,8 @@
>
> #include <mach/at91sam9_smc.h>
> #include <mach/system_rev.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
> index aa265dc..623f2d1 100644
> --- a/arch/arm/mach-at91/board-sam9rlek.c
> +++ b/arch/arm/mach-at91/board-sam9rlek.c
> @@ -31,9 +31,9 @@
>
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
> index 3aaa978..8fef38a 100644
> --- a/arch/arm/mach-at91/board-snapper9260.c
> +++ b/arch/arm/mach-at91/board-snapper9260.c
> @@ -33,8 +33,8 @@
>
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
> index 869cbec..6bda942 100644
> --- a/arch/arm/mach-at91/board-stamp9g20.c
> +++ b/arch/arm/mach-at91/board-stamp9g20.c
> @@ -26,8 +26,8 @@
> #include <asm/mach/arch.h>
>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "sam9_smc.h"
> #include "generic.h"
> diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
> index 2487d94..cedbc66 100644
> --- a/arch/arm/mach-at91/board-usb-a926x.c
> +++ b/arch/arm/mach-at91/board-usb-a926x.c
> @@ -42,8 +42,8 @@
>
> #include <mach/hardware.h>
> #include <mach/at91sam9_smc.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "at91_shdwc.h"
> #include "board.h"
> #include "sam9_smc.h"
> diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
> index be08377..c61d8c9 100644
> --- a/arch/arm/mach-at91/board-yl-9200.c
> +++ b/arch/arm/mach-at91/board-yl-9200.c
> @@ -46,8 +46,8 @@
> #include <mach/at91rm9200_mc.h>
> #include <mach/at91_ramc.h>
> #include <mach/cpu.h>
> +#include <mach/at91_aic.h>
>
> -#include "at91_aic.h"
> #include "board.h"
> #include "generic.h"
>
> diff --git a/arch/arm/mach-at91/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
> similarity index 100%
> rename from arch/arm/mach-at91/at91_aic.h
> rename to arch/arm/mach-at91/include/mach/at91_aic.h
> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> index 530db30..d2a24e8 100644
> --- a/arch/arm/mach-at91/pm.c
> +++ b/arch/arm/mach-at91/pm.c
> @@ -26,9 +26,9 @@
> #include <asm/mach/irq.h>
>
> #include <mach/at91_pmc.h>
> +#include <mach/at91_aic.h>
> #include <mach/cpu.h>
>
> -#include "at91_aic.h"
> #include "generic.h"
> #include "pm.h"
>
> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> index cda4cb5..208b708 100644
> --- a/drivers/irqchip/Makefile
> +++ b/drivers/irqchip/Makefile
> @@ -1,5 +1,6 @@
> obj-$(CONFIG_IRQCHIP) += irqchip.o
>
> +obj-$(CONFIG_ARCH_AT91) += irq-at91.o
> obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
> obj-$(CONFIG_ARCH_EXYNOS) += exynos-combiner.o
> obj-$(CONFIG_ARCH_MVEBU) += irq-armada-370-xp.o
> diff --git a/arch/arm/mach-at91/irq.c b/drivers/irqchip/irq-at91.c
> similarity index 99%
> rename from arch/arm/mach-at91/irq.c
> rename to drivers/irqchip/irq-at91.c
> index e0ca591..daf2959 100644
> --- a/arch/arm/mach-at91/irq.c
> +++ b/drivers/irqchip/irq-at91.c
> @@ -42,7 +42,7 @@
> #include <asm/mach/irq.h>
> #include <asm/mach/map.h>
>
> -#include "at91_aic.h"
> +#include <mach/at91_aic.h>
>
> void __iomem *at91_aic_base;
> static struct irq_domain *at91_aic_domain;
> --
> 1.7.9.5
>

2013-05-23 10:19:00

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

On Thu, May 23, 2013 at 11:05:07AM +0200, Boris BREZILLON wrote:
> Move arch/arm/mach-at91/irq.c to drivers/irqchip/irq-at91.c.
> Move arch/arm/mach-at91/at91_aic.h to
> arch/arm/mach-at91/include/mach/at91_aic.h to avoid ugly reference
> to header file :
> #include "../../arch/arm/mach-at91/at91_aic.h"

The right way to do this is to move the definitions which should only
be used by arch/arm/mach-at91/irq.c to that file or a header file along
side that file, and find a place in include/linux for the remainder.

I notice arch/arm/mach-at91/pm.c makes use of some of the register
definitions:

at91_irq_suspend();

pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
/* remember all the always-wake irqs */
(at91_pmc_read(AT91_PMC_PCSR)
| (1 << AT91_ID_FIQ)
| (1 << AT91_ID_SYS)
| (at91_extern_irq))
& at91_aic_read(AT91_AIC_IMR),
state);

at91_irq_suspend() is in arch/arm/mach-at91/irq.c already, so there's no
reason that fragment can't be moved there.

That leaves: at91_aic_handle_irq, at91_aic5_handle_irq, NR_AIC_IRQS and
NR_AIC5_IRQS, which if you did patch 3 first, would leave you with just
the NR_.*_IRQS definitions to find a home for.

2013-05-23 12:13:51

by Thomas Petazzoni

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

Dear Russell King - ARM Linux,

On Thu, 23 May 2013 11:18:25 +0100, Russell King - ARM Linux wrote:

> I notice arch/arm/mach-at91/pm.c makes use of some of the register
> definitions:
>
> at91_irq_suspend();
>
> pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
> /* remember all the always-wake irqs */
> (at91_pmc_read(AT91_PMC_PCSR)
> | (1 << AT91_ID_FIQ)
> | (1 << AT91_ID_SYS)
> | (at91_extern_irq))
> & at91_aic_read(AT91_AIC_IMR),
> state);
>
> at91_irq_suspend() is in arch/arm/mach-at91/irq.c already, so there's no
> reason that fragment can't be moved there.

The problem is that the goal of the patch set is to move
arch/arm/mach-at91/irq.c into drivers/irqchip/.

However, if you move that chunk of code to drivers/irqchip/irq-at91.c,
you are using at91_pmc_read() which is defined in
arch/arm/mach-at91/include/mach/at91_pmc.h. So,
drivers/irqchip/irq-at91.c would have to include such an header file,
which is something we want to avoid since drivers/ code should not
include something in <mach/...>, as it breaks multiplatform kernels.

So, I'm afraid, simply moving this chunk of code in at91_irq_suspend()
doesn't make the thing any better.

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

2013-05-23 12:44:09

by Boris BREZILLON

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

On 23/05/2013 14:13, Thomas Petazzoni wrote:
> Dear Russell King - ARM Linux,
>
> On Thu, 23 May 2013 11:18:25 +0100, Russell King - ARM Linux wrote:
>
>> I notice arch/arm/mach-at91/pm.c makes use of some of the register
>> definitions:
>>
>> at91_irq_suspend();
>>
>> pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
>> /* remember all the always-wake irqs */
>> (at91_pmc_read(AT91_PMC_PCSR)
>> | (1 << AT91_ID_FIQ)
>> | (1 << AT91_ID_SYS)
>> | (at91_extern_irq))
>> & at91_aic_read(AT91_AIC_IMR),
>> state);
>>
>> at91_irq_suspend() is in arch/arm/mach-at91/irq.c already, so there's no
>> reason that fragment can't be moved there.
> The problem is that the goal of the patch set is to move
> arch/arm/mach-at91/irq.c into drivers/irqchip/.
>
> However, if you move that chunk of code to drivers/irqchip/irq-at91.c,
> you are using at91_pmc_read() which is defined in
> arch/arm/mach-at91/include/mach/at91_pmc.h. So,
> drivers/irqchip/irq-at91.c would have to include such an header file,
> which is something we want to avoid since drivers/ code should not
> include something in <mach/...>, as it breaks multiplatform kernels.
>
> So, I'm afraid, simply moving this chunk of code in at91_irq_suspend()
> doesn't make the thing any better.
What about keeping the former at91_aic.h in arch/arm/match-at91 and copy
the definitions we need in drivers/irqchip/irq-at91.c ?

This way we get an aic irqchip driver independant of any specific
machine headers and keep the non dt boards and pm drivers without any
change.
>
> Best regards,
>
> Thomas

2013-05-23 12:49:44

by Boris BREZILLON

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

On 23/05/2013 11:06, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 11:05 Thu 23 May , Boris BREZILLON wrote:
>> Move arch/arm/mach-at91/irq.c to drivers/irqchip/irq-at91.c.
>> Move arch/arm/mach-at91/at91_aic.h to
>> arch/arm/mach-at91/include/mach/at91_aic.h to avoid ugly reference
>> to header file :
>> #include "../../arch/arm/mach-at91/at91_aic.h"
> no we are going to drop arch/arm/mach-at91/include/mach for multi support
>
> arch/arm/mach-at91/include/mach is for removal
What should be done ?

include ../../arch/arm/mach-at91/at91_aic.h from irq-at91.c

or

move at91_aic.h into drivers/irqchips and patch every non dt board to
include ../../../drivers/irqchip/at91_aic.h

>
> Best Regards,
> J.
>> Signed-off-by: Boris BREZILLON <[email protected]>
>> ---
>> arch/arm/mach-at91/Makefile | 2 +-
>> arch/arm/mach-at91/at91rm9200.c | 2 +-
>> arch/arm/mach-at91/at91sam9260.c | 2 +-
>> arch/arm/mach-at91/at91sam9261.c | 2 +-
>> arch/arm/mach-at91/at91sam9263.c | 2 +-
>> arch/arm/mach-at91/at91sam9g45.c | 2 +-
>> arch/arm/mach-at91/at91sam9rl.c | 2 +-
>> arch/arm/mach-at91/at91x40.c | 2 +-
>> arch/arm/mach-at91/board-1arm.c | 2 +-
>> arch/arm/mach-at91/board-afeb-9260v1.c | 2 +-
>> arch/arm/mach-at91/board-cam60.c | 2 +-
>> arch/arm/mach-at91/board-carmeva.c | 2 +-
>> arch/arm/mach-at91/board-cpu9krea.c | 2 +-
>> arch/arm/mach-at91/board-cpuat91.c | 2 +-
>> arch/arm/mach-at91/board-csb337.c | 2 +-
>> arch/arm/mach-at91/board-csb637.c | 2 +-
>> arch/arm/mach-at91/board-dt-rm9200.c | 3 ++-
>> arch/arm/mach-at91/board-dt-sam9.c | 3 ++-
>> arch/arm/mach-at91/board-dt-sama5.c | 3 ++-
>> arch/arm/mach-at91/board-eb01.c | 3 ++-
>> arch/arm/mach-at91/board-eb9200.c | 3 ++-
>> arch/arm/mach-at91/board-ecbat91.c | 2 +-
>> arch/arm/mach-at91/board-eco920.c | 2 +-
>> arch/arm/mach-at91/board-flexibity.c | 2 +-
>> arch/arm/mach-at91/board-foxg20.c | 2 +-
>> arch/arm/mach-at91/board-gsia18s.c | 2 +-
>> arch/arm/mach-at91/board-kafa.c | 2 +-
>> arch/arm/mach-at91/board-kb9202.c | 2 +-
>> arch/arm/mach-at91/board-pcontrol-g20.c | 2 +-
>> arch/arm/mach-at91/board-picotux200.c | 2 +-
>> arch/arm/mach-at91/board-qil-a9260.c | 2 +-
>> arch/arm/mach-at91/board-rm9200dk.c | 2 +-
>> arch/arm/mach-at91/board-rm9200ek.c | 2 +-
>> arch/arm/mach-at91/board-rsi-ews.c | 3 ++-
>> arch/arm/mach-at91/board-sam9-l9260.c | 2 +-
>> arch/arm/mach-at91/board-sam9260ek.c | 2 +-
>> arch/arm/mach-at91/board-sam9261ek.c | 2 +-
>> arch/arm/mach-at91/board-sam9263ek.c | 2 +-
>> arch/arm/mach-at91/board-sam9g20ek.c | 2 +-
>> arch/arm/mach-at91/board-sam9m10g45ek.c | 2 +-
>> arch/arm/mach-at91/board-sam9rlek.c | 2 +-
>> arch/arm/mach-at91/board-snapper9260.c | 2 +-
>> arch/arm/mach-at91/board-stamp9g20.c | 2 +-
>> arch/arm/mach-at91/board-usb-a926x.c | 2 +-
>> arch/arm/mach-at91/board-yl-9200.c | 2 +-
>> arch/arm/mach-at91/{ => include/mach}/at91_aic.h | 0
>> arch/arm/mach-at91/pm.c | 2 +-
>> drivers/irqchip/Makefile | 1 +
>> .../mach-at91/irq.c => drivers/irqchip/irq-at91.c | 2 +-
>> 49 files changed, 54 insertions(+), 47 deletions(-)
>>
>> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
>> index 788562d..5333701 100644
>> --- a/arch/arm/mach-at91/Makefile
>> +++ b/arch/arm/mach-at91/Makefile
>> @@ -2,7 +2,7 @@
>> # Makefile for the linux kernel.
>> #
>>
>> -obj-y := irq.o gpio.o setup.o
>> +obj-y := gpio.o setup.o
>> obj-m :=
>> obj-n :=
>> obj- :=
>> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
>> index d193a40..6c1204a 100644
>> --- a/arch/arm/mach-at91/at91rm9200.c
>> +++ b/arch/arm/mach-at91/at91rm9200.c
>> @@ -20,8 +20,8 @@
>> #include <mach/at91_pmc.h>
>> #include <mach/at91_st.h>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "soc.h"
>> #include "generic.h"
>> #include "clock.h"
>> diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
>> index a8ce245..55332fa 100644
>> --- a/arch/arm/mach-at91/at91sam9260.c
>> +++ b/arch/arm/mach-at91/at91sam9260.c
>> @@ -21,8 +21,8 @@
>> #include <mach/at91_dbgu.h>
>> #include <mach/at91sam9260.h>
>> #include <mach/at91_pmc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_rstc.h"
>> #include "soc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
>> index 25efb5a..6db61e6 100644
>> --- a/arch/arm/mach-at91/at91sam9261.c
>> +++ b/arch/arm/mach-at91/at91sam9261.c
>> @@ -20,8 +20,8 @@
>> #include <mach/cpu.h>
>> #include <mach/at91sam9261.h>
>> #include <mach/at91_pmc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_rstc.h"
>> #include "soc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
>> index f44ffd2..b9ec043 100644
>> --- a/arch/arm/mach-at91/at91sam9263.c
>> +++ b/arch/arm/mach-at91/at91sam9263.c
>> @@ -19,8 +19,8 @@
>> #include <asm/system_misc.h>
>> #include <mach/at91sam9263.h>
>> #include <mach/at91_pmc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_rstc.h"
>> #include "soc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
>> index 8b7fce0..1270707 100644
>> --- a/arch/arm/mach-at91/at91sam9g45.c
>> +++ b/arch/arm/mach-at91/at91sam9g45.c
>> @@ -20,8 +20,8 @@
>> #include <mach/at91sam9g45.h>
>> #include <mach/at91_pmc.h>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "soc.h"
>> #include "generic.h"
>> #include "clock.h"
>> diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
>> index f77fae5..d5f77d6 100644
>> --- a/arch/arm/mach-at91/at91sam9rl.c
>> +++ b/arch/arm/mach-at91/at91sam9rl.c
>> @@ -20,8 +20,8 @@
>> #include <mach/at91_dbgu.h>
>> #include <mach/at91sam9rl.h>
>> #include <mach/at91_pmc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_rstc.h"
>> #include "soc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
>> index 19ca793..e8b30fb 100644
>> --- a/arch/arm/mach-at91/at91x40.c
>> +++ b/arch/arm/mach-at91/at91x40.c
>> @@ -20,8 +20,8 @@
>> #include <mach/at91x40.h>
>> #include <mach/at91_st.h>
>> #include <mach/timex.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "generic.h"
>>
>> /*
>> diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
>> index 35ab632..8037dfe 100644
>> --- a/arch/arm/mach-at91/board-1arm.c
>> +++ b/arch/arm/mach-at91/board-1arm.c
>> @@ -34,9 +34,9 @@
>> #include <asm/mach/map.h>
>> #include <asm/mach/irq.h>
>>
>> +#include <mach/at91_aic.h>
>> #include <mach/cpu.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
>> index f95e31c..28bea23 100644
>> --- a/arch/arm/mach-at91/board-afeb-9260v1.c
>> +++ b/arch/arm/mach-at91/board-afeb-9260v1.c
>> @@ -42,8 +42,8 @@
>> #include <asm/mach/arch.h>
>> #include <asm/mach/map.h>
>> #include <asm/mach/irq.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
>> index ade948b..6ebdf32 100644
>> --- a/arch/arm/mach-at91/board-cam60.c
>> +++ b/arch/arm/mach-at91/board-cam60.c
>> @@ -39,8 +39,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
>> index 9298305..842db49 100644
>> --- a/arch/arm/mach-at91/board-carmeva.c
>> +++ b/arch/arm/mach-at91/board-carmeva.c
>> @@ -35,8 +35,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/hardware.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
>> index 008527e..4714e9e 100644
>> --- a/arch/arm/mach-at91/board-cpu9krea.c
>> +++ b/arch/arm/mach-at91/board-cpu9krea.c
>> @@ -43,8 +43,8 @@
>> #include <mach/at91sam9_smc.h>
>> #include <mach/at91sam9260_matrix.h>
>> #include <mach/at91_matrix.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
>> index 42f1353..c1663ed 100644
>> --- a/arch/arm/mach-at91/board-cpuat91.c
>> +++ b/arch/arm/mach-at91/board-cpuat91.c
>> @@ -39,8 +39,8 @@
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
>> index e5fde215..3231703 100644
>> --- a/arch/arm/mach-at91/board-csb337.c
>> +++ b/arch/arm/mach-at91/board-csb337.c
>> @@ -38,8 +38,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/hardware.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
>> index fdf1106..d58c7e6 100644
>> --- a/arch/arm/mach-at91/board-csb637.c
>> +++ b/arch/arm/mach-at91/board-csb637.c
>> @@ -35,8 +35,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/hardware.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
>> index 3fcb662..0c2a06d 100644
>> --- a/arch/arm/mach-at91/board-dt-rm9200.c
>> +++ b/arch/arm/mach-at91/board-dt-rm9200.c
>> @@ -22,7 +22,8 @@
>> #include <asm/mach/map.h>
>> #include <asm/mach/irq.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>> +
>> #include "generic.h"
>>
>>
>> diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
>> index 8db3013..ac899d8 100644
>> --- a/arch/arm/mach-at91/board-dt-sam9.c
>> +++ b/arch/arm/mach-at91/board-dt-sam9.c
>> @@ -21,7 +21,8 @@
>> #include <asm/mach/map.h>
>> #include <asm/mach/irq.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>> +
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
>> index 705305e..43b8f7a 100644
>> --- a/arch/arm/mach-at91/board-dt-sama5.c
>> +++ b/arch/arm/mach-at91/board-dt-sama5.c
>> @@ -23,7 +23,8 @@
>> #include <asm/mach/map.h>
>> #include <asm/mach/irq.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>> +
>> #include "generic.h"
>>
>>
>> diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
>> index becf0a6..4097ede 100644
>> --- a/arch/arm/mach-at91/board-eb01.c
>> +++ b/arch/arm/mach-at91/board-eb01.c
>> @@ -28,7 +28,8 @@
>> #include <asm/mach/arch.h>
>> #include <asm/mach/map.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>> +
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
>> index f9be816..afa5ebb 100644
>> --- a/arch/arm/mach-at91/board-eb9200.c
>> +++ b/arch/arm/mach-at91/board-eb9200.c
>> @@ -35,7 +35,8 @@
>> #include <asm/mach/map.h>
>> #include <asm/mach/irq.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>> +
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
>> index b2fcd71..c794768 100644
>> --- a/arch/arm/mach-at91/board-ecbat91.c
>> +++ b/arch/arm/mach-at91/board-ecbat91.c
>> @@ -38,8 +38,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
>> index 77de410..fc3e373 100644
>> --- a/arch/arm/mach-at91/board-eco920.c
>> +++ b/arch/arm/mach-at91/board-eco920.c
>> @@ -27,8 +27,8 @@
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
>> index 737c085..59a1958 100644
>> --- a/arch/arm/mach-at91/board-flexibity.c
>> +++ b/arch/arm/mach-at91/board-flexibity.c
>> @@ -33,8 +33,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/hardware.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
>> index c20a870..4b4df05 100644
>> --- a/arch/arm/mach-at91/board-foxg20.c
>> +++ b/arch/arm/mach-at91/board-foxg20.c
>> @@ -42,8 +42,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
>> index c1d61d2..1babcbd 100644
>> --- a/arch/arm/mach-at91/board-gsia18s.c
>> +++ b/arch/arm/mach-at91/board-gsia18s.c
>> @@ -31,8 +31,8 @@
>> #include <asm/mach/arch.h>
>>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
>> index 88e2f5d..aca52d3 100644
>> --- a/arch/arm/mach-at91/board-kafa.c
>> +++ b/arch/arm/mach-at91/board-kafa.c
>> @@ -35,8 +35,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
>> index 0c519d9..7768df0 100644
>> --- a/arch/arm/mach-at91/board-kb9202.c
>> +++ b/arch/arm/mach-at91/board-kb9202.c
>> @@ -38,8 +38,8 @@
>> #include <mach/cpu.h>
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
>> index 65c0d6b..6df21db 100644
>> --- a/arch/arm/mach-at91/board-pcontrol-g20.c
>> +++ b/arch/arm/mach-at91/board-pcontrol-g20.c
>> @@ -30,8 +30,8 @@
>> #include <asm/mach/arch.h>
>>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
>> index ab2b2ec..566b30c 100644
>> --- a/arch/arm/mach-at91/board-picotux200.c
>> +++ b/arch/arm/mach-at91/board-picotux200.c
>> @@ -39,8 +39,8 @@
>>
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
>> index aa3bc9b..0ae5eb1 100644
>> --- a/arch/arm/mach-at91/board-qil-a9260.c
>> +++ b/arch/arm/mach-at91/board-qil-a9260.c
>> @@ -41,8 +41,8 @@
>>
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
>> index 690541b..82f0335e 100644
>> --- a/arch/arm/mach-at91/board-rm9200dk.c
>> +++ b/arch/arm/mach-at91/board-rm9200dk.c
>> @@ -41,8 +41,8 @@
>> #include <mach/hardware.h>
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
>> index 8b17dad..5e8a4f7 100644
>> --- a/arch/arm/mach-at91/board-rm9200ek.c
>> +++ b/arch/arm/mach-at91/board-rm9200ek.c
>> @@ -41,8 +41,8 @@
>> #include <mach/hardware.h>
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
>> index f6d7f19..e7d0a69 100644
>> --- a/arch/arm/mach-at91/board-rsi-ews.c
>> +++ b/arch/arm/mach-at91/board-rsi-ews.c
>> @@ -28,7 +28,8 @@
>>
>> #include <linux/gpio.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>> +
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
>> index 43ee4dc..2e400cd 100644
>> --- a/arch/arm/mach-at91/board-sam9-l9260.c
>> +++ b/arch/arm/mach-at91/board-sam9-l9260.c
>> @@ -38,8 +38,8 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
>> index 0b153c8..66ee7ac 100644
>> --- a/arch/arm/mach-at91/board-sam9260ek.c
>> +++ b/arch/arm/mach-at91/board-sam9260ek.c
>> @@ -43,8 +43,8 @@
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> #include <mach/system_rev.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
>> index b446645..515957e 100644
>> --- a/arch/arm/mach-at91/board-sam9261ek.c
>> +++ b/arch/arm/mach-at91/board-sam9261ek.c
>> @@ -47,8 +47,8 @@
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> #include <mach/system_rev.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
>> index 3284df0..1099272 100644
>> --- a/arch/arm/mach-at91/board-sam9263ek.c
>> +++ b/arch/arm/mach-at91/board-sam9263ek.c
>> @@ -46,8 +46,8 @@
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> #include <mach/system_rev.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
>> index f9cd1f2..9fe718b 100644
>> --- a/arch/arm/mach-at91/board-sam9g20ek.c
>> +++ b/arch/arm/mach-at91/board-sam9g20ek.c
>> @@ -45,8 +45,8 @@
>>
>> #include <mach/at91sam9_smc.h>
>> #include <mach/system_rev.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
>> index 2a94896..1846647 100644
>> --- a/arch/arm/mach-at91/board-sam9m10g45ek.c
>> +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
>> @@ -44,8 +44,8 @@
>>
>> #include <mach/at91sam9_smc.h>
>> #include <mach/system_rev.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
>> index aa265dc..623f2d1 100644
>> --- a/arch/arm/mach-at91/board-sam9rlek.c
>> +++ b/arch/arm/mach-at91/board-sam9rlek.c
>> @@ -31,9 +31,9 @@
>>
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
>> index 3aaa978..8fef38a 100644
>> --- a/arch/arm/mach-at91/board-snapper9260.c
>> +++ b/arch/arm/mach-at91/board-snapper9260.c
>> @@ -33,8 +33,8 @@
>>
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
>> index 869cbec..6bda942 100644
>> --- a/arch/arm/mach-at91/board-stamp9g20.c
>> +++ b/arch/arm/mach-at91/board-stamp9g20.c
>> @@ -26,8 +26,8 @@
>> #include <asm/mach/arch.h>
>>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> #include "generic.h"
>> diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
>> index 2487d94..cedbc66 100644
>> --- a/arch/arm/mach-at91/board-usb-a926x.c
>> +++ b/arch/arm/mach-at91/board-usb-a926x.c
>> @@ -42,8 +42,8 @@
>>
>> #include <mach/hardware.h>
>> #include <mach/at91sam9_smc.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "at91_shdwc.h"
>> #include "board.h"
>> #include "sam9_smc.h"
>> diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
>> index be08377..c61d8c9 100644
>> --- a/arch/arm/mach-at91/board-yl-9200.c
>> +++ b/arch/arm/mach-at91/board-yl-9200.c
>> @@ -46,8 +46,8 @@
>> #include <mach/at91rm9200_mc.h>
>> #include <mach/at91_ramc.h>
>> #include <mach/cpu.h>
>> +#include <mach/at91_aic.h>
>>
>> -#include "at91_aic.h"
>> #include "board.h"
>> #include "generic.h"
>>
>> diff --git a/arch/arm/mach-at91/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
>> similarity index 100%
>> rename from arch/arm/mach-at91/at91_aic.h
>> rename to arch/arm/mach-at91/include/mach/at91_aic.h
>> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
>> index 530db30..d2a24e8 100644
>> --- a/arch/arm/mach-at91/pm.c
>> +++ b/arch/arm/mach-at91/pm.c
>> @@ -26,9 +26,9 @@
>> #include <asm/mach/irq.h>
>>
>> #include <mach/at91_pmc.h>
>> +#include <mach/at91_aic.h>
>> #include <mach/cpu.h>
>>
>> -#include "at91_aic.h"
>> #include "generic.h"
>> #include "pm.h"
>>
>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>> index cda4cb5..208b708 100644
>> --- a/drivers/irqchip/Makefile
>> +++ b/drivers/irqchip/Makefile
>> @@ -1,5 +1,6 @@
>> obj-$(CONFIG_IRQCHIP) += irqchip.o
>>
>> +obj-$(CONFIG_ARCH_AT91) += irq-at91.o
>> obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
>> obj-$(CONFIG_ARCH_EXYNOS) += exynos-combiner.o
>> obj-$(CONFIG_ARCH_MVEBU) += irq-armada-370-xp.o
>> diff --git a/arch/arm/mach-at91/irq.c b/drivers/irqchip/irq-at91.c
>> similarity index 99%
>> rename from arch/arm/mach-at91/irq.c
>> rename to drivers/irqchip/irq-at91.c
>> index e0ca591..daf2959 100644
>> --- a/arch/arm/mach-at91/irq.c
>> +++ b/drivers/irqchip/irq-at91.c
>> @@ -42,7 +42,7 @@
>> #include <asm/mach/irq.h>
>> #include <asm/mach/map.h>
>>
>> -#include "at91_aic.h"
>> +#include <mach/at91_aic.h>
>>
>> void __iomem *at91_aic_base;
>> static struct irq_domain *at91_aic_domain;
>> --
>> 1.7.9.5
>>

Subject: Re: [PATCH 1/3] ARM: at91: move at91 aic driver to drivers/irqchip

On 11:18 Thu 23 May , Russell King - ARM Linux wrote:
> On Thu, May 23, 2013 at 11:05:07AM +0200, Boris BREZILLON wrote:
> > Move arch/arm/mach-at91/irq.c to drivers/irqchip/irq-at91.c.
> > Move arch/arm/mach-at91/at91_aic.h to
> > arch/arm/mach-at91/include/mach/at91_aic.h to avoid ugly reference
> > to header file :
> > #include "../../arch/arm/mach-at91/at91_aic.h"
>
> The right way to do this is to move the definitions which should only
> be used by arch/arm/mach-at91/irq.c to that file or a header file along
> side that file, and find a place in include/linux for the remainder.
>
> I notice arch/arm/mach-at91/pm.c makes use of some of the register
> definitions:
>
> at91_irq_suspend();
>
> pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
> /* remember all the always-wake irqs */
> (at91_pmc_read(AT91_PMC_PCSR)
> | (1 << AT91_ID_FIQ)
> | (1 << AT91_ID_SYS)
> | (at91_extern_irq))
> & at91_aic_read(AT91_AIC_IMR),
> state);
>
> at91_irq_suspend() is in arch/arm/mach-at91/irq.c already, so there's no
> reason that fragment can't be moved there.
>
> That leaves: at91_aic_handle_irq, at91_aic5_handle_irq, NR_AIC_IRQS and
> NR_AIC5_IRQS, which if you did patch 3 first, would leave you with just
> the NR_.*_IRQS definitions to find a home for.

Boris please update as this

Best Regards,
J.