aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/apollo
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2011-08-18 08:45:57 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-11-08 16:35:51 -0500
commitbc7485acd09405d9544783d773ee040af4a5c861 (patch)
tree8b5af62f51483e99a79a97c11a48f06b08a93b35 /arch/m68k/apollo
parent6c490c4da4642ec9e7569c8b50a98a22c71ad184 (diff)
m68k/apollo: Convert Apollo to genirq
Replace the custom user vector interrupt handler that calls do_IRQ() and does an EOI by handle_fasteoi_irq(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Peter De Schrijver <p2@debian.org>
Diffstat (limited to 'arch/m68k/apollo')
-rw-r--r--arch/m68k/apollo/dn_ints.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 4b764312aed0..fc190b34b621 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -1,9 +1,14 @@
1#include <linux/interrupt.h> 1#include <linux/interrupt.h>
2 2#ifdef CONFIG_GENERIC_HARDIRQS
3#include <linux/irq.h>
4#else
3#include <asm/irq.h> 5#include <asm/irq.h>
6#endif
7
4#include <asm/traps.h> 8#include <asm/traps.h>
5#include <asm/apollohw.h> 9#include <asm/apollohw.h>
6 10
11#ifndef CONFIG_GENERIC_HARDIRQS
7void dn_process_int(unsigned int irq, struct pt_regs *fp) 12void dn_process_int(unsigned int irq, struct pt_regs *fp)
8{ 13{
9 do_IRQ(irq, fp); 14 do_IRQ(irq, fp);
@@ -11,6 +16,7 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp)
11 *(volatile unsigned char *)(pica)=0x20; 16 *(volatile unsigned char *)(pica)=0x20;
12 *(volatile unsigned char *)(picb)=0x20; 17 *(volatile unsigned char *)(picb)=0x20;
13} 18}
19#endif
14 20
15unsigned int apollo_irq_startup(struct irq_data *data) 21unsigned int apollo_irq_startup(struct irq_data *data)
16{ 22{
@@ -33,16 +39,31 @@ void apollo_irq_shutdown(struct irq_data *data)
33 *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); 39 *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
34} 40}
35 41
42#ifdef CONFIG_GENERIC_HARDIRQS
43void apollo_irq_eoi(struct irq_data *data)
44{
45 *(volatile unsigned char *)(pica) = 0x20;
46 *(volatile unsigned char *)(picb) = 0x20;
47}
48#endif
49
36static struct irq_chip apollo_irq_chip = { 50static struct irq_chip apollo_irq_chip = {
37 .name = "apollo", 51 .name = "apollo",
38 .irq_startup = apollo_irq_startup, 52 .irq_startup = apollo_irq_startup,
39 .irq_shutdown = apollo_irq_shutdown, 53 .irq_shutdown = apollo_irq_shutdown,
54#ifdef CONFIG_GENERIC_HARDIRQS
55 .irq_eoi = apollo_irq_eoi,
56#endif
40}; 57};
41 58
42 59
43void __init dn_init_IRQ(void) 60void __init dn_init_IRQ(void)
44{ 61{
62#ifdef CONFIG_GENERIC_HARDIRQS
63 m68k_setup_user_interrupt(VEC_USER + 96, 16, NULL);
64#else
45 m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); 65 m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int);
46 m68k_setup_irq_controller(&apollo_irq_chip, handle_simple_irq, 66#endif
67 m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq,
47 IRQ_APOLLO, 16); 68 IRQ_APOLLO, 16);
48} 69}