aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-09 12:13:25 +0000
committerJohn Crispin <john@openwrt.org>2015-02-09 12:13:25 +0000
commit826b461427fa2abe634e652a05dfc86fc8a6c609 (patch)
tree3df60f7e8fb951cd8e5b2a3d19c626d5a611b950 /target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch
parent64f9626963cf3abf7550df706e42973f4c0221f4 (diff)
downloadupstream-826b461427fa2abe634e652a05dfc86fc8a6c609.tar.gz
upstream-826b461427fa2abe634e652a05dfc86fc8a6c609.tar.bz2
upstream-826b461427fa2abe634e652a05dfc86fc8a6c609.zip
lantiq: add 3.18 support
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 44348
Diffstat (limited to 'target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch')
-rw-r--r--target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch b/target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch
new file mode 100644
index 0000000000..32e4ab89d9
--- /dev/null
+++ b/target/linux/lantiq/patches-3.18/0037-MIPS-lantiq-move-eiu-init-after-irq_domain-register.patch
@@ -0,0 +1,74 @@
+From baea71233ed1796651cab6ead484a18666a765aa Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Thu, 11 Sep 2014 19:25:25 +0200
+Subject: [PATCH] MIPS: lantiq: move eiu init after irq_domain register
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ arch/mips/lantiq/irq.c | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+--- a/arch/mips/lantiq/irq.c
++++ b/arch/mips/lantiq/irq.c
+@@ -380,30 +380,6 @@ int __init icu_of_init(struct device_nod
+ panic("Failed to remap icu memory");
+ }
+
+- /* the external interrupts are optional and xway only */
+- eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
+- if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
+- /* find out how many external irq sources we have */
+- exin_avail = of_irq_count(eiu_node);
+-
+- if (exin_avail > MAX_EIU)
+- exin_avail = MAX_EIU;
+-
+- ret = of_irq_to_resource_table(eiu_node,
+- ltq_eiu_irq, exin_avail);
+- if (ret != exin_avail)
+- panic("failed to load external irq resources");
+-
+- if (request_mem_region(res.start, resource_size(&res),
+- res.name) < 0)
+- pr_err("Failed to request eiu memory");
+-
+- ltq_eiu_membase = ioremap_nocache(res.start,
+- resource_size(&res));
+- if (!ltq_eiu_membase)
+- panic("Failed to remap eiu memory");
+- }
+-
+ /* turn off all irqs by default */
+ for (i = 0; i < MAX_IM; i++) {
+ /* make sure all irqs are turned off by default */
+@@ -460,6 +436,30 @@ int __init icu_of_init(struct device_nod
+ if (MIPS_CPU_TIMER_IRQ != 7)
+ irq_create_mapping(ltq_domain, MIPS_CPU_TIMER_IRQ);
+
++ /* the external interrupts are optional and xway only */
++ eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
++ if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
++ /* find out how many external irq sources we have */
++ exin_avail = of_irq_count(eiu_node);
++
++ if (exin_avail > MAX_EIU)
++ exin_avail = MAX_EIU;
++
++ ret = of_irq_to_resource_table(eiu_node,
++ ltq_eiu_irq, exin_avail);
++ if (ret != exin_avail)
++ panic("failed to load external irq resources");
++
++ if (request_mem_region(res.start, resource_size(&res),
++ res.name) < 0)
++ pr_err("Failed to request eiu memory");
++
++ ltq_eiu_membase = ioremap_nocache(res.start,
++ resource_size(&res));
++ if (!ltq_eiu_membase)
++ panic("Failed to remap eiu memory");
++ }
++
+ return 0;
+ }
+