diff mbox

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

Message ID 1369299909-10078-2-git-send-email-b.brezillon@overkiz.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris BREZILLON May 23, 2013, 9:05 a.m. UTC
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 <b.brezillon@overkiz.com>
---
 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(-)

Comments

Jean-Christophe PLAGNIOL-VILLARD May 23, 2013, 9:06 a.m. UTC | #1
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 <b.brezillon@overkiz.com>
> ---
>  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
>
Boris BREZILLON May 23, 2013, 9:51 a.m. UTC | #2
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 <b.brezillon@overkiz.com>
>> ---
>>   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
>>
Thomas Petazzoni May 23, 2013, 10:09 a.m. UTC | #3
Dear boris brezillon,

On Thu, 23 May 2013 11:51:36 +0200, boris brezillon wrote:
> 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

You can put it in <linux/irqchip/at91-aic.h>, there are already a few
headers there. But I think it's not the right solution.

*However*, ideally, this header should disappear completely. All the
register defines should go directly into the driver C file. The only
usage of the AIC defines outside of the IRQ driver are for debug prints
in the pm.c code, which I think you could get rid of.

Ditto for the at91_aic_{read,write} macros.

The NR_AIC5_IRQS can also move to the driver itself.

The only remaining one would be NR_AIC_IRQS, you can't get rid of it,
because it's used for the IRQ priority arrays. But I believe keeping
this one in <linux/irqchip/at91-aic.h> is reasonable.

Best regards,

Thomas
Jean-Christophe PLAGNIOL-VILLARD May 23, 2013, 10:09 a.m. UTC | #4
On 12:09 Thu 23 May     , Thomas Petazzoni wrote:
> Dear boris brezillon,
> 
> On Thu, 23 May 2013 11:51:36 +0200, boris brezillon wrote:
> > 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
> 
> You can put it in <linux/irqchip/at91-aic.h>, there are already a few
> headers there. But I think it's not the right solution.
> 
> *However*, ideally, this header should disappear completely. All the
> register defines should go directly into the driver C file. The only
> usage of the AIC defines outside of the IRQ driver are for debug prints
> in the pm.c code, which I think you could get rid of.
> 
> Ditto for the at91_aic_{read,write} macros.
> 
> The NR_AIC5_IRQS can also move to the driver itself.
> 
> The only remaining one would be NR_AIC_IRQS, you can't get rid of it,
> because it's used for the IRQ priority arrays. But I believe keeping
> this one in <linux/irqchip/at91-aic.h> is reasonable.

do want either as we expose the register acces for pm & co

until this is cleanup NACK

Best Regards,
J.
Russell King - ARM Linux May 23, 2013, 10:18 a.m. UTC | #5
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.
Thomas Petazzoni May 23, 2013, 10:20 a.m. UTC | #6
Dear Jean-Christophe PLAGNIOL-VILLARD,

On Thu, 23 May 2013 12:09:51 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:

> > You can put it in <linux/irqchip/at91-aic.h>, there are already a few
> > headers there. But I think it's not the right solution.
> > 
> > *However*, ideally, this header should disappear completely. All the
> > register defines should go directly into the driver C file. The only
> > usage of the AIC defines outside of the IRQ driver are for debug prints
> > in the pm.c code, which I think you could get rid of.
> > 
> > Ditto for the at91_aic_{read,write} macros.
> > 
> > The NR_AIC5_IRQS can also move to the driver itself.
> > 
> > The only remaining one would be NR_AIC_IRQS, you can't get rid of it,
> > because it's used for the IRQ priority arrays. But I believe keeping
> > this one in <linux/irqchip/at91-aic.h> is reasonable.
> 
> do want either as we expose the register acces for pm & co

Did you read what I write? In arch/arm/mach-at91/pm.c, the only
accesses made to the AIC registers are for pr_debug() calls, i.e only
to print some debugging messages. I believe those ones can simply be
removed to decouple the pm.c code from the irq.c code.

> until this is cleanup NACK

Is this really the way we want to welcome contributions in the kernel
community?

Boris, what you'd have to do is just do a few preparations patches
in your patch set. Something like:

 * PATCH 1: remove usage of AIC registers for debug messages in pm.c
 * PATCH 2: move all of at91_aic.h in irq.c, except NR_AIC_IRQS
 * PATCH 3: move irq.c to drivers/irqchip/, and at91_aic.h to
   include/linux/irqchip/, and adjust what's necessary
 * and then your other patches.

Best regards,

Thomas
Jean-Christophe PLAGNIOL-VILLARD May 23, 2013, 10:26 a.m. UTC | #7
On 12:20 Thu 23 May     , Thomas Petazzoni wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> On Thu, 23 May 2013 12:09:51 +0200, Jean-Christophe PLAGNIOL-VILLARD
> wrote:
> 
> > > You can put it in <linux/irqchip/at91-aic.h>, there are already a few
> > > headers there. But I think it's not the right solution.
> > > 
> > > *However*, ideally, this header should disappear completely. All the
> > > register defines should go directly into the driver C file. The only
> > > usage of the AIC defines outside of the IRQ driver are for debug prints
> > > in the pm.c code, which I think you could get rid of.
> > > 
> > > Ditto for the at91_aic_{read,write} macros.
> > > 
> > > The NR_AIC5_IRQS can also move to the driver itself.
> > > 
> > > The only remaining one would be NR_AIC_IRQS, you can't get rid of it,
> > > because it's used for the IRQ priority arrays. But I believe keeping
> > > this one in <linux/irqchip/at91-aic.h> is reasonable.
> > 
> > do want either as we expose the register acces for pm & co
> 
> Did you read what I write? In arch/arm/mach-at91/pm.c, the only
> accesses made to the AIC registers are for pr_debug() calls, i.e only
> to print some debugging messages. I believe those ones can simply be
> removed to decouple the pm.c code from the irq.c code.

yes I read and yes I do not want to move code before we do cleanup MANDATORY

unclean code in mach-at91 is fine this is legacy, move them arround NACK

we cleanup first
> 
> > until this is cleanup NACK
> 
> Is this really the way we want to welcome contributions in the kernel
> community?
> 
> Boris, what you'd have to do is just do a few preparations patches
> in your patch set. Something like:
> 
>  * PATCH 1: remove usage of AIC registers for debug messages in pm.c
NACK I do want this debug, very usefull to debug pm

Best Regards,
J.
>  * PATCH 2: move all of at91_aic.h in irq.c, except NR_AIC_IRQS
>  * PATCH 3: move irq.c to drivers/irqchip/, and at91_aic.h to
>    include/linux/irqchip/, and adjust what's necessary
>  * and then your other patches.
> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
Thomas Petazzoni May 23, 2013, 11:22 a.m. UTC | #8
Dear Jean-Christophe PLAGNIOL-VILLARD,

On Thu, 23 May 2013 12:26:01 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:

> > Did you read what I write? In arch/arm/mach-at91/pm.c, the only
> > accesses made to the AIC registers are for pr_debug() calls, i.e only
> > to print some debugging messages. I believe those ones can simply be
> > removed to decouple the pm.c code from the irq.c code.
> 
> yes I read and yes I do not want to move code before we do cleanup MANDATORY

Then please explain to our volunteer contributor what sort of cleanup
is required. Simply NACKing without offering any insight as to how
things should be done is completely useless, counter-productive, and a
complete abuse of a maintainer's power over contributors.

> >  * PATCH 1: remove usage of AIC registers for debug messages in pm.c
> NACK I do want this debug, very usefull to debug pm

For the cases where you need to debug this stuff, you can always re-add
some instrumentation in this code to dump whatever you want.

Or, alternatively, we can make the irqchip driver show using
pr_debug() the value of IMR in its ->suspend() hook, the value of IMR &
IPR in its ->resume() hook, and the pm.c code can show the PMC_PCSR on
suspend. This way, you have all the informations you need for debugging.

Having the PM driver and the irqchip driver step on each other register
areas is anyway a bad idea, especially when the only reason to do so is
for two debugging messages that can be implemented differently.

Notice that this solution can always be improved later on if needed,
with further cleanups from you.

But please stop rejecting valid patches from contributors, just because
the code is not coming from you. What Boris is proposing is perfectly
fine, just needs a little bit more work to sort out the header
problems as we discussed, and is a good step in the right direction. And
this step in the right direction doesn't prevent anyone else, including
you, to provide additional patches to move even further in the right
direction.

It would be good if the other AT91 maintainers could raise their voice
here, so that Boris knows whether it is worthwhile doing additional
revisions of this patch set.

Best regards,

Thomas
Jean-Christophe PLAGNIOL-VILLARD May 23, 2013, 11:58 a.m. UTC | #9
On 13:22 Thu 23 May     , Thomas Petazzoni wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> On Thu, 23 May 2013 12:26:01 +0200, Jean-Christophe PLAGNIOL-VILLARD
> wrote:
> 
> > > Did you read what I write? In arch/arm/mach-at91/pm.c, the only
> > > accesses made to the AIC registers are for pr_debug() calls, i.e only
> > > to print some debugging messages. I believe those ones can simply be
> > > removed to decouple the pm.c code from the irq.c code.
> > 
> > yes I read and yes I do not want to move code before we do cleanup MANDATORY
> 
> Then please explain to our volunteer contributor what sort of cleanup
> is required. Simply NACKing without offering any insight as to how
> things should be done is completely useless, counter-productive, and a
> complete abuse of a maintainer's power over contributors.
> 
> > >  * PATCH 1: remove usage of AIC registers for debug messages in pm.c
> > NACK I do want this debug, very usefull to debug pm
> 
> For the cases where you need to debug this stuff, you can always re-add
> some instrumentation in this code to dump whatever you want.
> 
> Or, alternatively, we can make the irqchip driver show using
> pr_debug() the value of IMR in its ->suspend() hook, the value of IMR &
> IPR in its ->resume() hook, and the pm.c code can show the PMC_PCSR on
> suspend. This way, you have all the informations you need for debugging.

if you read the code as you said both of them are link PMC & AIC so you can
not hope to split it as both of the IP contain part of the information

so no I want the information right where it's
> 
> Having the PM driver and the irqchip driver step on each other register
> areas is anyway a bad idea, especially when the only reason to do so is
> for two debugging messages that can be implemented differently.

> 
> Notice that this solution can always be improved later on if needed,
> with further cleanups from you.
> 
> But please stop rejecting valid patches from contributors, just because
> the code is not coming from you. What Boris is proposing is perfectly
so If I read you non clean code can come mainline, wow this not the way to
work. If for you do half clean is enough to go mainline. You really need to
change your way of working.

Best Regards,
J.
Jean-Christophe PLAGNIOL-VILLARD May 23, 2013, 11:59 a.m. UTC | #10
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.
Thomas Petazzoni May 23, 2013, 12:09 p.m. UTC | #11
Dear Jean-Christophe PLAGNIOL-VILLARD,

On Thu, 23 May 2013 13:58:45 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:

> > Or, alternatively, we can make the irqchip driver show using
> > pr_debug() the value of IMR in its ->suspend() hook, the value of IMR &
> > IPR in its ->resume() hook, and the pm.c code can show the PMC_PCSR on
> > suspend. This way, you have all the informations you need for debugging.
> 
> if you read the code as you said both of them are link PMC & AIC so you can
> not hope to split it as both of the IP contain part of the information
> 
> so no I want the information right where it's

Sorry, but that seems like a completely unreasonable requirement,
provided that it makes the PM code poke into a completely unrelated IP,
just for the sake of one debug message.

> > Having the PM driver and the irqchip driver step on each other register
> > areas is anyway a bad idea, especially when the only reason to do so is
> > for two debugging messages that can be implemented differently.
> 
> > 
> > Notice that this solution can always be improved later on if needed,
> > with further cleanups from you.
> > 
> > But please stop rejecting valid patches from contributors, just because
> > the code is not coming from you. What Boris is proposing is perfectly
> so If I read you non clean code can come mainline, wow this not the way to
> work. If for you do half clean is enough to go mainline. You really need to
> change your way of working.

Boris patches are far from being half-clean. To me, they look perfectly
sane, and are going in the right direction. Again, please stop
rejecting contributions from third-parties just because you're not the
author of such contributions.

It's you who said that they are not clean, but you still haven't given
the slightest explanation to justify that. Until a proper justification
is given, that points to specific, identifiable, and reasonable
problems in the patches, there is absolutely no reason not to consider
Boris patches as acceptable (once the header problem is fixed, of
course).

Best regards,

Thomas
Thomas Petazzoni May 23, 2013, 12:13 p.m. UTC | #12
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
Boris BREZILLON May 23, 2013, 12:42 p.m. UTC | #13
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
>
Boris BREZILLON May 23, 2013, 12:44 p.m. UTC | #14
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
Nicolas Ferre May 23, 2013, 1 p.m. UTC | #15
On 23/05/2013 13:22, Thomas Petazzoni :
> Dear Jean-Christophe PLAGNIOL-VILLARD,

[..]

> It would be good if the other AT91 maintainers could raise their voice
> here, so that Boris knows whether it is worthwhile doing additional
> revisions of this patch set.

Guys, I do not like the role that I am forced to play...

Anyway, Boris I do like the intention of this patch series and be sure 
that we will integrate it as soon as it is ready.

Bye,
diff mbox

Patch

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;