ARM: 8227/1: sa1100: switch to MULTI_IRQ_HANDLER
Add sa1100_handle_irq implementating handle_irq for sa1100 platform. It is more or less a translation of old assembly code from assembler to plain C. Also install this irq handler from sa1100_init_irq(). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
f114040e3e
commit
affcab32e2
2 changed files with 21 additions and 0 deletions
|
@ -703,6 +703,7 @@ config ARCH_SA1100
|
||||||
select GENERIC_CLOCKEVENTS
|
select GENERIC_CLOCKEVENTS
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select ISA
|
select ISA
|
||||||
|
select MULTI_IRQ_HANDLER
|
||||||
select NEED_MACH_MEMORY_H
|
select NEED_MACH_MEMORY_H
|
||||||
select SPARSE_IRQ
|
select SPARSE_IRQ
|
||||||
help
|
help
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/irqs.h>
|
#include <mach/irqs.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
#include <asm/exception.h>
|
||||||
|
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
|
|
||||||
|
@ -291,6 +292,23 @@ static int __init sa1100irq_init_devicefs(void)
|
||||||
|
|
||||||
device_initcall(sa1100irq_init_devicefs);
|
device_initcall(sa1100irq_init_devicefs);
|
||||||
|
|
||||||
|
static asmlinkage void __exception_irq_entry
|
||||||
|
sa1100_handle_irq(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
uint32_t icip, icmr, mask;
|
||||||
|
|
||||||
|
do {
|
||||||
|
icip = (ICIP);
|
||||||
|
icmr = (ICMR);
|
||||||
|
mask = icip & icmr;
|
||||||
|
|
||||||
|
if (mask == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
handle_IRQ(ffs(mask) - 1 + IRQ_GPIO0, regs);
|
||||||
|
} while (1);
|
||||||
|
}
|
||||||
|
|
||||||
void __init sa1100_init_irq(void)
|
void __init sa1100_init_irq(void)
|
||||||
{
|
{
|
||||||
unsigned int irq;
|
unsigned int irq;
|
||||||
|
@ -338,5 +356,7 @@ void __init sa1100_init_irq(void)
|
||||||
irq_set_chip(IRQ_GPIO11_27, &sa1100_normal_chip);
|
irq_set_chip(IRQ_GPIO11_27, &sa1100_normal_chip);
|
||||||
irq_set_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler);
|
irq_set_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler);
|
||||||
|
|
||||||
|
set_handle_irq(sa1100_handle_irq);
|
||||||
|
|
||||||
sa1100_init_gpio();
|
sa1100_init_gpio();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue