aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2011-08-18 08:46:46 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-11-08 16:35:52 -0500
commitdda7535912255015ecf7264c1d6691a09f8ba487 (patch)
tree6c7b6aa45b63374bd83793c4082bfddc96258e3e
parent4045513286462a3c12140fac0559f09bcb5e7f10 (diff)
m68k/sun3: Convert Sun3/3x to genirq
Replace the custom irq handler that masks the irq and calls do_IRQ(), and the unmasking in the individual handlers, by handle_level_irq(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Sam Creasey <sammy@sammy.net>
-rw-r--r--arch/m68k/Kconfig2
-rw-r--r--arch/m68k/sun3/sun3ints.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index f2dc708d3da9..290f9c838b35 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -87,9 +87,7 @@ config MMU_SUN3
87config USE_GENERIC_HARDIRQS 87config USE_GENERIC_HARDIRQS
88 bool "Use genirq" 88 bool "Use genirq"
89 depends on MMU 89 depends on MMU
90 depends on !SUN3X
91 depends on !Q40 90 depends on !Q40
92 depends on !SUN3
93 select HAVE_GENERIC_HARDIRQS 91 select HAVE_GENERIC_HARDIRQS
94 select GENERIC_IRQ_SHOW 92 select GENERIC_IRQ_SHOW
95 93
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 1273eb879a15..626b601931e9 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -53,7 +53,9 @@ static irqreturn_t sun3_int7(int irq, void *dev_id)
53{ 53{
54 unsigned int cnt; 54 unsigned int cnt;
55 55
56#ifndef CONFIG_GENERIC_HARDIRQS
56 *sun3_intreg |= (1 << irq); 57 *sun3_intreg |= (1 << irq);
58#endif
57 cnt = kstat_irqs_cpu(irq, 0); 59 cnt = kstat_irqs_cpu(irq, 0);
58 if (!(cnt % 2000)) 60 if (!(cnt % 2000))
59 sun3_leds(led_pattern[cnt % 16000 / 2000]); 61 sun3_leds(led_pattern[cnt % 16000 / 2000]);
@@ -67,7 +69,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)
67#ifdef CONFIG_SUN3 69#ifdef CONFIG_SUN3
68 intersil_clear(); 70 intersil_clear();
69#endif 71#endif
72#ifndef CONFIG_GENERIC_HARDIRQS
70 *sun3_intreg |= (1 << irq); 73 *sun3_intreg |= (1 << irq);
74#endif
71#ifdef CONFIG_SUN3 75#ifdef CONFIG_SUN3
72 intersil_clear(); 76 intersil_clear();
73#endif 77#endif
@@ -85,12 +89,14 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id)
85 return IRQ_HANDLED; 89 return IRQ_HANDLED;
86} 90}
87 91
92#ifndef CONFIG_GENERIC_HARDIRQS
88static void sun3_inthandle(unsigned int irq, struct pt_regs *fp) 93static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)
89{ 94{
90 *sun3_intreg &= ~(1 << irq); 95 *sun3_intreg &= ~(1 << irq);
91 96
92 do_IRQ(irq, fp); 97 do_IRQ(irq, fp);
93} 98}
99#endif
94 100
95static void sun3_irq_enable(struct irq_data *data) 101static void sun3_irq_enable(struct irq_data *data)
96{ 102{
@@ -108,15 +114,21 @@ static struct irq_chip sun3_irq_chip = {
108 .irq_shutdown = m68k_irq_shutdown, 114 .irq_shutdown = m68k_irq_shutdown,
109 .irq_enable = sun3_irq_enable, 115 .irq_enable = sun3_irq_enable,
110 .irq_disable = sun3_irq_disable, 116 .irq_disable = sun3_irq_disable,
117#ifdef CONFIG_GENERIC_HARDIRQS
118 .irq_mask = sun3_irq_disable,
119 .irq_unmask = sun3_irq_enable,
120#endif
111}; 121};
112 122
113void __init sun3_init_IRQ(void) 123void __init sun3_init_IRQ(void)
114{ 124{
115 *sun3_intreg = 1; 125 *sun3_intreg = 1;
116 126
127#ifndef CONFIG_GENERIC_HARDIRQS
117 m68k_setup_auto_interrupt(sun3_inthandle); 128 m68k_setup_auto_interrupt(sun3_inthandle);
118 m68k_setup_irq_controller(&sun3_irq_chip, handle_simple_irq, 129#endif
119 IRQ_AUTO_1, 7); 130 m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1,
131 7);
120 m68k_setup_user_interrupt(VEC_USER, 128, NULL); 132 m68k_setup_user_interrupt(VEC_USER, 128, NULL);
121 133
122 if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL)) 134 if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL))