aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2014-11-28 09:55:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-12-03 11:07:30 -0500
commitaffcab32e2f1d5aae331198b3db3ea70b8e49639 (patch)
tree6907e164668a1680afe9a406aa30043eef79174e /arch/arm/mach-sa1100
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
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>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/irq.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 2124f1fc2fbe..4a1bd5ebee1c 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -20,6 +20,7 @@
20#include <mach/hardware.h> 20#include <mach/hardware.h>
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <asm/mach/irq.h> 22#include <asm/mach/irq.h>
23#include <asm/exception.h>
23 24
24#include "generic.h" 25#include "generic.h"
25 26
@@ -291,6 +292,23 @@ static int __init sa1100irq_init_devicefs(void)
291 292
292device_initcall(sa1100irq_init_devicefs); 293device_initcall(sa1100irq_init_devicefs);
293 294
295static asmlinkage void __exception_irq_entry
296sa1100_handle_irq(struct pt_regs *regs)
297{
298 uint32_t icip, icmr, mask;
299
300 do {
301 icip = (ICIP);
302 icmr = (ICMR);
303 mask = icip & icmr;
304
305 if (mask == 0)
306 break;
307
308 handle_IRQ(ffs(mask) - 1 + IRQ_GPIO0, regs);
309 } while (1);
310}
311
294void __init sa1100_init_irq(void) 312void __init sa1100_init_irq(void)
295{ 313{
296 unsigned int irq; 314 unsigned int irq;
@@ -338,5 +356,7 @@ void __init sa1100_init_irq(void)
338 irq_set_chip(IRQ_GPIO11_27, &sa1100_normal_chip); 356 irq_set_chip(IRQ_GPIO11_27, &sa1100_normal_chip);
339 irq_set_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler); 357 irq_set_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler);
340 358
359 set_handle_irq(sa1100_handle_irq);
360
341 sa1100_init_gpio(); 361 sa1100_init_gpio();
342} 362}