diff options
Diffstat (limited to 'arch/m32r/platforms/opsput/setup.c')
-rw-r--r-- | arch/m32r/platforms/opsput/setup.c | 70 |
1 files changed, 14 insertions, 56 deletions
diff --git a/arch/m32r/platforms/opsput/setup.c b/arch/m32r/platforms/opsput/setup.c index 5f3402a2fbaf..a16a7fe0e6f9 100644 --- a/arch/m32r/platforms/opsput/setup.c +++ b/arch/m32r/platforms/opsput/setup.c | |||
@@ -300,101 +300,65 @@ void __init init_IRQ(void) | |||
300 | { | 300 | { |
301 | #if defined(CONFIG_SMC91X) | 301 | #if defined(CONFIG_SMC91X) |
302 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ | 302 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ |
303 | irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED; | 303 | set_irq_chip(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type); |
304 | irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type; | ||
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 */ | 304 | 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); | 305 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); |
309 | #endif /* CONFIG_SMC91X */ | 306 | #endif /* CONFIG_SMC91X */ |
310 | 307 | ||
311 | /* MFT2 : system timer */ | 308 | /* MFT2 : system timer */ |
312 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 309 | set_irq_chip(M32R_IRQ_MFT2, &opsput_irq_type); |
313 | irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type; | ||
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; | 310 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
317 | disable_opsput_irq(M32R_IRQ_MFT2); | 311 | disable_opsput_irq(M32R_IRQ_MFT2); |
318 | 312 | ||
319 | /* SIO0 : receive */ | 313 | /* SIO0 : receive */ |
320 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 314 | set_irq_chip(M32R_IRQ_SIO0_R, &opsput_irq_type); |
321 | irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type; | ||
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; | 315 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
325 | disable_opsput_irq(M32R_IRQ_SIO0_R); | 316 | disable_opsput_irq(M32R_IRQ_SIO0_R); |
326 | 317 | ||
327 | /* SIO0 : send */ | 318 | /* SIO0 : send */ |
328 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 319 | set_irq_chip(M32R_IRQ_SIO0_S, &opsput_irq_type); |
329 | irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type; | ||
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; | 320 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
333 | disable_opsput_irq(M32R_IRQ_SIO0_S); | 321 | disable_opsput_irq(M32R_IRQ_SIO0_S); |
334 | 322 | ||
335 | /* SIO1 : receive */ | 323 | /* SIO1 : receive */ |
336 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 324 | set_irq_chip(M32R_IRQ_SIO1_R, &opsput_irq_type); |
337 | irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type; | ||
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; | 325 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
341 | disable_opsput_irq(M32R_IRQ_SIO1_R); | 326 | disable_opsput_irq(M32R_IRQ_SIO1_R); |
342 | 327 | ||
343 | /* SIO1 : send */ | 328 | /* SIO1 : send */ |
344 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 329 | set_irq_chip(M32R_IRQ_SIO1_S, &opsput_irq_type); |
345 | irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type; | ||
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; | 330 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
349 | disable_opsput_irq(M32R_IRQ_SIO1_S); | 331 | disable_opsput_irq(M32R_IRQ_SIO1_S); |
350 | 332 | ||
351 | /* DMA1 : */ | 333 | /* DMA1 : */ |
352 | irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; | 334 | set_irq_chip(M32R_IRQ_DMA1, &opsput_irq_type); |
353 | irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type; | ||
354 | irq_desc[M32R_IRQ_DMA1].action = 0; | ||
355 | irq_desc[M32R_IRQ_DMA1].depth = 1; | ||
356 | icu_data[M32R_IRQ_DMA1].icucr = 0; | 335 | icu_data[M32R_IRQ_DMA1].icucr = 0; |
357 | disable_opsput_irq(M32R_IRQ_DMA1); | 336 | disable_opsput_irq(M32R_IRQ_DMA1); |
358 | 337 | ||
359 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 338 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
360 | /* INT#1: SIO0 Receive on PLD */ | 339 | /* INT#1: SIO0 Receive on PLD */ |
361 | irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; | 340 | set_irq_chip(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type); |
362 | irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type; | ||
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; | 341 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
366 | disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); | 342 | disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); |
367 | 343 | ||
368 | /* INT#1: SIO0 Send on PLD */ | 344 | /* INT#1: SIO0 Send on PLD */ |
369 | irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; | 345 | set_irq_chip(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type); |
370 | irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type; | ||
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; | 346 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | 347 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); |
375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 348 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
376 | 349 | ||
377 | /* INT#1: CFC IREQ on PLD */ | 350 | /* INT#1: CFC IREQ on PLD */ |
378 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 351 | set_irq_chip(PLD_IRQ_CFIREQ, &opsput_pld_irq_type); |
379 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; | ||
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 */ | 352 | 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); | 353 | disable_opsput_pld_irq(PLD_IRQ_CFIREQ); |
384 | 354 | ||
385 | /* INT#1: CFC Insert on PLD */ | 355 | /* INT#1: CFC Insert on PLD */ |
386 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 356 | set_irq_chip(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type); |
387 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type; | ||
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 */ | 357 | 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); | 358 | disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); |
392 | 359 | ||
393 | /* INT#1: CFC Eject on PLD */ | 360 | /* INT#1: CFC Eject on PLD */ |
394 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | 361 | set_irq_chip(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type); |
395 | irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type; | ||
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 */ | 362 | 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); | 363 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); |
400 | 364 | ||
@@ -415,10 +379,7 @@ void __init init_IRQ(void) | |||
415 | #if defined(CONFIG_USB) | 379 | #if defined(CONFIG_USB) |
416 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ | 380 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ |
417 | 381 | ||
418 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; | 382 | set_irq_chip(OPSPUT_LCD_IRQ_USB_INT1, &opsput_lcdpld_irq_type); |
419 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type; | ||
420 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0; | ||
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 */ | 383 | 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); | 384 | disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); |
424 | #endif | 385 | #endif |
@@ -433,10 +394,7 @@ void __init init_IRQ(void) | |||
433 | /* | 394 | /* |
434 | * INT3# is used for AR | 395 | * INT3# is used for AR |
435 | */ | 396 | */ |
436 | irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; | 397 | set_irq_chip(M32R_IRQ_INT3, &opsput_irq_type); |
437 | irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type; | ||
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; | 398 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
441 | disable_opsput_irq(M32R_IRQ_INT3); | 399 | disable_opsput_irq(M32R_IRQ_INT3); |
442 | #endif /* CONFIG_VIDEO_M32R_AR */ | 400 | #endif /* CONFIG_VIDEO_M32R_AR */ |