Skip to content

Commit c8be7ac

Browse files
jamieilesMarc Zyngier
authored andcommitted
ARM: versatile: convert to MULTI_IRQ_HANDLER
Now that there is a generic IRQ handler for multiple VIC devices use it for versatile to help building multi platform kernels. Cc: Russell King <linux@arm.linux.org.uk> Tested-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
1 parent b7378ea commit c8be7ac

5 files changed

Lines changed: 7 additions & 30 deletions

File tree

‎arch/arm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ config ARCH_VERSATILE
294294
select PLAT_VERSATILE_CLCD
295295
select PLAT_VERSATILE_FPGA_IRQ
296296
select ARM_TIMER_SP804
297+
select MULTI_IRQ_HANDLER
297298
help
298299
This enables support for ARM Ltd Versatile board.
299300

‎arch/arm/mach-versatile/include/mach/entry-macro.S‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,9 @@
77
* License version 2. This program is licensed "as is" without any
88
* warranty of any kind, whether express or implied.
99
*/
10-
#include <mach/hardware.h>
11-
#include <mach/platform.h>
12-
#include <asm/hardware/vic.h>
1310

1411
.macro disable_fiq
1512
.endm
1613

17-
.macro get_irqnr_preamble, base, tmp
18-
ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE)
19-
.endm
20-
2114
.macro arch_ret_to_user, tmp1, tmp2
2215
.endm
23-
24-
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25-
ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
26-
mov \irqnr, #0
27-
teq \irqstat, #0
28-
beq 1003f
29-
30-
1001: tst \irqstat, #15
31-
bne 1002f
32-
add \irqnr, \irqnr, #4
33-
movs \irqstat, \irqstat, lsr #4
34-
bne 1001b
35-
1002: tst \irqstat, #1
36-
bne 1003f
37-
add \irqnr, \irqnr, #1
38-
movs \irqstat, \irqstat, lsr #1
39-
bne 1002b
40-
1003: /* EQ will be set if no irqs pending */
41-
42-
@ clz \irqnr, \irqstat
43-
@1003: /* EQ will be set if we reach MAXIRQNUM */
44-
.endm
45-

‎arch/arm/mach-versatile/versatile_ab.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include <mach/hardware.h>
2929
#include <asm/irq.h>
30+
#include <asm/hardware/vic.h>
3031
#include <asm/mach-types.h>
3132

3233
#include <asm/mach/arch.h>
@@ -39,6 +40,7 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
3940
.map_io = versatile_map_io,
4041
.init_early = versatile_init_early,
4142
.init_irq = versatile_init_irq,
43+
.handle_irq = vic_handle_irq,
4244
.timer = &versatile_timer,
4345
.init_machine = versatile_init,
4446
MACHINE_END

‎arch/arm/mach-versatile/versatile_dt.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/init.h>
2525
#include <linux/of_irq.h>
2626
#include <linux/of_platform.h>
27+
#include <asm/hardware/vic.h>
2728
#include <asm/mach-types.h>
2829
#include <asm/mach/arch.h>
2930

@@ -45,6 +46,7 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)")
4546
.map_io = versatile_map_io,
4647
.init_early = versatile_init_early,
4748
.init_irq = versatile_init_irq,
49+
.handle_irq = vic_handle_irq,
4850
.timer = &versatile_timer,
4951
.init_machine = versatile_dt_init,
5052
.dt_compat = versatile_dt_match,

‎arch/arm/mach-versatile/versatile_pb.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/io.h>
2929

3030
#include <mach/hardware.h>
31+
#include <asm/hardware/vic.h>
3132
#include <asm/irq.h>
3233
#include <asm/mach-types.h>
3334

@@ -107,6 +108,7 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
107108
.map_io = versatile_map_io,
108109
.init_early = versatile_init_early,
109110
.init_irq = versatile_init_irq,
111+
.handle_irq = vic_handle_irq,
110112
.timer = &versatile_timer,
111113
.init_machine = versatile_pb_init,
112114
MACHINE_END

0 commit comments

Comments
 (0)