at91: factorize at91 interrupts init to soc
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 23 Apr 2011 07:28:34 +0000 (15:28 +0800)
committerArnd Bergmann <arnd@arndb.de>
Thu, 28 Jul 2011 15:07:28 +0000 (15:07 +0000)
they are the same except the default priority

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
45 files changed:
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/board-1arm.c
arch/arm/mach-at91/board-afeb-9260v1.c
arch/arm/mach-at91/board-cam60.c
arch/arm/mach-at91/board-cap9adk.c
arch/arm/mach-at91/board-carmeva.c
arch/arm/mach-at91/board-cpu9krea.c
arch/arm/mach-at91/board-cpuat91.c
arch/arm/mach-at91/board-csb337.c
arch/arm/mach-at91/board-csb637.c
arch/arm/mach-at91/board-eb9200.c
arch/arm/mach-at91/board-ecbat91.c
arch/arm/mach-at91/board-eco920.c
arch/arm/mach-at91/board-flexibity.c
arch/arm/mach-at91/board-foxg20.c
arch/arm/mach-at91/board-gsia18s.c
arch/arm/mach-at91/board-kafa.c
arch/arm/mach-at91/board-kb9202.c
arch/arm/mach-at91/board-neocore926.c
arch/arm/mach-at91/board-pcontrol-g20.c
arch/arm/mach-at91/board-picotux200.c
arch/arm/mach-at91/board-qil-a9260.c
arch/arm/mach-at91/board-rm9200dk.c
arch/arm/mach-at91/board-rm9200ek.c
arch/arm/mach-at91/board-sam9-l9260.c
arch/arm/mach-at91/board-sam9260ek.c
arch/arm/mach-at91/board-sam9261ek.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-at91/board-sam9m10g45ek.c
arch/arm/mach-at91/board-sam9rlek.c
arch/arm/mach-at91/board-snapper9260.c
arch/arm/mach-at91/board-stamp9g20.c
arch/arm/mach-at91/board-usb-a9260.c
arch/arm/mach-at91/board-usb-a9263.c
arch/arm/mach-at91/board-yl-9200.c
arch/arm/mach-at91/generic.h
arch/arm/mach-at91/setup.c
arch/arm/mach-at91/soc.h

index 7ec9eeb64286ff6d9f990a9d2c7fc17d17f727ca..9a0137043780835eb81410b10ad60b9fc1d03efc 100644 (file)
@@ -403,19 +403,8 @@ static unsigned int at91cap9_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0,      /* Advanced Interrupt Controller (IRQ1) */
 };
 
-void __init at91cap9_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91cap9_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91cap9_soc = {
        .map_io = at91cap9_map_io,
+       .default_irq_priority = at91cap9_default_irq_priority,
        .init = at91cap9_initialize,
 };
index 489f4d90f274f236dc2f6cc0374b1b1218dcea37..d7801bed9afe16865c2abd52ee202bc29a78539a 100644 (file)
@@ -379,19 +379,8 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0       /* Advanced Interrupt Controller (IRQ6) */
 };
 
-void __init at91rm9200_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91rm9200_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91rm9200_soc = {
        .map_io = at91rm9200_map_io,
+       .default_irq_priority = at91rm9200_default_irq_priority,
        .init = at91rm9200_initialize,
 };
index 366c5d69393bbdd4e8acbbda94a22ffb7f5b0446..164873fa965fe6ac14910ece864b5f66dabf5274 100644 (file)
@@ -410,19 +410,8 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0,      /* Advanced Interrupt Controller */
 };
 
-void __init at91sam9260_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91sam9260_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91sam9260_soc = {
        .map_io = at91sam9260_map_io,
+       .default_irq_priority = at91sam9260_default_irq_priority,
        .init = at91sam9260_initialize,
 };
index a0081c081c32d8bef869fa0a26dbe96c87d010d7..7a4a673eedeb0ee26f8a8cc5bfbaeafbd202bf7d 100644 (file)
@@ -361,19 +361,8 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0,      /* Advanced Interrupt Controller */
 };
 
-void __init at91sam9261_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91sam9261_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91sam9261_soc = {
        .map_io = at91sam9261_map_io,
+       .default_irq_priority = at91sam9261_default_irq_priority,
        .init = at91sam9261_initialize,
 };
index 49f83dffd2aa6aab5627474d15cfc2985b163886..3140a13abc4a203b87ae254fa58b6875e270ad77 100644 (file)
@@ -372,19 +372,8 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0,      /* Advanced Interrupt Controller (IRQ1) */
 };
 
-void __init at91sam9263_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91sam9263_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91sam9263_soc = {
        .map_io = at91sam9263_map_io,
+       .default_irq_priority = at91sam9263_default_irq_priority,
        .init = at91sam9263_initialize,
 };
index 877c320fce2b4a0b45351062c616aa4e0d72172e..f5e72da65ce79ad4255352efa429129b6ce4fbdb 100644 (file)
@@ -388,19 +388,8 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0,      /* Advanced Interrupt Controller (IRQ0) */
 };
 
-void __init at91sam9g45_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91sam9g45_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91sam9g45_soc = {
        .map_io = at91sam9g45_map_io,
+       .default_irq_priority = at91sam9g45_default_irq_priority,
        .init = at91sam9g45_initialize,
 };
index 8ff7720b3e4a4b80ca627d005a2b5ae0591258d0..9c87bacd10f9dd1fb2c7afe3c934b6a05e55b47f 100644 (file)
@@ -359,19 +359,8 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = {
        0,      /* Advanced Interrupt Controller */
 };
 
-void __init at91sam9rl_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-{
-       if (!priority)
-               priority = at91sam9rl_default_irq_priority;
-
-       /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority);
-
-       /* Enable GPIO interrupts */
-       at91_gpio_irq_setup();
-}
-
 struct at91_soc __initdata at91sam9rl_soc = {
        .map_io = at91sam9rl_map_io,
+       .default_irq_priority = at91sam9rl_default_irq_priority,
        .init = at91sam9rl_initialize,
 };
index e588a9e15e7998dfb2b16562ab866b76727846a4..5aa58851eb394b43c1c0f972465e766d5bab4a38 100644 (file)
@@ -63,11 +63,6 @@ static void __init onearm_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init onearm_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata onearm_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 1,
@@ -99,6 +94,6 @@ MACHINE_START(ONEARM, "Ajeco 1ARM single board computer")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = onearm_init_early,
-       .init_irq       = onearm_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = onearm_board_init,
 MACHINE_END
index 7cd1cb2f01037680e03e9a12ce5f8f91efbd34d4..b0c796d42e495bf1158da2d19fda3c8cb0bf90dc 100644 (file)
@@ -70,12 +70,6 @@ static void __init afeb9260_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init afeb9260_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -221,7 +215,7 @@ MACHINE_START(AFEB9260, "Custom afeb9260 board")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = afeb9260_init_early,
-       .init_irq       = afeb9260_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = afeb9260_board_init,
 MACHINE_END
 
index bdc52e641e6dd13f8a7f9e15eea073e8ccb69c0a..d1abd5898e85bb53c8f48b9c703f393a9f86776c 100644 (file)
@@ -57,12 +57,6 @@ static void __init cam60_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init cam60_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host
  */
@@ -201,6 +195,6 @@ MACHINE_START(CAM60, "KwikByte CAM60")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = cam60_init_early,
-       .init_irq       = cam60_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = cam60_board_init,
 MACHINE_END
index d04a6a0f3dd8322dd573a2205d33d48350ee7462..679b0b743e9277d1e7994c314359f5db6a844603 100644 (file)
@@ -65,12 +65,6 @@ static void __init cap9adk_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init cap9adk_init_irq(void)
-{
-       at91cap9_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -399,6 +393,6 @@ MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = cap9adk_init_early,
-       .init_irq       = cap9adk_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = cap9adk_board_init,
 MACHINE_END
index 0a92b7a7c2178f450eb5b6ec35a9b57410ea392e..c578c5d9072887334e3a4e354de5d80b0fa18c8d 100644 (file)
@@ -57,11 +57,6 @@ static void __init carmeva_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init carmeva_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata carmeva_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 1,
@@ -165,6 +160,6 @@ MACHINE_START(CARMEVA, "Carmeva")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = carmeva_init_early,
-       .init_irq       = carmeva_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = carmeva_board_init,
 MACHINE_END
index 01128f9a0597046f0ff7e443dd86b85b990a07a6..f4da8a16d5dc14fa0c558bb2b66e2392a2d150e7 100644 (file)
@@ -81,11 +81,6 @@ static void __init cpu9krea_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init cpu9krea_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
 /*
  * USB Host port
  */
@@ -378,6 +373,6 @@ MACHINE_START(CPUAT9G20, "Eukrea CPU9G20")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = cpu9krea_init_early,
-       .init_irq       = cpu9krea_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = cpu9krea_board_init,
 MACHINE_END
index 0692606b9fee98230b443ef23634adde4d512b9a..2d919f5a4f571cfcfcf884c13d8a4465cfd88e02 100644 (file)
@@ -82,11 +82,6 @@ static void __init cpuat91_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init cpuat91_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata cpuat91_eth_data = {
        .is_rmii        = 1,
 };
@@ -182,6 +177,6 @@ MACHINE_START(CPUAT91, "Eukrea")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = cpuat91_init_early,
-       .init_irq       = cpuat91_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = cpuat91_board_init,
 MACHINE_END
index 923cccb7948da8ea58dcfd1d6cfb199a322b7f59..17654d5e94e6fd3aefe8055227246e9222878c3c 100644 (file)
@@ -58,11 +58,6 @@ static void __init csb337_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init csb337_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata csb337_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC2,
        .is_rmii        = 0,
@@ -260,6 +255,6 @@ MACHINE_START(CSB337, "Cogent CSB337")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = csb337_init_early,
-       .init_irq       = csb337_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = csb337_board_init,
 MACHINE_END
index 51131cad1abb718054a9ccf8c4fcfee188764766..72b55674616c30d0ab08b0f465e5fc891744d94c 100644 (file)
@@ -52,11 +52,6 @@ static void __init csb637_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init csb637_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata csb637_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC0,
        .is_rmii        = 0,
@@ -141,6 +136,6 @@ MACHINE_START(CSB637, "Cogent CSB637")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = csb637_init_early,
-       .init_irq       = csb637_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = csb637_board_init,
 MACHINE_END
index 705071cbd232b6184ef16bb9ced59bd49c3c8af1..01170a2766a82e5169b0ef35ae8dacc94867a9ae 100644 (file)
@@ -60,11 +60,6 @@ static void __init eb9200_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init eb9200_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata eb9200_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 1,
@@ -123,6 +118,6 @@ MACHINE_START(ATEB9200, "Embest ATEB9200")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = eb9200_init_early,
-       .init_irq       = eb9200_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = eb9200_board_init,
 MACHINE_END
index a9f106a2bd2c15f9a26e80f70beb6c7c7bda1a13..7c0313c51f2673f8491ebb97e681c1b21a2cef35 100644 (file)
@@ -64,11 +64,6 @@ static void __init ecb_at91init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ecb_at91init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata ecb_at91eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 0,
@@ -175,6 +170,6 @@ MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = ecb_at91init_early,
-       .init_irq       = ecb_at91init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ecb_at91board_init,
 MACHINE_END
index 8639fbde96694b6795c81aff939ce7bb81c086e6..8252c722607b978007efe922f4480052d1902019 100644 (file)
@@ -47,11 +47,6 @@ static void __init eco920_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init eco920_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata eco920_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC2,
        .is_rmii        = 1,
@@ -137,6 +132,6 @@ MACHINE_START(ECO920, "eco920")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = eco920_init_early,
-       .init_irq       = eco920_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = eco920_board_init,
 MACHINE_END
index f45583ed5a66b937774a63e181d58c8d8eeb49f7..4c3f65d9c59b6732bc403f3e33a1f837c009658b 100644 (file)
@@ -49,11 +49,6 @@ static void __init flexibity_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init flexibity_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
 /* USB Host port */
 static struct at91_usbh_data __initdata flexibity_usbh_data = {
        .ports          = 2,
@@ -157,6 +152,6 @@ MACHINE_START(FLEXIBITY, "Flexibity Connect")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = flexibity_init_early,
-       .init_irq       = flexibity_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = flexibity_board_init,
 MACHINE_END
index b78442b21361d10b135ddda25fd791ffa0851aff..f27d1a780cfa35ef815f6298519d69ea22105019 100644 (file)
@@ -101,12 +101,6 @@ static void __init foxg20_init_early(void)
 
 }
 
-static void __init foxg20_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -269,6 +263,6 @@ MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = foxg20_init_early,
-       .init_irq       = foxg20_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = foxg20_board_init,
 MACHINE_END
index 6588143461fdc4d02e1b0678e9b7fd721646ad02..2e95949737e69d91e6ca5f23fcfed44ac4325155 100644 (file)
@@ -75,11 +75,6 @@ static void __init gsia18s_init_early(void)
        at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
 }
 
-static void __init init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
 /*
  * Two USB Host ports
  */
@@ -579,6 +574,6 @@ MACHINE_START(GSIA18S, "GS_IA18_S")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = gsia18s_init_early,
-       .init_irq       = init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = gsia18s_board_init,
 MACHINE_END
index d26b960cf9c447f32f4386c90538b69c6852b99b..4a170890b3b1c9976036d4e527c91c9370550ac9 100644 (file)
@@ -61,11 +61,6 @@ static void __init kafa_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init kafa_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata kafa_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 0,
@@ -101,6 +96,6 @@ MACHINE_START(KAFA, "Sperry-Sun KAFA")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = kafa_init_early,
-       .init_irq       = kafa_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = kafa_board_init,
 MACHINE_END
index a4d8153024281500ff4758591263dd5105aa16d1..9dc8d496ead1bfa6c796c8fc445c23c76f944a28 100644 (file)
@@ -69,11 +69,6 @@ static void __init kb9202_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init kb9202_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata kb9202_eth_data = {
        .phy_irq_pin    = AT91_PIN_PB29,
        .is_rmii        = 0,
@@ -142,6 +137,6 @@ MACHINE_START(KB9200, "KB920x")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = kb9202_init_early,
-       .init_irq       = kb9202_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = kb9202_board_init,
 MACHINE_END
index 26a4c631baf4f5a5e923f60e30a8b77544c38f70..9bc6ab32e0acd2bb9b7d3f60ebd8c0a77d8980b3 100644 (file)
@@ -66,12 +66,6 @@ static void __init neocore926_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init neocore926_init_irq(void)
-{
-       at91sam9263_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -390,6 +384,6 @@ MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = neocore926_init_early,
-       .init_irq       = neocore926_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = neocore926_board_init,
 MACHINE_END
index 7651e7f936555279c1e6062ea0409a814b7c9691..49e3f699b48e1edff3d73921c178f4426b056896 100644 (file)
@@ -53,13 +53,6 @@ static void __init pcontrol_g20_init_early(void)
        at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
 }
 
-
-static void __init init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { {
        .ncs_read_setup         = 16,
        .nrd_setup              = 18,
@@ -225,6 +218,6 @@ MACHINE_START(PCONTROL_G20, "PControl G20")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = pcontrol_g20_init_early,
-       .init_irq       = init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = pcontrol_g20_board_init,
 MACHINE_END
index c7294f88abeed11e549d8ecf484091f417a37785..b7b8390e8a00b732f882fefd3b64673880de285d 100644 (file)
@@ -60,11 +60,6 @@ static void __init picotux200_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init picotux200_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata picotux200_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 1,
@@ -126,6 +121,6 @@ MACHINE_START(PICOTUX2XX, "picotux 200")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = picotux200_init_early,
-       .init_irq       = picotux200_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = picotux200_board_init,
 MACHINE_END
index 68e31a905c3ca26c556210d39f53fecf2aaea319..81f911033681004be055a80a84ded42874644af5 100644 (file)
@@ -72,12 +72,6 @@ static void __init ek_init_early(void)
 
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -271,6 +265,6 @@ MACHINE_START(QIL_A9260, "CALAO QIL_A9260")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index 97c6f211b11f0e1b88b7147bdd272e2b97502b1f..6f08faadb4742b8faef2de1f84e90cb5ca137454 100644 (file)
@@ -65,11 +65,6 @@ static void __init dk_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init dk_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata dk_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 1,
@@ -230,6 +225,6 @@ MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = dk_init_early,
-       .init_irq       = dk_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = dk_board_init,
 MACHINE_END
index 72aa8bfbfc50a297fd8e53863290a7c9e5276d40..85bcccd7b9e40118b7c8a72eb12c64609d38c287 100644 (file)
@@ -65,11 +65,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
 static struct at91_eth_data __initdata ek_eth_data = {
        .phy_irq_pin    = AT91_PIN_PC4,
        .is_rmii        = 1,
@@ -196,6 +191,6 @@ MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index 93c36bd95fd8579ba0e1cf03c9da0a290b544d39..4d3a02f1289e87fd9c025170240364d4ef2f7a44 100644 (file)
@@ -67,12 +67,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -215,6 +209,6 @@ MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index 044a40cdb222b1e26059698633e16372e8d87b0c..8a50c3e67186f1e8b8d4b0a962ab245aac6d51d6 100644 (file)
@@ -70,12 +70,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -356,6 +350,6 @@ MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index d8e0aa08009a2607375996323ae119bb959826f5..5096a0ec50c13c8a64ab041b064e960c5f4aa0d4 100644 (file)
@@ -69,12 +69,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9261_init_interrupts(NULL);
-}
-
-
 /*
  * DM9000 ethernet device
  */
@@ -623,6 +617,6 @@ MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index d72a30cba3643d8150e35de981fddf63d25a03c2..ea8f185d3b9d342b7cdcf19e1c8bff5e54af0574 100644 (file)
@@ -68,12 +68,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9263_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -454,6 +448,6 @@ MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index 98e026ad8b785c8e7ca6f9bcfb120f2501bc180a..817f59d7251bcc9dfc8ab9dbae37c18b85f840d2 100644 (file)
@@ -81,12 +81,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -406,7 +400,7 @@ MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
 
@@ -415,6 +409,6 @@ MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index 2df5d4140b155788e4dfe77560225d68303f98a7..ad234ccbf57e5214d8e0ebb0eec63a00fa80ef68 100644 (file)
@@ -63,12 +63,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9g45_init_interrupts(NULL);
-}
-
-
 /*
  * USB HS Host port (common to OHCI & EHCI)
  */
@@ -424,6 +418,6 @@ MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index defbca479c0e1e576edbd2ca60c646f1aee45f74..4f14b54b93a88278bef0ad5ab854d3bd497cce92 100644 (file)
@@ -53,12 +53,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9rl_init_interrupts(NULL);
-}
-
-
 /*
  * USB HS Device port
  */
@@ -332,6 +326,6 @@ MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index c600b1491e44df27a042a0efda9df0c302dfdd78..25cd3ffce1ee5ce2a6a0392ff1bbb6c20295a186 100644 (file)
@@ -55,11 +55,6 @@ static void __init snapper9260_init_early(void)
        at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
 }
 
-static void __init snapper9260_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
 static struct at91_usbh_data __initdata snapper9260_usbh_data = {
        .ports          = 2,
 };
@@ -181,7 +176,7 @@ MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = snapper9260_init_early,
-       .init_irq       = snapper9260_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = snapper9260_board_init,
 MACHINE_END
 
index e65efdaf9c4bb83b987852d1ba20a36620e5b157..936e5fd7f40696d6db2680fde276344a7e3950cb 100644 (file)
@@ -76,12 +76,6 @@ static void __init portuxg20_init_early(void)
        at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
 }
 
-static void __init init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * NAND flash
  */
@@ -301,7 +295,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = portuxg20_init_early,
-       .init_irq       = init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = portuxg20_board_init,
 MACHINE_END
 
@@ -310,6 +304,6 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = stamp9g20evb_init_early,
-       .init_irq       = init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = stamp9g20evb_board_init,
 MACHINE_END
index afc3b04d877b7f35ed1bd1f58d098c3a9c0ae76f..8c4c1a02c4bebb45e8b11bb22905a744975f0f75 100644 (file)
@@ -60,12 +60,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9260_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -231,6 +225,6 @@ MACHINE_START(USB_A9260, "CALAO USB_A9260")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index 25357e007a58da187d89bd69555b79a573f90349..25e793782a4e94c3ac49f9f9bc1c3a71a7c60d22 100644 (file)
@@ -59,12 +59,6 @@ static void __init ek_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init ek_init_irq(void)
-{
-       at91sam9263_init_interrupts(NULL);
-}
-
-
 /*
  * USB Host port
  */
@@ -247,6 +241,6 @@ MACHINE_START(USB_A9263, "CALAO USB_A9263")
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
        .init_early     = ek_init_early,
-       .init_irq       = ek_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = ek_board_init,
 MACHINE_END
index e8a8ab9d4ede688a55d786c1c6b558cfb79535fd..95edcbd2aec64c0107e8dab5ca233706af65ca76 100644 (file)
@@ -79,12 +79,6 @@ static void __init yl9200_init_early(void)
        at91_set_serial_console(0);
 }
 
-static void __init yl9200_init_irq(void)
-{
-       at91rm9200_init_interrupts(NULL);
-}
-
-
 /*
  * LEDs
  */
@@ -601,6 +595,6 @@ MACHINE_START(YL9200, "uCdragon YL-9200")
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
        .init_early     = yl9200_init_early,
-       .init_irq       = yl9200_init_irq,
+       .init_irq       = at91_init_irq_default,
        .init_machine   = yl9200_board_init,
 MACHINE_END
index 3e9af0df13f0aca990bd7759c07e58889afc738e..ce113900258efdd1a5fe761ac38160913146721b 100644 (file)
@@ -19,14 +19,9 @@ extern void __init at91_initialize(unsigned long main_clock);
 extern void __init at91x40_initialize(unsigned long main_clock);
 
  /* Interrupts */
-extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
-extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
-extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
-extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
-extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
-extern void __init at91sam9g45_init_interrupts(unsigned int priority[]);
+extern void __init at91_init_irq_default(void);
+extern void __init at91_init_interrupts(unsigned int priority[]);
 extern void __init at91x40_init_interrupts(unsigned int priority[]);
-extern void __init at91cap9_init_interrupts(unsigned int priority[]);
 extern void __init at91_aic_init(unsigned int priority[]);
 
  /* Timer */
index 096eb9805212fe866099cfeefc211ddb657b084f..8962d9a1a8f6528da1b7f4871c480ed89dff6288 100644 (file)
 
 struct at91_soc __initdata at91_boot_soc;
 
+void __init at91_init_irq_default(void)
+{
+       at91_init_interrupts(at91_boot_soc.default_irq_priority);
+}
+
+void __init at91_init_interrupts(unsigned int *priority)
+{
+       /* Initialize the AIC interrupt controller */
+       at91_aic_init(priority);
+
+       /* Enable GPIO interrupts */
+       at91_gpio_irq_setup();
+}
+
 static struct map_desc at91_io_desc __initdata = {
        .virtual        = AT91_VA_BASE_SYS,
        .pfn            = __phys_to_pfn(AT91_BASE_SYS),
index 6d7a18f5a48f5a6cb37f15b64dc36879bc93eeed..99afa7c90d656bf43a9c2414f8fc6c5704c3fc42 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 struct at91_soc {
+       unsigned int *default_irq_priority;
        void (*map_io)(void);
        void (*init)(unsigned long main_clock);
 };