irq.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. * file: include/asm-blackfin/mach-bf538/irq.h
  3. * based on: include/asm-blackfin/mach-bf537/irq.h
  4. * author: Michael Hennerich (michael.hennerich@analog.com)
  5. *
  6. * created:
  7. * description:
  8. * system mmr register map
  9. * rev:
  10. *
  11. * modified:
  12. *
  13. *
  14. * bugs: enter bugs at http://blackfin.uclinux.org/
  15. *
  16. * this program is free software; you can redistribute it and/or modify
  17. * it under the terms of the gnu general public license as published by
  18. * the free software foundation; either version 2, or (at your option)
  19. * any later version.
  20. *
  21. * this program is distributed in the hope that it will be useful,
  22. * but without any warranty; without even the implied warranty of
  23. * merchantability or fitness for a particular purpose. see the
  24. * gnu general public license for more details.
  25. *
  26. * you should have received a copy of the gnu general public license
  27. * along with this program; see the file copying.
  28. * if not, write to the free software foundation,
  29. * 59 temple place - suite 330, boston, ma 02111-1307, usa.
  30. */
  31. #ifndef _BF538_IRQ_H_
  32. #define _BF538_IRQ_H_
  33. /*
  34. * Interrupt source definitions
  35. Event Source Core Event Name
  36. Core Emulation **
  37. Events (highest priority) EMU 0
  38. Reset RST 1
  39. NMI NMI 2
  40. Exception EVX 3
  41. Reserved -- 4
  42. Hardware Error IVHW 5
  43. Core Timer IVTMR 6 *
  44. .....
  45. Software Interrupt 1 IVG14 31
  46. Software Interrupt 2 --
  47. (lowest priority) IVG15 32 *
  48. */
  49. #define NR_PERI_INTS (2 * 32)
  50. /* The ABSTRACT IRQ definitions */
  51. /** the first seven of the following are fixed, the rest you change if you need to **/
  52. #define IRQ_EMU 0 /* Emulation */
  53. #define IRQ_RST 1 /* reset */
  54. #define IRQ_NMI 2 /* Non Maskable */
  55. #define IRQ_EVX 3 /* Exception */
  56. #define IRQ_UNUSED 4 /* - unused interrupt */
  57. #define IRQ_HWERR 5 /* Hardware Error */
  58. #define IRQ_CORETMR 6 /* Core timer */
  59. #define BFIN_IRQ(x) ((x) + 7)
  60. #define IRQ_PLL_WAKEUP BFIN_IRQ(0) /* PLL Wakeup Interrupt */
  61. #define IRQ_DMA0_ERROR BFIN_IRQ(1) /* DMA Error 0 (generic) */
  62. #define IRQ_PPI_ERROR BFIN_IRQ(2) /* PPI Error */
  63. #define IRQ_SPORT0_ERROR BFIN_IRQ(3) /* SPORT0 Status */
  64. #define IRQ_SPORT1_ERROR BFIN_IRQ(4) /* SPORT1 Status */
  65. #define IRQ_SPI0_ERROR BFIN_IRQ(5) /* SPI0 Status */
  66. #define IRQ_UART0_ERROR BFIN_IRQ(6) /* UART0 Status */
  67. #define IRQ_RTC BFIN_IRQ(7) /* RTC */
  68. #define IRQ_PPI BFIN_IRQ(8) /* DMA Channel 0 (PPI) */
  69. #define IRQ_SPORT0_RX BFIN_IRQ(9) /* DMA 1 Channel (SPORT0 RX) */
  70. #define IRQ_SPORT0_TX BFIN_IRQ(10) /* DMA 2 Channel (SPORT0 TX) */
  71. #define IRQ_SPORT1_RX BFIN_IRQ(11) /* DMA 3 Channel (SPORT1 RX) */
  72. #define IRQ_SPORT1_TX BFIN_IRQ(12) /* DMA 4 Channel (SPORT1 TX) */
  73. #define IRQ_SPI0 BFIN_IRQ(13) /* DMA 5 Channel (SPI0) */
  74. #define IRQ_UART0_RX BFIN_IRQ(14) /* DMA 6 Channel (UART0 RX) */
  75. #define IRQ_UART0_TX BFIN_IRQ(15) /* DMA 7 Channel (UART0 TX) */
  76. #define IRQ_TIMER0 BFIN_IRQ(16) /* Timer 0 */
  77. #define IRQ_TIMER1 BFIN_IRQ(17) /* Timer 1 */
  78. #define IRQ_TIMER2 BFIN_IRQ(18) /* Timer 2 */
  79. #define IRQ_PORTF_INTA BFIN_IRQ(19) /* Port F Interrupt A */
  80. #define IRQ_PORTF_INTB BFIN_IRQ(20) /* Port F Interrupt B */
  81. #define IRQ_MEM0_DMA0 BFIN_IRQ(21) /* MDMA0 Stream 0 */
  82. #define IRQ_MEM0_DMA1 BFIN_IRQ(22) /* MDMA0 Stream 1 */
  83. #define IRQ_WATCH BFIN_IRQ(23) /* Software Watchdog Timer */
  84. #define IRQ_DMA1_ERROR BFIN_IRQ(24) /* DMA Error 1 (generic) */
  85. #define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Status */
  86. #define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Status */
  87. #define IRQ_SPI1_ERROR BFIN_IRQ(28) /* SPI1 Status */
  88. #define IRQ_SPI2_ERROR BFIN_IRQ(29) /* SPI2 Status */
  89. #define IRQ_UART1_ERROR BFIN_IRQ(30) /* UART1 Status */
  90. #define IRQ_UART2_ERROR BFIN_IRQ(31) /* UART2 Status */
  91. #define IRQ_CAN_ERROR BFIN_IRQ(32) /* CAN Status (Error) Interrupt */
  92. #define IRQ_SPORT2_RX BFIN_IRQ(33) /* DMA 8 Channel (SPORT2 RX) */
  93. #define IRQ_SPORT2_TX BFIN_IRQ(34) /* DMA 9 Channel (SPORT2 TX) */
  94. #define IRQ_SPORT3_RX BFIN_IRQ(35) /* DMA 10 Channel (SPORT3 RX) */
  95. #define IRQ_SPORT3_TX BFIN_IRQ(36) /* DMA 11 Channel (SPORT3 TX) */
  96. #define IRQ_SPI1 BFIN_IRQ(39) /* DMA 14 Channel (SPI1) */
  97. #define IRQ_SPI2 BFIN_IRQ(40) /* DMA 15 Channel (SPI2) */
  98. #define IRQ_UART1_RX BFIN_IRQ(41) /* DMA 16 Channel (UART1 RX) */
  99. #define IRQ_UART1_TX BFIN_IRQ(42) /* DMA 17 Channel (UART1 TX) */
  100. #define IRQ_UART2_RX BFIN_IRQ(43) /* DMA 18 Channel (UART2 RX) */
  101. #define IRQ_UART2_TX BFIN_IRQ(44) /* DMA 19 Channel (UART2 TX) */
  102. #define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 */
  103. #define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 */
  104. #define IRQ_CAN_RX BFIN_IRQ(47) /* CAN Receive Interrupt */
  105. #define IRQ_CAN_TX BFIN_IRQ(48) /* CAN Transmit Interrupt */
  106. #define IRQ_MEM1_DMA0 BFIN_IRQ(49) /* MDMA1 Stream 0 */
  107. #define IRQ_MEM1_DMA1 BFIN_IRQ(50) /* MDMA1 Stream 1 */
  108. #define SYS_IRQS BFIN_IRQ(63) /* 70 */
  109. #define IRQ_PF0 71
  110. #define IRQ_PF1 72
  111. #define IRQ_PF2 73
  112. #define IRQ_PF3 74
  113. #define IRQ_PF4 75
  114. #define IRQ_PF5 76
  115. #define IRQ_PF6 77
  116. #define IRQ_PF7 78
  117. #define IRQ_PF8 79
  118. #define IRQ_PF9 80
  119. #define IRQ_PF10 81
  120. #define IRQ_PF11 82
  121. #define IRQ_PF12 83
  122. #define IRQ_PF13 84
  123. #define IRQ_PF14 85
  124. #define IRQ_PF15 86
  125. #define GPIO_IRQ_BASE IRQ_PF0
  126. #define NR_IRQS (IRQ_PF15+1)
  127. #define IVG7 7
  128. #define IVG8 8
  129. #define IVG9 9
  130. #define IVG10 10
  131. #define IVG11 11
  132. #define IVG12 12
  133. #define IVG13 13
  134. #define IVG14 14
  135. #define IVG15 15
  136. /* IAR0 BIT FIELDS */
  137. #define IRQ_PLL_WAKEUP_POS 0
  138. #define IRQ_DMA0_ERROR_POS 4
  139. #define IRQ_PPI_ERROR_POS 8
  140. #define IRQ_SPORT0_ERROR_POS 12
  141. #define IRQ_SPORT1_ERROR_POS 16
  142. #define IRQ_SPI0_ERROR_POS 20
  143. #define IRQ_UART0_ERROR_POS 24
  144. #define IRQ_RTC_POS 28
  145. /* IAR1 BIT FIELDS */
  146. #define IRQ_PPI_POS 0
  147. #define IRQ_SPORT0_RX_POS 4
  148. #define IRQ_SPORT0_TX_POS 8
  149. #define IRQ_SPORT1_RX_POS 12
  150. #define IRQ_SPORT1_TX_POS 16
  151. #define IRQ_SPI0_POS 20
  152. #define IRQ_UART0_RX_POS 24
  153. #define IRQ_UART0_TX_POS 28
  154. /* IAR2 BIT FIELDS */
  155. #define IRQ_TIMER0_POS 0
  156. #define IRQ_TIMER1_POS 4
  157. #define IRQ_TIMER2_POS 8
  158. #define IRQ_PORTF_INTA_POS 12
  159. #define IRQ_PORTF_INTB_POS 16
  160. #define IRQ_MEM0_DMA0_POS 20
  161. #define IRQ_MEM0_DMA1_POS 24
  162. #define IRQ_WATCH_POS 28
  163. /* IAR3 BIT FIELDS */
  164. #define IRQ_DMA1_ERROR_POS 0
  165. #define IRQ_SPORT2_ERROR_POS 4
  166. #define IRQ_SPORT3_ERROR_POS 8
  167. #define IRQ_SPI1_ERROR_POS 16
  168. #define IRQ_SPI2_ERROR_POS 20
  169. #define IRQ_UART1_ERROR_POS 24
  170. #define IRQ_UART2_ERROR_POS 28
  171. /* IAR4 BIT FIELDS */
  172. #define IRQ_CAN_ERROR_POS 0
  173. #define IRQ_SPORT2_RX_POS 4
  174. #define IRQ_SPORT2_TX_POS 8
  175. #define IRQ_SPORT3_RX_POS 12
  176. #define IRQ_SPORT3_TX_POS 16
  177. #define IRQ_SPI1_POS 28
  178. /* IAR5 BIT FIELDS */
  179. #define IRQ_SPI2_POS 0
  180. #define IRQ_UART1_RX_POS 4
  181. #define IRQ_UART1_TX_POS 8
  182. #define IRQ_UART2_RX_POS 12
  183. #define IRQ_UART2_TX_POS 16
  184. #define IRQ_TWI0_POS 20
  185. #define IRQ_TWI1_POS 24
  186. #define IRQ_CAN_RX_POS 28
  187. /* IAR6 BIT FIELDS */
  188. #define IRQ_CAN_TX_POS 0
  189. #define IRQ_MEM1_DMA0_POS 4
  190. #define IRQ_MEM1_DMA1_POS 8
  191. #endif /* _BF538_IRQ_H_ */