Skip to content

Commit

Permalink
ARM: gemini: convert to MULTI_IRQ_HANDLER
Browse files Browse the repository at this point in the history
In order to enable device tree boot on this machine we must first
convert it to runtime-manage its irq handler, so do this.

Cc: Janos Laube <janos.dev@gmail.com>
Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Mar 12, 2017
1 parent c1ae3cf commit c12ddfe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 33 deletions.
1 change: 1 addition & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ config ARCH_GEMINI
select CPU_FA526
select GENERIC_CLOCKEVENTS
select GPIOLIB
select MULTI_IRQ_HANDLER
help
Support for the Cortina Systems Gemini family SoCs

Expand Down
33 changes: 0 additions & 33 deletions arch/arm/mach-gemini/include/mach/entry-macro.S

This file was deleted.

15 changes: 15 additions & 0 deletions arch/arm/mach-gemini/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/sched.h>
#include <linux/cpu.h>

#include <asm/exception.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
#include <asm/system_misc.h>
Expand Down Expand Up @@ -65,6 +66,18 @@ static struct irq_chip gemini_irq_chip = {
.irq_unmask = gemini_unmask_irq,
};


asmlinkage void __exception_irq_entry gemini_handle_irq(struct pt_regs *regs)
{
int irq;
unsigned status;

while ((status = __raw_readl(IRQ_STATUS(IO_ADDRESS(GEMINI_INTERRUPT_BASE))))) {
irq = ffs(status) - 1;
handle_domain_irq(NULL, irq, regs);
}
}

static struct resource irq_resource = {
.name = "irq_handler",
.start = GEMINI_INTERRUPT_BASE,
Expand Down Expand Up @@ -102,4 +115,6 @@ void __init gemini_init_irq(void)
/* Set interrupt mode */
__raw_writel(mode, IRQ_TMODE(IO_ADDRESS(GEMINI_INTERRUPT_BASE)));
__raw_writel(level, IRQ_TLEVEL(IO_ADDRESS(GEMINI_INTERRUPT_BASE)));

set_handle_irq(gemini_handle_irq);
}

0 comments on commit c12ddfe

Please sign in to comment.