irq.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1992 Linus Torvalds
  7. * Copyright (C) 1994 - 2000 Ralf Baechle
  8. * Copyright (C) 2006 Thomas Bogendoerfer
  9. */
  10. #include <linux/delay.h>
  11. #include <linux/init.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/irq.h>
  14. #include <linux/kernel.h>
  15. #include <asm/i8259.h>
  16. #include <asm/io.h>
  17. #include <asm/sni.h>
  18. #include <asm/irq.h>
  19. #include <asm/irq_cpu.h>
  20. void (*sni_hwint)(void);
  21. asmlinkage void plat_irq_dispatch(void)
  22. {
  23. sni_hwint();
  24. }
  25. /* ISA irq handler */
  26. static irqreturn_t sni_isa_irq_handler(int dummy, void *p)
  27. {
  28. int irq;
  29. irq = i8259_irq();
  30. if (unlikely(irq < 0))
  31. return IRQ_NONE;
  32. generic_handle_irq(irq);
  33. return IRQ_HANDLED;
  34. }
  35. struct irqaction sni_isa_irq = {
  36. .handler = sni_isa_irq_handler,
  37. .name = "ISA",
  38. .flags = IRQF_SHARED
  39. };
  40. /*
  41. * On systems with i8259-style interrupt controllers we assume for
  42. * driver compatibility reasons interrupts 0 - 15 to be the i8295
  43. * interrupts even if the hardware uses a different interrupt numbering.
  44. */
  45. void __init arch_init_irq(void)
  46. {
  47. init_i8259_irqs(); /* Integrated i8259 */
  48. switch (sni_brd_type) {
  49. case SNI_BRD_10:
  50. case SNI_BRD_10NEW:
  51. case SNI_BRD_TOWER_OASIC:
  52. case SNI_BRD_MINITOWER:
  53. sni_a20r_irq_init();
  54. break;
  55. case SNI_BRD_PCI_TOWER:
  56. sni_pcit_irq_init();
  57. break;
  58. case SNI_BRD_PCI_TOWER_CPLUS:
  59. sni_pcit_cplus_irq_init();
  60. break;
  61. case SNI_BRD_RM200:
  62. sni_rm200_irq_init();
  63. break;
  64. case SNI_BRD_PCI_MTOWER:
  65. case SNI_BRD_PCI_DESKTOP:
  66. case SNI_BRD_PCI_MTOWER_CPLUS:
  67. sni_pcimt_irq_init();
  68. break;
  69. }
  70. }