Merge tag 'at91-for-next-soc' of git://github.com/at91linux/linux-at91 into at91/mci
[linux-2.6-block.git] / arch / arm / mach-at91 / board-kb9202.c
index 1fa6010ca50411358660a5833f333d5f46d87683..abe9fed7a3e087b8fc1abe16d0c3731f702e665b 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <mach/board.h>
 #include <mach/cpu.h>
+#include <mach/at91_aic.h>
 #include <mach/at91rm9200_mc.h>
 #include <mach/at91_ramc.h>
 
@@ -95,11 +96,26 @@ static struct atmel_nand_data __initdata kb9202_nand_data = {
        .num_parts      = ARRAY_SIZE(kb9202_nand_partition),
 };
 
+/*
+ * LEDs
+ */
+static struct gpio_led kb9202_leds[] = {
+       {       /* D1 */
+               .name                   = "led1",
+               .gpio                   = AT91_PIN_PC19,
+               .active_low             = 1,
+               .default_trigger        = "heartbeat",
+       },
+       {       /* D2 */
+               .name                   = "led2",
+               .gpio                   = AT91_PIN_PC18,
+               .active_low             = 1,
+               .default_trigger        = "timer",
+       }
+};
+
 static void __init kb9202_board_init(void)
 {
-       /* Set up the LEDs */
-       at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
-
        /* Serial */
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -127,12 +143,15 @@ static void __init kb9202_board_init(void)
        at91_add_device_spi(NULL, 0);
        /* NAND */
        at91_add_device_nand(&kb9202_nand_data);
+       /* LEDs */
+       at91_gpio_leds(kb9202_leds, ARRAY_SIZE(kb9202_leds));
 }
 
 MACHINE_START(KB9200, "KB920x")
        /* Maintainer: KwikByte, Inc. */
        .timer          = &at91rm9200_timer,
        .map_io         = at91_map_io,
+       .handle_irq     = at91_aic_handle_irq,
        .init_early     = kb9202_init_early,
        .init_irq       = at91_init_irq_default,
        .init_machine   = kb9202_board_init,