diff options
Diffstat (limited to 'arch/h8300/kernel/irq.c')
-rw-r--r-- | arch/h8300/kernel/irq.c | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c index c25dc2c2b1da..7643d39925d6 100644 --- a/arch/h8300/kernel/irq.c +++ b/arch/h8300/kernel/irq.c | |||
@@ -38,34 +38,30 @@ static inline int is_ext_irq(unsigned int irq) | |||
38 | return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); | 38 | return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); |
39 | } | 39 | } |
40 | 40 | ||
41 | static void h8300_enable_irq(unsigned int irq) | 41 | static void h8300_enable_irq(struct irq_data *data) |
42 | { | 42 | { |
43 | if (is_ext_irq(irq)) | 43 | if (is_ext_irq(data->irq)) |
44 | IER_REGS |= 1 << (irq - EXT_IRQ0); | 44 | IER_REGS |= 1 << (data->irq - EXT_IRQ0); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void h8300_disable_irq(unsigned int irq) | 47 | static void h8300_disable_irq(struct irq_data *data) |
48 | { | 48 | { |
49 | if (is_ext_irq(irq)) | 49 | if (is_ext_irq(data->irq)) |
50 | IER_REGS &= ~(1 << (irq - EXT_IRQ0)); | 50 | IER_REGS &= ~(1 << (data->irq - EXT_IRQ0)); |
51 | } | 51 | } |
52 | 52 | ||
53 | static void h8300_end_irq(unsigned int irq) | 53 | static unsigned int h8300_startup_irq(struct irq_data *data) |
54 | { | 54 | { |
55 | } | 55 | if (is_ext_irq(data->irq)) |
56 | 56 | return h8300_enable_irq_pin(data->irq); | |
57 | static unsigned int h8300_startup_irq(unsigned int irq) | ||
58 | { | ||
59 | if (is_ext_irq(irq)) | ||
60 | return h8300_enable_irq_pin(irq); | ||
61 | else | 57 | else |
62 | return 0; | 58 | return 0; |
63 | } | 59 | } |
64 | 60 | ||
65 | static void h8300_shutdown_irq(unsigned int irq) | 61 | static void h8300_shutdown_irq(struct irq_data *data) |
66 | { | 62 | { |
67 | if (is_ext_irq(irq)) | 63 | if (is_ext_irq(data->irq)) |
68 | h8300_disable_irq_pin(irq); | 64 | h8300_disable_irq_pin(data->irq); |
69 | } | 65 | } |
70 | 66 | ||
71 | /* | 67 | /* |
@@ -73,12 +69,10 @@ static void h8300_shutdown_irq(unsigned int irq) | |||
73 | */ | 69 | */ |
74 | struct irq_chip h8300irq_chip = { | 70 | struct irq_chip h8300irq_chip = { |
75 | .name = "H8300-INTC", | 71 | .name = "H8300-INTC", |
76 | .startup = h8300_startup_irq, | 72 | .irq_startup = h8300_startup_irq, |
77 | .shutdown = h8300_shutdown_irq, | 73 | .irq_shutdown = h8300_shutdown_irq, |
78 | .enable = h8300_enable_irq, | 74 | .irq_enable = h8300_enable_irq, |
79 | .disable = h8300_disable_irq, | 75 | .irq_disable = h8300_disable_irq, |
80 | .ack = NULL, | ||
81 | .end = h8300_end_irq, | ||
82 | }; | 76 | }; |
83 | 77 | ||
84 | #if defined(CONFIG_RAMKERNEL) | 78 | #if defined(CONFIG_RAMKERNEL) |
@@ -160,18 +154,14 @@ void __init init_IRQ(void) | |||
160 | 154 | ||
161 | setup_vector(); | 155 | setup_vector(); |
162 | 156 | ||
163 | for (c = 0; c < NR_IRQS; c++) { | 157 | for (c = 0; c < NR_IRQS; c++) |
164 | irq_desc[c].status = IRQ_DISABLED; | 158 | set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); |
165 | irq_desc[c].action = NULL; | ||
166 | irq_desc[c].depth = 1; | ||
167 | irq_desc[c].chip = &h8300irq_chip; | ||
168 | } | ||
169 | } | 159 | } |
170 | 160 | ||
171 | asmlinkage void do_IRQ(int irq) | 161 | asmlinkage void do_IRQ(int irq) |
172 | { | 162 | { |
173 | irq_enter(); | 163 | irq_enter(); |
174 | __do_IRQ(irq); | 164 | generic_handle_irq(irq); |
175 | irq_exit(); | 165 | irq_exit(); |
176 | } | 166 | } |
177 | 167 | ||
@@ -192,7 +182,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
192 | goto unlock; | 182 | goto unlock; |
193 | seq_printf(p, "%3d: ",i); | 183 | seq_printf(p, "%3d: ",i); |
194 | seq_printf(p, "%10u ", kstat_irqs(i)); | 184 | seq_printf(p, "%10u ", kstat_irqs(i)); |
195 | seq_printf(p, " %14s", irq_desc[i].chip->name); | 185 | seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); |
196 | seq_printf(p, "-%-8s", irq_desc[i].name); | 186 | seq_printf(p, "-%-8s", irq_desc[i].name); |
197 | seq_printf(p, " %s", action->name); | 187 | seq_printf(p, " %s", action->name); |
198 | 188 | ||