aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-04-09 19:36:36 +0800
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-07-02 14:26:58 +0200
commitc65739437045c351a2a0ddb834719b9d616d4d47 (patch)
tree826ed94708ffb268b978dfe65c7d3b8fe2d29832 /arch/arm
parent42a859daaf6af4d234fcf964a421666d5cca3f6a (diff)
ARM: at91: aic add dt support for external irqs
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/dts/at91sam9260.dtsi1
-rw-r--r--arch/arm/boot/dts/at91sam9263.dtsi1
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi1
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi1
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c2
-rw-r--r--arch/arm/mach-at91/irq.c12
6 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index f449efc9825..f2c96430f9c 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -56,6 +56,7 @@
compatible = "atmel,at91rm9200-aic";
interrupt-controller;
reg = <0xfffff000 0x200>;
+ atmel,external-irqs = <29 30 31>;
};
ramc0: ramc@ffffea00 {
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index 0209913a65a..c803636ca9f 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -52,6 +52,7 @@
compatible = "atmel,at91rm9200-aic";
interrupt-controller;
reg = <0xfffff000 0x200>;
+ atmel,external-irqs = <30 31>;
};
pmc: pmc@fffffc00 {
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 7dbccaf199f..2d01ce2a023 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -57,6 +57,7 @@
compatible = "atmel,at91rm9200-aic";
interrupt-controller;
reg = <0xfffff000 0x200>;
+ atmel,external-irqs = <31>;
};
ramc0: ramc@ffffe400 {
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 6b3ef4339ae..6a0a0fbb628 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -55,6 +55,7 @@
compatible = "atmel,at91rm9200-aic";
interrupt-controller;
reg = <0xfffff000 0x200>;
+ atmel,external-irqs = <31>;
};
ramc0: ramc@ffffe800 {
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index 1b144b4d3ce..537710b6898 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -312,8 +312,6 @@ static void __init at91sam9x5_map_io(void)
void __init at91sam9x5_initialize(void)
{
- at91_extern_irq = (1 << AT91SAM9X5_ID_IRQ0);
-
/* Register GPIO subsystem (using DT) */
at91_gpio_init(NULL, 0);
}
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index 2d5d4c88a52..df8605fd7ba 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -194,6 +194,10 @@ static struct irq_domain_ops at91_aic_irq_ops = {
int __init at91_aic_of_init(struct device_node *node,
struct device_node *parent)
{
+ struct property *prop;
+ const __be32 *p;
+ u32 val;
+
at91_aic_base = of_iomap(node, 0);
at91_aic_np = node;
@@ -202,6 +206,14 @@ int __init at91_aic_of_init(struct device_node *node,
if (!at91_aic_domain)
panic("Unable to add AIC irq domain (DT)\n");
+ at91_extern_irq = 0;
+ of_property_for_each_u32(node, "atmel,external-irqs", prop, p, val) {
+ if (val > 31)
+ pr_warn("AIC: external irq %d > 31 skip it\n", val);
+ else
+ at91_extern_irq |= (1 << val);
+ }
+
irq_set_default_host(at91_aic_domain);
at91_aic_hw_init(NR_AIC_IRQS);