diff options
author | John Crispin <blogic@openwrt.org> | 2015-10-15 14:38:14 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-10-15 14:38:14 +0000 |
commit | 7386b196138dc08b98252374bea53fdddc03445b (patch) | |
tree | f33ae3a3082a8f028fe52d58b877cb8747af767c /target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c | |
parent | 920566646f5c04e3ea5027f4dbdec965b7551276 (diff) | |
download | upstream-7386b196138dc08b98252374bea53fdddc03445b.tar.gz upstream-7386b196138dc08b98252374bea53fdddc03445b.tar.bz2 upstream-7386b196138dc08b98252374bea53fdddc03445b.zip |
mcs814x: fix interrupt handling
Switch to generich chip irqs/irq domains.
Interrupts were broken since kernel 3.14. dLAN USB extender is now
booting again.
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
Backport of r46647
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47193 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c')
-rw-r--r-- | target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c index f84c412839..d1cab682e4 100644 --- a/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c +++ b/target/linux/mcs814x/files-3.18/arch/arm/mach-mcs814x/irq.c @@ -17,6 +17,7 @@ #include <mach/mcs814x.h> static void __iomem *mcs814x_intc_base; +static struct irq_domain *domain; static void __init mcs814x_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) @@ -24,11 +25,15 @@ static void __init mcs814x_alloc_gc(void __iomem *base, unsigned int irq_start, struct irq_chip_generic *gc; struct irq_chip_type *ct; - gc = irq_alloc_generic_chip("mcs814x-intc", 1, - irq_start, base, handle_level_irq); + if (irq_alloc_domain_generic_chips(domain, num, 1, "mcs814x-intc", handle_level_irq, + IRQ_GC_INIT_MASK_CACHE, IRQ_NOREQUEST, 0)) + panic("unable to allocate domain generic irq chip"); + + gc = irq_get_domain_generic_chip(domain, irq_start); if (!gc) - panic("unable to allocate generic irq chip"); + panic("unable to get generic irq chip"); + gc->reg_base = base; ct = gc->chip_types; ct->chip.irq_ack = irq_gc_unmask_enable_reg; ct->chip.irq_mask = irq_gc_mask_clr_bit; @@ -36,9 +41,6 @@ static void __init mcs814x_alloc_gc(void __iomem *base, unsigned int irq_start, ct->regs.mask = MCS814X_IRQ_MASK; ct->regs.enable = MCS814X_IRQ_ICR; - irq_setup_generic_chip(gc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE, - IRQ_NOREQUEST, 0); - /* Clear all interrupts */ writel_relaxed(0xffffffff, base + MCS814X_IRQ_ICR); } @@ -58,7 +60,7 @@ asmlinkage void __exception_irq_entry mcs814x_handle_irq(struct pt_regs *regs) /* clear the interrupt */ __raw_writel(status, mcs814x_intc_base + MCS814X_IRQ_STS0); /* call the generic handler */ - handle_IRQ(irq, regs); + handle_domain_irq(domain, irq, regs); } while (1); } @@ -80,7 +82,10 @@ void __init mcs814x_of_irq_init(void) if (!mcs814x_intc_base) panic("unable to map intc cpu registers\n"); - irq_domain_add_simple(np, 32, 0, &irq_generic_chip_ops, NULL); + domain = irq_domain_add_linear(np, 32, &irq_generic_chip_ops, NULL); + if (!domain) + panic("unable to add irq domain\n"); + irq_set_default_host(domain); of_node_put(np); |