summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/board-dt.c
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-02-14 18:08:14 +0100
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-03-01 13:29:03 +0100
commit8014d6f4dd074d4d248d3de7f63348fa2568476b (patch)
tree7803070e93c4955e7b37eb4f4e81e4d1411aeb98 /arch/arm/mach-at91/board-dt.c
parent34bc485ca143c4773fc2afbbeb41e50f86445d0d (diff)
ARM: at91: AIC and GPIO IRQ device tree initialization
Both AIC and GPIO controllers are now using the standard of_irq_init() function to initialize IRQs in case of DT use. The DT specific initialization functions are now separated from the non-DT case and are now using "linear" irq domains. The .map() irqdomain operation is responsible for positioning the IRQ handlers. In AIC case, the Linux IRQ number is directly programmed in the hardware to avoid an additional reverse mapping operation. The AIC position its irq domain as the "default" irq domain. For DT case, the priority is not yet filled in the SMR. It will be the subject of another patch. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/board-dt.c')
-rw-r--r--arch/arm/mach-at91/board-dt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index 96d9a21dab68..acbe23c5b260 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -15,6 +15,8 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/gpio.h>
+#include <linux/of.h>
+#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <mach/hardware.h>
@@ -80,9 +82,16 @@ static void __init ek_add_device_nand(void)
at91_add_device_nand(&ek_nand_data);
}
+static const struct of_device_id irq_of_match[] __initconst = {
+
+ { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
+ { .compatible = "atmel,at91rm9200-gpio", .data = at91_gpio_of_irq_setup },
+ { /*sentinel*/ }
+};
+
static void __init at91_dt_init_irq(void)
{
- at91_init_irq_default();
+ of_irq_init(irq_of_match);
}
static void __init at91_dt_device_init(void)