diff options
author | Felipe Balbi <balbi@ti.com> | 2015-01-06 15:38:08 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2015-01-06 21:50:08 -0500 |
commit | 4b149e417463bbb6d1d9b805f729627ca2b54495 (patch) | |
tree | 7bded6aac5feb4ea2bd333eab3c1187183717b7d | |
parent | 96555c474b917963da7065f88cdab376c8af0e87 (diff) |
irqchip: omap-intc: Fix legacy DMA regression
commit 55601c9f2467 (arm: omap: intc: switch over
to linear irq domain) introduced a regression with
SDMA legacy driver because that driver strictly depends
on INTC's IRQs starting at NR_IRQs. Aparently
irq_domain_add_linear() won't guarantee that, since we see
a 7 IRQs difference when booting with and without the
commit cited above.
Until arch/arm/plat-omap/dma.c is properly fixed, we
must maintain OMAP2/3 using irq_domain_add_legacy().
A FIXME note was added so people know to delete that
code once that legacy DMA driver is fixed up.
Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
Cc: <stable@vger.kernel.org> # v3.18
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Link: https://lkml.kernel.org/r/1420576688-10604-1-git-send-email-balbi@ti.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r-- | drivers/irqchip/irq-omap-intc.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c index 28718d3e8281..c03f140acbae 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c | |||
@@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node) | |||
263 | return ret; | 263 | return ret; |
264 | } | 264 | } |
265 | 265 | ||
266 | static int __init omap_init_irq_legacy(u32 base) | 266 | static int __init omap_init_irq_legacy(u32 base, struct device_node *node) |
267 | { | 267 | { |
268 | int j, irq_base; | 268 | int j, irq_base; |
269 | 269 | ||
@@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base) | |||
277 | irq_base = 0; | 277 | irq_base = 0; |
278 | } | 278 | } |
279 | 279 | ||
280 | domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0, | 280 | domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0, |
281 | &irq_domain_simple_ops, NULL); | 281 | &irq_domain_simple_ops, NULL); |
282 | 282 | ||
283 | omap_irq_soft_reset(); | 283 | omap_irq_soft_reset(); |
@@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node) | |||
301 | { | 301 | { |
302 | int ret; | 302 | int ret; |
303 | 303 | ||
304 | if (node) | 304 | /* |
305 | * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c | ||
306 | * depends is still not ready for linear IRQ domains; because of that | ||
307 | * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using | ||
308 | * linear IRQ Domain until that driver is finally fixed. | ||
309 | */ | ||
310 | if (of_device_is_compatible(node, "ti,omap2-intc") || | ||
311 | of_device_is_compatible(node, "ti,omap3-intc")) { | ||
312 | struct resource res; | ||
313 | |||
314 | if (of_address_to_resource(node, 0, &res)) | ||
315 | return -ENOMEM; | ||
316 | |||
317 | base = res.start; | ||
318 | ret = omap_init_irq_legacy(base, node); | ||
319 | } else if (node) { | ||
305 | ret = omap_init_irq_of(node); | 320 | ret = omap_init_irq_of(node); |
306 | else | 321 | } else { |
307 | ret = omap_init_irq_legacy(base); | 322 | ret = omap_init_irq_legacy(base, NULL); |
323 | } | ||
308 | 324 | ||
309 | if (ret == 0) | 325 | if (ret == 0) |
310 | omap_irq_enable_protection(); | 326 | omap_irq_enable_protection(); |