diff options
Diffstat (limited to 'arch/m32r/platforms/opsput/setup.c')
-rw-r--r-- | arch/m32r/platforms/opsput/setup.c | 220 |
1 files changed, 75 insertions, 145 deletions
diff --git a/arch/m32r/platforms/opsput/setup.c b/arch/m32r/platforms/opsput/setup.c index 5f3402a2fbaf..12731547e8bf 100644 --- a/arch/m32r/platforms/opsput/setup.c +++ b/arch/m32r/platforms/opsput/setup.c | |||
@@ -46,39 +46,30 @@ static void enable_opsput_irq(unsigned int irq) | |||
46 | outl(data, port); | 46 | outl(data, port); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void mask_and_ack_opsput(unsigned int irq) | 49 | static void mask_opsput(struct irq_data *data) |
50 | { | 50 | { |
51 | disable_opsput_irq(irq); | 51 | disable_opsput_irq(data->irq); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void end_opsput_irq(unsigned int irq) | 54 | static void unmask_opsput(struct irq_data *data) |
55 | { | 55 | { |
56 | enable_opsput_irq(irq); | 56 | enable_opsput_irq(data->irq); |
57 | } | 57 | } |
58 | 58 | ||
59 | static unsigned int startup_opsput_irq(unsigned int irq) | 59 | static void shutdown_opsput(struct irq_data *data) |
60 | { | ||
61 | enable_opsput_irq(irq); | ||
62 | return (0); | ||
63 | } | ||
64 | |||
65 | static void shutdown_opsput_irq(unsigned int irq) | ||
66 | { | 60 | { |
67 | unsigned long port; | 61 | unsigned long port; |
68 | 62 | ||
69 | port = irq2port(irq); | 63 | port = irq2port(data->irq); |
70 | outl(M32R_ICUCR_ILEVEL7, port); | 64 | outl(M32R_ICUCR_ILEVEL7, port); |
71 | } | 65 | } |
72 | 66 | ||
73 | static struct irq_chip opsput_irq_type = | 67 | static struct irq_chip opsput_irq_type = |
74 | { | 68 | { |
75 | .name = "OPSPUT-IRQ", | 69 | .name = "OPSPUT-IRQ", |
76 | .startup = startup_opsput_irq, | 70 | .irq_shutdown = shutdown_opsput, |
77 | .shutdown = shutdown_opsput_irq, | 71 | .irq_mask = mask_opsput, |
78 | .enable = enable_opsput_irq, | 72 | .irq_unmask = unmask_opsput, |
79 | .disable = disable_opsput_irq, | ||
80 | .ack = mask_and_ack_opsput, | ||
81 | .end = end_opsput_irq | ||
82 | }; | 73 | }; |
83 | 74 | ||
84 | /* | 75 | /* |
@@ -100,7 +91,6 @@ static void disable_opsput_pld_irq(unsigned int irq) | |||
100 | unsigned int pldirq; | 91 | unsigned int pldirq; |
101 | 92 | ||
102 | pldirq = irq2pldirq(irq); | 93 | pldirq = irq2pldirq(irq); |
103 | // disable_opsput_irq(M32R_IRQ_INT1); | ||
104 | port = pldirq2port(pldirq); | 94 | port = pldirq2port(pldirq); |
105 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; | 95 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; |
106 | outw(data, port); | 96 | outw(data, port); |
@@ -112,50 +102,38 @@ static void enable_opsput_pld_irq(unsigned int irq) | |||
112 | unsigned int pldirq; | 102 | unsigned int pldirq; |
113 | 103 | ||
114 | pldirq = irq2pldirq(irq); | 104 | pldirq = irq2pldirq(irq); |
115 | // enable_opsput_irq(M32R_IRQ_INT1); | ||
116 | port = pldirq2port(pldirq); | 105 | port = pldirq2port(pldirq); |
117 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; | 106 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; |
118 | outw(data, port); | 107 | outw(data, port); |
119 | } | 108 | } |
120 | 109 | ||
121 | static void mask_and_ack_opsput_pld(unsigned int irq) | 110 | static void mask_opsput_pld(struct irq_data *data) |
122 | { | ||
123 | disable_opsput_pld_irq(irq); | ||
124 | // mask_and_ack_opsput(M32R_IRQ_INT1); | ||
125 | } | ||
126 | |||
127 | static void end_opsput_pld_irq(unsigned int irq) | ||
128 | { | 111 | { |
129 | enable_opsput_pld_irq(irq); | 112 | disable_opsput_pld_irq(data->irq); |
130 | end_opsput_irq(M32R_IRQ_INT1); | ||
131 | } | 113 | } |
132 | 114 | ||
133 | static unsigned int startup_opsput_pld_irq(unsigned int irq) | 115 | static void unmask_opsput_pld(struct irq_data *data) |
134 | { | 116 | { |
135 | enable_opsput_pld_irq(irq); | 117 | enable_opsput_pld_irq(data->irq); |
136 | return (0); | 118 | enable_opsput_irq(M32R_IRQ_INT1); |
137 | } | 119 | } |
138 | 120 | ||
139 | static void shutdown_opsput_pld_irq(unsigned int irq) | 121 | static void shutdown_opsput_pld(struct irq_data *data) |
140 | { | 122 | { |
141 | unsigned long port; | 123 | unsigned long port; |
142 | unsigned int pldirq; | 124 | unsigned int pldirq; |
143 | 125 | ||
144 | pldirq = irq2pldirq(irq); | 126 | pldirq = irq2pldirq(data->irq); |
145 | // shutdown_opsput_irq(M32R_IRQ_INT1); | ||
146 | port = pldirq2port(pldirq); | 127 | port = pldirq2port(pldirq); |
147 | outw(PLD_ICUCR_ILEVEL7, port); | 128 | outw(PLD_ICUCR_ILEVEL7, port); |
148 | } | 129 | } |
149 | 130 | ||
150 | static struct irq_chip opsput_pld_irq_type = | 131 | static struct irq_chip opsput_pld_irq_type = |
151 | { | 132 | { |
152 | .name = "OPSPUT-PLD-IRQ", | 133 | .name = "OPSPUT-PLD-IRQ", |
153 | .startup = startup_opsput_pld_irq, | 134 | .irq_shutdown = shutdown_opsput_pld, |
154 | .shutdown = shutdown_opsput_pld_irq, | 135 | .irq_mask = mask_opsput_pld, |
155 | .enable = enable_opsput_pld_irq, | 136 | .irq_unmask = unmask_opsput_pld, |
156 | .disable = disable_opsput_pld_irq, | ||
157 | .ack = mask_and_ack_opsput_pld, | ||
158 | .end = end_opsput_pld_irq | ||
159 | }; | 137 | }; |
160 | 138 | ||
161 | /* | 139 | /* |
@@ -189,42 +167,33 @@ static void enable_opsput_lanpld_irq(unsigned int irq) | |||
189 | outw(data, port); | 167 | outw(data, port); |
190 | } | 168 | } |
191 | 169 | ||
192 | static void mask_and_ack_opsput_lanpld(unsigned int irq) | 170 | static void mask_opsput_lanpld(struct irq_data *data) |
193 | { | ||
194 | disable_opsput_lanpld_irq(irq); | ||
195 | } | ||
196 | |||
197 | static void end_opsput_lanpld_irq(unsigned int irq) | ||
198 | { | 171 | { |
199 | enable_opsput_lanpld_irq(irq); | 172 | disable_opsput_lanpld_irq(data->irq); |
200 | end_opsput_irq(M32R_IRQ_INT0); | ||
201 | } | 173 | } |
202 | 174 | ||
203 | static unsigned int startup_opsput_lanpld_irq(unsigned int irq) | 175 | static void unmask_opsput_lanpld(struct irq_data *data) |
204 | { | 176 | { |
205 | enable_opsput_lanpld_irq(irq); | 177 | enable_opsput_lanpld_irq(data->irq); |
206 | return (0); | 178 | enable_opsput_irq(M32R_IRQ_INT0); |
207 | } | 179 | } |
208 | 180 | ||
209 | static void shutdown_opsput_lanpld_irq(unsigned int irq) | 181 | static void shutdown_opsput_lanpld(struct irq_data *data) |
210 | { | 182 | { |
211 | unsigned long port; | 183 | unsigned long port; |
212 | unsigned int pldirq; | 184 | unsigned int pldirq; |
213 | 185 | ||
214 | pldirq = irq2lanpldirq(irq); | 186 | pldirq = irq2lanpldirq(data->irq); |
215 | port = lanpldirq2port(pldirq); | 187 | port = lanpldirq2port(pldirq); |
216 | outw(PLD_ICUCR_ILEVEL7, port); | 188 | outw(PLD_ICUCR_ILEVEL7, port); |
217 | } | 189 | } |
218 | 190 | ||
219 | static struct irq_chip opsput_lanpld_irq_type = | 191 | static struct irq_chip opsput_lanpld_irq_type = |
220 | { | 192 | { |
221 | .name = "OPSPUT-PLD-LAN-IRQ", | 193 | .name = "OPSPUT-PLD-LAN-IRQ", |
222 | .startup = startup_opsput_lanpld_irq, | 194 | .irq_shutdown = shutdown_opsput_lanpld, |
223 | .shutdown = shutdown_opsput_lanpld_irq, | 195 | .irq_mask = mask_opsput_lanpld, |
224 | .enable = enable_opsput_lanpld_irq, | 196 | .irq_unmask = unmask_opsput_lanpld, |
225 | .disable = disable_opsput_lanpld_irq, | ||
226 | .ack = mask_and_ack_opsput_lanpld, | ||
227 | .end = end_opsput_lanpld_irq | ||
228 | }; | 197 | }; |
229 | 198 | ||
230 | /* | 199 | /* |
@@ -258,143 +227,109 @@ static void enable_opsput_lcdpld_irq(unsigned int irq) | |||
258 | outw(data, port); | 227 | outw(data, port); |
259 | } | 228 | } |
260 | 229 | ||
261 | static void mask_and_ack_opsput_lcdpld(unsigned int irq) | 230 | static void mask_opsput_lcdpld(struct irq_data *data) |
262 | { | ||
263 | disable_opsput_lcdpld_irq(irq); | ||
264 | } | ||
265 | |||
266 | static void end_opsput_lcdpld_irq(unsigned int irq) | ||
267 | { | 231 | { |
268 | enable_opsput_lcdpld_irq(irq); | 232 | disable_opsput_lcdpld_irq(data->irq); |
269 | end_opsput_irq(M32R_IRQ_INT2); | ||
270 | } | 233 | } |
271 | 234 | ||
272 | static unsigned int startup_opsput_lcdpld_irq(unsigned int irq) | 235 | static void unmask_opsput_lcdpld(struct irq_data *data) |
273 | { | 236 | { |
274 | enable_opsput_lcdpld_irq(irq); | 237 | enable_opsput_lcdpld_irq(data->irq); |
275 | return (0); | 238 | enable_opsput_irq(M32R_IRQ_INT2); |
276 | } | 239 | } |
277 | 240 | ||
278 | static void shutdown_opsput_lcdpld_irq(unsigned int irq) | 241 | static void shutdown_opsput_lcdpld(struct irq_data *data) |
279 | { | 242 | { |
280 | unsigned long port; | 243 | unsigned long port; |
281 | unsigned int pldirq; | 244 | unsigned int pldirq; |
282 | 245 | ||
283 | pldirq = irq2lcdpldirq(irq); | 246 | pldirq = irq2lcdpldirq(data->irq); |
284 | port = lcdpldirq2port(pldirq); | 247 | port = lcdpldirq2port(pldirq); |
285 | outw(PLD_ICUCR_ILEVEL7, port); | 248 | outw(PLD_ICUCR_ILEVEL7, port); |
286 | } | 249 | } |
287 | 250 | ||
288 | static struct irq_chip opsput_lcdpld_irq_type = | 251 | static struct irq_chip opsput_lcdpld_irq_type = { |
289 | { | 252 | .name = "OPSPUT-PLD-LCD-IRQ", |
290 | "OPSPUT-PLD-LCD-IRQ", | 253 | .irq_shutdown = shutdown_opsput_lcdpld, |
291 | startup_opsput_lcdpld_irq, | 254 | .irq_mask = mask_opsput_lcdpld, |
292 | shutdown_opsput_lcdpld_irq, | 255 | .irq_unmask = unmask_opsput_lcdpld, |
293 | enable_opsput_lcdpld_irq, | ||
294 | disable_opsput_lcdpld_irq, | ||
295 | mask_and_ack_opsput_lcdpld, | ||
296 | end_opsput_lcdpld_irq | ||
297 | }; | 256 | }; |
298 | 257 | ||
299 | void __init init_IRQ(void) | 258 | void __init init_IRQ(void) |
300 | { | 259 | { |
301 | #if defined(CONFIG_SMC91X) | 260 | #if defined(CONFIG_SMC91X) |
302 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ | 261 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ |
303 | irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED; | 262 | set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, |
304 | irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type; | 263 | handle_level_irq); |
305 | irq_desc[OPSPUT_LAN_IRQ_LAN].action = 0; | ||
306 | irq_desc[OPSPUT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ | ||
307 | lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ | 264 | lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ |
308 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); | 265 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); |
309 | #endif /* CONFIG_SMC91X */ | 266 | #endif /* CONFIG_SMC91X */ |
310 | 267 | ||
311 | /* MFT2 : system timer */ | 268 | /* MFT2 : system timer */ |
312 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 269 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type, |
313 | irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type; | 270 | handle_level_irq); |
314 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
315 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
316 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 271 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
317 | disable_opsput_irq(M32R_IRQ_MFT2); | 272 | disable_opsput_irq(M32R_IRQ_MFT2); |
318 | 273 | ||
319 | /* SIO0 : receive */ | 274 | /* SIO0 : receive */ |
320 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 275 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type, |
321 | irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type; | 276 | handle_level_irq); |
322 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
323 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
324 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 277 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
325 | disable_opsput_irq(M32R_IRQ_SIO0_R); | 278 | disable_opsput_irq(M32R_IRQ_SIO0_R); |
326 | 279 | ||
327 | /* SIO0 : send */ | 280 | /* SIO0 : send */ |
328 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 281 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type, |
329 | irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type; | 282 | handle_level_irq); |
330 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
331 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
332 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 283 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
333 | disable_opsput_irq(M32R_IRQ_SIO0_S); | 284 | disable_opsput_irq(M32R_IRQ_SIO0_S); |
334 | 285 | ||
335 | /* SIO1 : receive */ | 286 | /* SIO1 : receive */ |
336 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 287 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type, |
337 | irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type; | 288 | handle_level_irq); |
338 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
339 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
340 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 289 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
341 | disable_opsput_irq(M32R_IRQ_SIO1_R); | 290 | disable_opsput_irq(M32R_IRQ_SIO1_R); |
342 | 291 | ||
343 | /* SIO1 : send */ | 292 | /* SIO1 : send */ |
344 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 293 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type, |
345 | irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type; | 294 | handle_level_irq); |
346 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
347 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
348 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 295 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
349 | disable_opsput_irq(M32R_IRQ_SIO1_S); | 296 | disable_opsput_irq(M32R_IRQ_SIO1_S); |
350 | 297 | ||
351 | /* DMA1 : */ | 298 | /* DMA1 : */ |
352 | irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; | 299 | set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type, |
353 | irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type; | 300 | handle_level_irq); |
354 | irq_desc[M32R_IRQ_DMA1].action = 0; | ||
355 | irq_desc[M32R_IRQ_DMA1].depth = 1; | ||
356 | icu_data[M32R_IRQ_DMA1].icucr = 0; | 301 | icu_data[M32R_IRQ_DMA1].icucr = 0; |
357 | disable_opsput_irq(M32R_IRQ_DMA1); | 302 | disable_opsput_irq(M32R_IRQ_DMA1); |
358 | 303 | ||
359 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 304 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
360 | /* INT#1: SIO0 Receive on PLD */ | 305 | /* INT#1: SIO0 Receive on PLD */ |
361 | irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; | 306 | set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type, |
362 | irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type; | 307 | handle_level_irq); |
363 | irq_desc[PLD_IRQ_SIO0_RCV].action = 0; | ||
364 | irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ | ||
365 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 308 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
366 | disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); | 309 | disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); |
367 | 310 | ||
368 | /* INT#1: SIO0 Send on PLD */ | 311 | /* INT#1: SIO0 Send on PLD */ |
369 | irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; | 312 | set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type, |
370 | irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type; | 313 | handle_level_irq); |
371 | irq_desc[PLD_IRQ_SIO0_SND].action = 0; | ||
372 | irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ | ||
373 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 314 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | 315 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); |
375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 316 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
376 | 317 | ||
377 | /* INT#1: CFC IREQ on PLD */ | 318 | /* INT#1: CFC IREQ on PLD */ |
378 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 319 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type, |
379 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; | 320 | handle_level_irq); |
380 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
381 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
382 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ | 321 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ |
383 | disable_opsput_pld_irq(PLD_IRQ_CFIREQ); | 322 | disable_opsput_pld_irq(PLD_IRQ_CFIREQ); |
384 | 323 | ||
385 | /* INT#1: CFC Insert on PLD */ | 324 | /* INT#1: CFC Insert on PLD */ |
386 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 325 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type, |
387 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type; | 326 | handle_level_irq); |
388 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
389 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
390 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ | 327 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ |
391 | disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); | 328 | disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); |
392 | 329 | ||
393 | /* INT#1: CFC Eject on PLD */ | 330 | /* INT#1: CFC Eject on PLD */ |
394 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | 331 | set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type, |
395 | irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type; | 332 | handle_level_irq); |
396 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | ||
397 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | ||
398 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ | 333 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ |
399 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); | 334 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); |
400 | 335 | ||
@@ -413,14 +348,11 @@ void __init init_IRQ(void) | |||
413 | enable_opsput_irq(M32R_IRQ_INT1); | 348 | enable_opsput_irq(M32R_IRQ_INT1); |
414 | 349 | ||
415 | #if defined(CONFIG_USB) | 350 | #if defined(CONFIG_USB) |
416 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ | 351 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ |
417 | 352 | set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, | |
418 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; | 353 | &opsput_lcdpld_irq_type, handle_level_irq); |
419 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type; | 354 | lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ |
420 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0; | 355 | disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); |
421 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].depth = 1; | ||
422 | lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ | ||
423 | disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); | ||
424 | #endif | 356 | #endif |
425 | /* | 357 | /* |
426 | * INT2# is used for BAT, USB, AUDIO | 358 | * INT2# is used for BAT, USB, AUDIO |
@@ -433,10 +365,8 @@ void __init init_IRQ(void) | |||
433 | /* | 365 | /* |
434 | * INT3# is used for AR | 366 | * INT3# is used for AR |
435 | */ | 367 | */ |
436 | irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; | 368 | set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type, |
437 | irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type; | 369 | handle_level_irq); |
438 | irq_desc[M32R_IRQ_INT3].action = 0; | ||
439 | irq_desc[M32R_IRQ_INT3].depth = 1; | ||
440 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 370 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
441 | disable_opsput_irq(M32R_IRQ_INT3); | 371 | disable_opsput_irq(M32R_IRQ_INT3); |
442 | #endif /* CONFIG_VIDEO_M32R_AR */ | 372 | #endif /* CONFIG_VIDEO_M32R_AR */ |