diff options
author | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2012-11-11 07:28:33 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-11-14 02:50:57 -0500 |
commit | 7f88d2c0ad7995ab862ee6da5c77c37cf447b1b3 (patch) | |
tree | 1141afcda58b3f517d754ed0352cbfaa4b78beb1 /arch/m68k | |
parent | f50bf88df3ccda3e88e28f81d366dc79266a16c8 (diff) |
m68k/sun3: Get interrupts working again
SUN3 Intregister is not for enabling individual interrupts, but to enable
special interrupts. So using it for interrupt enable/disable was wrong.
The clock interrupt needs some special treatment to keep ticking.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/sun3/sun3ints.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 78b60f53e90a..6bbca30c9188 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c | |||
@@ -66,6 +66,8 @@ static irqreturn_t sun3_int5(int irq, void *dev_id) | |||
66 | #ifdef CONFIG_SUN3 | 66 | #ifdef CONFIG_SUN3 |
67 | intersil_clear(); | 67 | intersil_clear(); |
68 | #endif | 68 | #endif |
69 | sun3_disable_irq(5); | ||
70 | sun3_enable_irq(5); | ||
69 | #ifdef CONFIG_SUN3 | 71 | #ifdef CONFIG_SUN3 |
70 | intersil_clear(); | 72 | intersil_clear(); |
71 | #endif | 73 | #endif |
@@ -79,41 +81,18 @@ static irqreturn_t sun3_int5(int irq, void *dev_id) | |||
79 | 81 | ||
80 | static irqreturn_t sun3_vec255(int irq, void *dev_id) | 82 | static irqreturn_t sun3_vec255(int irq, void *dev_id) |
81 | { | 83 | { |
82 | // intersil_clear(); | ||
83 | return IRQ_HANDLED; | 84 | return IRQ_HANDLED; |
84 | } | 85 | } |
85 | 86 | ||
86 | static void sun3_irq_enable(struct irq_data *data) | ||
87 | { | ||
88 | sun3_enable_irq(data->irq); | ||
89 | }; | ||
90 | |||
91 | static void sun3_irq_disable(struct irq_data *data) | ||
92 | { | ||
93 | sun3_disable_irq(data->irq); | ||
94 | }; | ||
95 | |||
96 | static struct irq_chip sun3_irq_chip = { | ||
97 | .name = "sun3", | ||
98 | .irq_startup = m68k_irq_startup, | ||
99 | .irq_shutdown = m68k_irq_shutdown, | ||
100 | .irq_enable = sun3_irq_enable, | ||
101 | .irq_disable = sun3_irq_disable, | ||
102 | .irq_mask = sun3_irq_disable, | ||
103 | .irq_unmask = sun3_irq_enable, | ||
104 | }; | ||
105 | |||
106 | void __init sun3_init_IRQ(void) | 87 | void __init sun3_init_IRQ(void) |
107 | { | 88 | { |
108 | *sun3_intreg = 1; | 89 | *sun3_intreg = 1; |
109 | 90 | ||
110 | m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1, | ||
111 | 7); | ||
112 | m68k_setup_user_interrupt(VEC_USER, 128); | 91 | m68k_setup_user_interrupt(VEC_USER, 128); |
113 | 92 | ||
114 | if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL)) | 93 | if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "clock", NULL)) |
115 | pr_err("Couldn't register %s interrupt\n", "int5"); | 94 | pr_err("Couldn't register %s interrupt\n", "int5"); |
116 | if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "int7", NULL)) | 95 | if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "nmi", NULL)) |
117 | pr_err("Couldn't register %s interrupt\n", "int7"); | 96 | pr_err("Couldn't register %s interrupt\n", "int7"); |
118 | if (request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL)) | 97 | if (request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL)) |
119 | pr_err("Couldn't register %s interrupt\n", "vec255"); | 98 | pr_err("Couldn't register %s interrupt\n", "vec255"); |