1 From baea71233ed1796651cab6ead484a18666a765aa Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Thu, 11 Sep 2014 19:25:25 +0200
4 Subject: [PATCH] MIPS: lantiq: move eiu init after irq_domain register
6 Signed-off-by: John Crispin <blogic@openwrt.org>
8 arch/mips/lantiq/irq.c | 48 ++++++++++++++++++++++++------------------------
9 1 file changed, 24 insertions(+), 24 deletions(-)
11 diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
12 index 6b94cc7..3bbedf6 100644
13 --- a/arch/mips/lantiq/irq.c
14 +++ b/arch/mips/lantiq/irq.c
15 @@ -380,30 +380,6 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
16 panic("Failed to remap icu memory");
19 - /* the external interrupts are optional and xway only */
20 - eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
21 - if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
22 - /* find out how many external irq sources we have */
23 - exin_avail = of_irq_count(eiu_node);
25 - if (exin_avail > MAX_EIU)
26 - exin_avail = MAX_EIU;
28 - ret = of_irq_to_resource_table(eiu_node,
29 - ltq_eiu_irq, exin_avail);
30 - if (ret != exin_avail)
31 - panic("failed to load external irq resources");
33 - if (request_mem_region(res.start, resource_size(&res),
35 - pr_err("Failed to request eiu memory");
37 - ltq_eiu_membase = ioremap_nocache(res.start,
38 - resource_size(&res));
39 - if (!ltq_eiu_membase)
40 - panic("Failed to remap eiu memory");
43 /* turn off all irqs by default */
44 for (i = 0; i < MAX_IM; i++) {
45 /* make sure all irqs are turned off by default */
46 @@ -460,6 +436,30 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
47 if (MIPS_CPU_TIMER_IRQ != 7)
48 irq_create_mapping(ltq_domain, MIPS_CPU_TIMER_IRQ);
50 + /* the external interrupts are optional and xway only */
51 + eiu_node = of_find_compatible_node(NULL, NULL, "lantiq,eiu-xway");
52 + if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) {
53 + /* find out how many external irq sources we have */
54 + exin_avail = of_irq_count(eiu_node);
56 + if (exin_avail > MAX_EIU)
57 + exin_avail = MAX_EIU;
59 + ret = of_irq_to_resource_table(eiu_node,
60 + ltq_eiu_irq, exin_avail);
61 + if (ret != exin_avail)
62 + panic("failed to load external irq resources");
64 + if (request_mem_region(res.start, resource_size(&res),
66 + pr_err("Failed to request eiu memory");
68 + ltq_eiu_membase = ioremap_nocache(res.start,
69 + resource_size(&res));
70 + if (!ltq_eiu_membase)
71 + panic("Failed to remap eiu memory");