irq.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #ifndef __ASM_SH64_IRQ_H
  2. #define __ASM_SH64_IRQ_H
  3. /*
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * include/asm-sh64/irq.h
  9. *
  10. * Copyright (C) 2000, 2001 Paolo Alberelli
  11. *
  12. */
  13. /*
  14. * Encoded IRQs are not considered worth to be supported.
  15. * Main reason is that there's no per-encoded-interrupt
  16. * enable/disable mechanism (as there was in SH3/4).
  17. * An all enabled/all disabled is worth only if there's
  18. * a cascaded IC to disable/enable/ack on. Until such
  19. * IC is available there's no such support.
  20. *
  21. * Presumably Encoded IRQs may use extra IRQs beyond 64,
  22. * below. Some logic must be added to cope with IRQ_IRL?
  23. * in an exclusive way.
  24. *
  25. * Priorities are set at Platform level, when IRQ_IRL0-3
  26. * are set to 0 Encoding is allowed. Otherwise it's not
  27. * allowed.
  28. */
  29. /* Independent IRQs */
  30. #define IRQ_IRL0 0
  31. #define IRQ_IRL1 1
  32. #define IRQ_IRL2 2
  33. #define IRQ_IRL3 3
  34. #define IRQ_INTA 4
  35. #define IRQ_INTB 5
  36. #define IRQ_INTC 6
  37. #define IRQ_INTD 7
  38. #define IRQ_SERR 12
  39. #define IRQ_ERR 13
  40. #define IRQ_PWR3 14
  41. #define IRQ_PWR2 15
  42. #define IRQ_PWR1 16
  43. #define IRQ_PWR0 17
  44. #define IRQ_DMTE0 18
  45. #define IRQ_DMTE1 19
  46. #define IRQ_DMTE2 20
  47. #define IRQ_DMTE3 21
  48. #define IRQ_DAERR 22
  49. #define IRQ_TUNI0 32
  50. #define IRQ_TUNI1 33
  51. #define IRQ_TUNI2 34
  52. #define IRQ_TICPI2 35
  53. #define IRQ_ATI 36
  54. #define IRQ_PRI 37
  55. #define IRQ_CUI 38
  56. #define IRQ_ERI 39
  57. #define IRQ_RXI 40
  58. #define IRQ_BRI 41
  59. #define IRQ_TXI 42
  60. #define IRQ_ITI 63
  61. #define NR_INTC_IRQS 64
  62. #ifdef CONFIG_SH_CAYMAN
  63. #define NR_EXT_IRQS 32
  64. #define START_EXT_IRQS 64
  65. /* PCI bus 2 uses encoded external interrupts on the Cayman board */
  66. #define IRQ_P2INTA (START_EXT_IRQS + (3*8) + 0)
  67. #define IRQ_P2INTB (START_EXT_IRQS + (3*8) + 1)
  68. #define IRQ_P2INTC (START_EXT_IRQS + (3*8) + 2)
  69. #define IRQ_P2INTD (START_EXT_IRQS + (3*8) + 3)
  70. #define I8042_KBD_IRQ (START_EXT_IRQS + 2)
  71. #define I8042_AUX_IRQ (START_EXT_IRQS + 6)
  72. #define IRQ_CFCARD (START_EXT_IRQS + 7)
  73. #define IRQ_PCMCIA (0)
  74. #else
  75. #define NR_EXT_IRQS 0
  76. #endif
  77. #define NR_IRQS (NR_INTC_IRQS+NR_EXT_IRQS)
  78. /* Default IRQs, fixed */
  79. #define TIMER_IRQ IRQ_TUNI0
  80. #define RTC_IRQ IRQ_CUI
  81. /* Default Priorities, Platform may choose differently */
  82. #define NO_PRIORITY 0 /* Disabled */
  83. #define TIMER_PRIORITY 2
  84. #define RTC_PRIORITY TIMER_PRIORITY
  85. #define SCIF_PRIORITY 3
  86. #define INTD_PRIORITY 3
  87. #define IRL3_PRIORITY 4
  88. #define INTC_PRIORITY 6
  89. #define IRL2_PRIORITY 7
  90. #define INTB_PRIORITY 9
  91. #define IRL1_PRIORITY 10
  92. #define INTA_PRIORITY 12
  93. #define IRL0_PRIORITY 13
  94. #define TOP_PRIORITY 15
  95. extern int intc_evt_to_irq[(0xE20/0x20)+1];
  96. int intc_irq_describe(char* p, int irq);
  97. #define irq_canonicalize(irq) (irq)
  98. #ifdef CONFIG_SH_CAYMAN
  99. int cayman_irq_demux(int evt);
  100. int cayman_irq_describe(char* p, int irq);
  101. #define irq_demux(x) cayman_irq_demux(x)
  102. #define irq_describe(p, x) cayman_irq_describe(p, x)
  103. #else
  104. #define irq_demux(x) (intc_evt_to_irq[x])
  105. #define irq_describe(p, x) intc_irq_describe(p, x)
  106. #endif
  107. /*
  108. * Function for "on chip support modules".
  109. */
  110. /*
  111. * SH-5 supports Priority based interrupts only.
  112. * Interrupt priorities are defined at platform level.
  113. */
  114. #define set_ipr_data(a, b, c, d)
  115. #define make_ipr_irq(a)
  116. #define make_imask_irq(a)
  117. #endif /* __ASM_SH64_IRQ_H */