irq.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. /*
  2. * Copyright 2005-2008 Analog Devices Inc.
  3. *
  4. * Licensed under the GPL-2 or later.
  5. */
  6. #ifndef _BF561_IRQ_H_
  7. #define _BF561_IRQ_H_
  8. #include <mach-common/irq.h>
  9. #define SYS_IRQS 71
  10. #define NR_PERI_INTS 64
  11. #define IVG_BASE 7
  12. /* IVG 7 */
  13. #define IRQ_PLL_WAKEUP (IVG_BASE + 0) /* PLL Wakeup Interrupt */
  14. #define IRQ_DMA1_ERROR (IVG_BASE + 1) /* DMA1 Error (general) */
  15. #define IRQ_DMA_ERROR IRQ_DMA1_ERROR /* DMA1 Error (general) */
  16. #define IRQ_DMA2_ERROR (IVG_BASE + 2) /* DMA2 Error (general) */
  17. #define IRQ_IMDMA_ERROR (IVG_BASE + 3) /* IMDMA Error Interrupt */
  18. #define IRQ_PPI1_ERROR (IVG_BASE + 4) /* PPI1 Error Interrupt */
  19. #define IRQ_PPI_ERROR IRQ_PPI1_ERROR /* PPI1 Error Interrupt */
  20. #define IRQ_PPI2_ERROR (IVG_BASE + 5) /* PPI2 Error Interrupt */
  21. #define IRQ_SPORT0_ERROR (IVG_BASE + 6) /* SPORT0 Error Interrupt */
  22. #define IRQ_SPORT1_ERROR (IVG_BASE + 7) /* SPORT1 Error Interrupt */
  23. #define IRQ_SPI_ERROR (IVG_BASE + 8) /* SPI Error Interrupt */
  24. #define IRQ_UART_ERROR (IVG_BASE + 9) /* UART Error Interrupt */
  25. #define IRQ_RESERVED_ERROR (IVG_BASE + 10) /* Reversed Interrupt */
  26. /* IVG 8 */
  27. #define IRQ_DMA1_0 (IVG_BASE + 11) /* DMA1 0 Interrupt(PPI1) */
  28. #define IRQ_PPI IRQ_DMA1_0 /* DMA1 0 Interrupt(PPI1) */
  29. #define IRQ_PPI0 IRQ_DMA1_0 /* DMA1 0 Interrupt(PPI1) */
  30. #define IRQ_DMA1_1 (IVG_BASE + 12) /* DMA1 1 Interrupt(PPI2) */
  31. #define IRQ_PPI1 IRQ_DMA1_1 /* DMA1 1 Interrupt(PPI2) */
  32. #define IRQ_DMA1_2 (IVG_BASE + 13) /* DMA1 2 Interrupt */
  33. #define IRQ_DMA1_3 (IVG_BASE + 14) /* DMA1 3 Interrupt */
  34. #define IRQ_DMA1_4 (IVG_BASE + 15) /* DMA1 4 Interrupt */
  35. #define IRQ_DMA1_5 (IVG_BASE + 16) /* DMA1 5 Interrupt */
  36. #define IRQ_DMA1_6 (IVG_BASE + 17) /* DMA1 6 Interrupt */
  37. #define IRQ_DMA1_7 (IVG_BASE + 18) /* DMA1 7 Interrupt */
  38. #define IRQ_DMA1_8 (IVG_BASE + 19) /* DMA1 8 Interrupt */
  39. #define IRQ_DMA1_9 (IVG_BASE + 20) /* DMA1 9 Interrupt */
  40. #define IRQ_DMA1_10 (IVG_BASE + 21) /* DMA1 10 Interrupt */
  41. #define IRQ_DMA1_11 (IVG_BASE + 22) /* DMA1 11 Interrupt */
  42. /* IVG 9 */
  43. #define IRQ_DMA2_0 (IVG_BASE + 23) /* DMA2 0 (SPORT0 RX) */
  44. #define IRQ_SPORT0_RX IRQ_DMA2_0 /* DMA2 0 (SPORT0 RX) */
  45. #define IRQ_DMA2_1 (IVG_BASE + 24) /* DMA2 1 (SPORT0 TX) */
  46. #define IRQ_SPORT0_TX IRQ_DMA2_1 /* DMA2 1 (SPORT0 TX) */
  47. #define IRQ_DMA2_2 (IVG_BASE + 25) /* DMA2 2 (SPORT1 RX) */
  48. #define IRQ_SPORT1_RX IRQ_DMA2_2 /* DMA2 2 (SPORT1 RX) */
  49. #define IRQ_DMA2_3 (IVG_BASE + 26) /* DMA2 3 (SPORT2 TX) */
  50. #define IRQ_SPORT1_TX IRQ_DMA2_3 /* DMA2 3 (SPORT2 TX) */
  51. #define IRQ_DMA2_4 (IVG_BASE + 27) /* DMA2 4 (SPI) */
  52. #define IRQ_SPI IRQ_DMA2_4 /* DMA2 4 (SPI) */
  53. #define IRQ_DMA2_5 (IVG_BASE + 28) /* DMA2 5 (UART RX) */
  54. #define IRQ_UART_RX IRQ_DMA2_5 /* DMA2 5 (UART RX) */
  55. #define IRQ_DMA2_6 (IVG_BASE + 29) /* DMA2 6 (UART TX) */
  56. #define IRQ_UART_TX IRQ_DMA2_6 /* DMA2 6 (UART TX) */
  57. #define IRQ_DMA2_7 (IVG_BASE + 30) /* DMA2 7 Interrupt */
  58. #define IRQ_DMA2_8 (IVG_BASE + 31) /* DMA2 8 Interrupt */
  59. #define IRQ_DMA2_9 (IVG_BASE + 32) /* DMA2 9 Interrupt */
  60. #define IRQ_DMA2_10 (IVG_BASE + 33) /* DMA2 10 Interrupt */
  61. #define IRQ_DMA2_11 (IVG_BASE + 34) /* DMA2 11 Interrupt */
  62. /* IVG 10 */
  63. #define IRQ_TIMER0 (IVG_BASE + 35) /* TIMER 0 Interrupt */
  64. #define IRQ_TIMER1 (IVG_BASE + 36) /* TIMER 1 Interrupt */
  65. #define IRQ_TIMER2 (IVG_BASE + 37) /* TIMER 2 Interrupt */
  66. #define IRQ_TIMER3 (IVG_BASE + 38) /* TIMER 3 Interrupt */
  67. #define IRQ_TIMER4 (IVG_BASE + 39) /* TIMER 4 Interrupt */
  68. #define IRQ_TIMER5 (IVG_BASE + 40) /* TIMER 5 Interrupt */
  69. #define IRQ_TIMER6 (IVG_BASE + 41) /* TIMER 6 Interrupt */
  70. #define IRQ_TIMER7 (IVG_BASE + 42) /* TIMER 7 Interrupt */
  71. #define IRQ_TIMER8 (IVG_BASE + 43) /* TIMER 8 Interrupt */
  72. #define IRQ_TIMER9 (IVG_BASE + 44) /* TIMER 9 Interrupt */
  73. #define IRQ_TIMER10 (IVG_BASE + 45) /* TIMER 10 Interrupt */
  74. #define IRQ_TIMER11 (IVG_BASE + 46) /* TIMER 11 Interrupt */
  75. /* IVG 11 */
  76. #define IRQ_PROG0_INTA (IVG_BASE + 47) /* Programmable Flags0 A (8) */
  77. #define IRQ_PROG_INTA IRQ_PROG0_INTA /* Programmable Flags0 A (8) */
  78. #define IRQ_PROG0_INTB (IVG_BASE + 48) /* Programmable Flags0 B (8) */
  79. #define IRQ_PROG_INTB IRQ_PROG0_INTB /* Programmable Flags0 B (8) */
  80. #define IRQ_PROG1_INTA (IVG_BASE + 49) /* Programmable Flags1 A (8) */
  81. #define IRQ_PROG1_INTB (IVG_BASE + 50) /* Programmable Flags1 B (8) */
  82. #define IRQ_PROG2_INTA (IVG_BASE + 51) /* Programmable Flags2 A (8) */
  83. #define IRQ_PROG2_INTB (IVG_BASE + 52) /* Programmable Flags2 B (8) */
  84. /* IVG 8 */
  85. #define IRQ_DMA1_WRRD0 (IVG_BASE + 53) /* MDMA1 0 write/read INT */
  86. #define IRQ_DMA_WRRD0 IRQ_DMA1_WRRD0 /* MDMA1 0 write/read INT */
  87. #define IRQ_MEM_DMA0 IRQ_DMA1_WRRD0
  88. #define IRQ_DMA1_WRRD1 (IVG_BASE + 54) /* MDMA1 1 write/read INT */
  89. #define IRQ_DMA_WRRD1 IRQ_DMA1_WRRD1 /* MDMA1 1 write/read INT */
  90. #define IRQ_MEM_DMA1 IRQ_DMA1_WRRD1
  91. /* IVG 9 */
  92. #define IRQ_DMA2_WRRD0 (IVG_BASE + 55) /* MDMA2 0 write/read INT */
  93. #define IRQ_MEM_DMA2 IRQ_DMA2_WRRD0
  94. #define IRQ_DMA2_WRRD1 (IVG_BASE + 56) /* MDMA2 1 write/read INT */
  95. #define IRQ_MEM_DMA3 IRQ_DMA2_WRRD1
  96. /* IVG 12 */
  97. #define IRQ_IMDMA_WRRD0 (IVG_BASE + 57) /* IMDMA 0 write/read INT */
  98. #define IRQ_IMEM_DMA0 IRQ_IMDMA_WRRD0
  99. #define IRQ_IMDMA_WRRD1 (IVG_BASE + 58) /* IMDMA 1 write/read INT */
  100. #define IRQ_IMEM_DMA1 IRQ_IMDMA_WRRD1
  101. /* IVG 13 */
  102. #define IRQ_WATCH (IVG_BASE + 59) /* Watch Dog Timer */
  103. /* IVG 7 */
  104. #define IRQ_RESERVED_1 (IVG_BASE + 60) /* Reserved interrupt */
  105. #define IRQ_RESERVED_2 (IVG_BASE + 61) /* Reserved interrupt */
  106. #define IRQ_SUPPLE_0 (IVG_BASE + 62) /* Supplemental interrupt 0 */
  107. #define IRQ_SUPPLE_1 (IVG_BASE + 63) /* supplemental interrupt 1 */
  108. #define IRQ_PF0 73
  109. #define IRQ_PF1 74
  110. #define IRQ_PF2 75
  111. #define IRQ_PF3 76
  112. #define IRQ_PF4 77
  113. #define IRQ_PF5 78
  114. #define IRQ_PF6 79
  115. #define IRQ_PF7 80
  116. #define IRQ_PF8 81
  117. #define IRQ_PF9 82
  118. #define IRQ_PF10 83
  119. #define IRQ_PF11 84
  120. #define IRQ_PF12 85
  121. #define IRQ_PF13 86
  122. #define IRQ_PF14 87
  123. #define IRQ_PF15 88
  124. #define IRQ_PF16 89
  125. #define IRQ_PF17 90
  126. #define IRQ_PF18 91
  127. #define IRQ_PF19 92
  128. #define IRQ_PF20 93
  129. #define IRQ_PF21 94
  130. #define IRQ_PF22 95
  131. #define IRQ_PF23 96
  132. #define IRQ_PF24 97
  133. #define IRQ_PF25 98
  134. #define IRQ_PF26 99
  135. #define IRQ_PF27 100
  136. #define IRQ_PF28 101
  137. #define IRQ_PF29 102
  138. #define IRQ_PF30 103
  139. #define IRQ_PF31 104
  140. #define IRQ_PF32 105
  141. #define IRQ_PF33 106
  142. #define IRQ_PF34 107
  143. #define IRQ_PF35 108
  144. #define IRQ_PF36 109
  145. #define IRQ_PF37 110
  146. #define IRQ_PF38 111
  147. #define IRQ_PF39 112
  148. #define IRQ_PF40 113
  149. #define IRQ_PF41 114
  150. #define IRQ_PF42 115
  151. #define IRQ_PF43 116
  152. #define IRQ_PF44 117
  153. #define IRQ_PF45 118
  154. #define IRQ_PF46 119
  155. #define IRQ_PF47 120
  156. #define GPIO_IRQ_BASE IRQ_PF0
  157. #define NR_MACH_IRQS (IRQ_PF47 + 1)
  158. /*
  159. * DEFAULT PRIORITIES:
  160. */
  161. #define CONFIG_DEF_PLL_WAKEUP 7
  162. #define CONFIG_DEF_DMA1_ERROR 7
  163. #define CONFIG_DEF_DMA2_ERROR 7
  164. #define CONFIG_DEF_IMDMA_ERROR 7
  165. #define CONFIG_DEF_PPI1_ERROR 7
  166. #define CONFIG_DEF_PPI2_ERROR 7
  167. #define CONFIG_DEF_SPORT0_ERROR 7
  168. #define CONFIG_DEF_SPORT1_ERROR 7
  169. #define CONFIG_DEF_SPI_ERROR 7
  170. #define CONFIG_DEF_UART_ERROR 7
  171. #define CONFIG_DEF_RESERVED_ERROR 7
  172. #define CONFIG_DEF_DMA1_0 8
  173. #define CONFIG_DEF_DMA1_1 8
  174. #define CONFIG_DEF_DMA1_2 8
  175. #define CONFIG_DEF_DMA1_3 8
  176. #define CONFIG_DEF_DMA1_4 8
  177. #define CONFIG_DEF_DMA1_5 8
  178. #define CONFIG_DEF_DMA1_6 8
  179. #define CONFIG_DEF_DMA1_7 8
  180. #define CONFIG_DEF_DMA1_8 8
  181. #define CONFIG_DEF_DMA1_9 8
  182. #define CONFIG_DEF_DMA1_10 8
  183. #define CONFIG_DEF_DMA1_11 8
  184. #define CONFIG_DEF_DMA2_0 9
  185. #define CONFIG_DEF_DMA2_1 9
  186. #define CONFIG_DEF_DMA2_2 9
  187. #define CONFIG_DEF_DMA2_3 9
  188. #define CONFIG_DEF_DMA2_4 9
  189. #define CONFIG_DEF_DMA2_5 9
  190. #define CONFIG_DEF_DMA2_6 9
  191. #define CONFIG_DEF_DMA2_7 9
  192. #define CONFIG_DEF_DMA2_8 9
  193. #define CONFIG_DEF_DMA2_9 9
  194. #define CONFIG_DEF_DMA2_10 9
  195. #define CONFIG_DEF_DMA2_11 9
  196. #define CONFIG_DEF_TIMER0 10
  197. #define CONFIG_DEF_TIMER1 10
  198. #define CONFIG_DEF_TIMER2 10
  199. #define CONFIG_DEF_TIMER3 10
  200. #define CONFIG_DEF_TIMER4 10
  201. #define CONFIG_DEF_TIMER5 10
  202. #define CONFIG_DEF_TIMER6 10
  203. #define CONFIG_DEF_TIMER7 10
  204. #define CONFIG_DEF_TIMER8 10
  205. #define CONFIG_DEF_TIMER9 10
  206. #define CONFIG_DEF_TIMER10 10
  207. #define CONFIG_DEF_TIMER11 10
  208. #define CONFIG_DEF_PROG0_INTA 11
  209. #define CONFIG_DEF_PROG0_INTB 11
  210. #define CONFIG_DEF_PROG1_INTA 11
  211. #define CONFIG_DEF_PROG1_INTB 11
  212. #define CONFIG_DEF_PROG2_INTA 11
  213. #define CONFIG_DEF_PROG2_INTB 11
  214. #define CONFIG_DEF_DMA1_WRRD0 8
  215. #define CONFIG_DEF_DMA1_WRRD1 8
  216. #define CONFIG_DEF_DMA2_WRRD0 9
  217. #define CONFIG_DEF_DMA2_WRRD1 9
  218. #define CONFIG_DEF_IMDMA_WRRD0 12
  219. #define CONFIG_DEF_IMDMA_WRRD1 12
  220. #define CONFIG_DEF_WATCH 13
  221. #define CONFIG_DEF_RESERVED_1 7
  222. #define CONFIG_DEF_RESERVED_2 7
  223. #define CONFIG_DEF_SUPPLE_0 7
  224. #define CONFIG_DEF_SUPPLE_1 7
  225. /* IAR0 BIT FIELDS */
  226. #define IRQ_PLL_WAKEUP_POS 0
  227. #define IRQ_DMA1_ERROR_POS 4
  228. #define IRQ_DMA2_ERROR_POS 8
  229. #define IRQ_IMDMA_ERROR_POS 12
  230. #define IRQ_PPI0_ERROR_POS 16
  231. #define IRQ_PPI1_ERROR_POS 20
  232. #define IRQ_SPORT0_ERROR_POS 24
  233. #define IRQ_SPORT1_ERROR_POS 28
  234. /* IAR1 BIT FIELDS */
  235. #define IRQ_SPI_ERROR_POS 0
  236. #define IRQ_UART_ERROR_POS 4
  237. #define IRQ_RESERVED_ERROR_POS 8
  238. #define IRQ_DMA1_0_POS 12
  239. #define IRQ_DMA1_1_POS 16
  240. #define IRQ_DMA1_2_POS 20
  241. #define IRQ_DMA1_3_POS 24
  242. #define IRQ_DMA1_4_POS 28
  243. /* IAR2 BIT FIELDS */
  244. #define IRQ_DMA1_5_POS 0
  245. #define IRQ_DMA1_6_POS 4
  246. #define IRQ_DMA1_7_POS 8
  247. #define IRQ_DMA1_8_POS 12
  248. #define IRQ_DMA1_9_POS 16
  249. #define IRQ_DMA1_10_POS 20
  250. #define IRQ_DMA1_11_POS 24
  251. #define IRQ_DMA2_0_POS 28
  252. /* IAR3 BIT FIELDS */
  253. #define IRQ_DMA2_1_POS 0
  254. #define IRQ_DMA2_2_POS 4
  255. #define IRQ_DMA2_3_POS 8
  256. #define IRQ_DMA2_4_POS 12
  257. #define IRQ_DMA2_5_POS 16
  258. #define IRQ_DMA2_6_POS 20
  259. #define IRQ_DMA2_7_POS 24
  260. #define IRQ_DMA2_8_POS 28
  261. /* IAR4 BIT FIELDS */
  262. #define IRQ_DMA2_9_POS 0
  263. #define IRQ_DMA2_10_POS 4
  264. #define IRQ_DMA2_11_POS 8
  265. #define IRQ_TIMER0_POS 12
  266. #define IRQ_TIMER1_POS 16
  267. #define IRQ_TIMER2_POS 20
  268. #define IRQ_TIMER3_POS 24
  269. #define IRQ_TIMER4_POS 28
  270. /* IAR5 BIT FIELDS */
  271. #define IRQ_TIMER5_POS 0
  272. #define IRQ_TIMER6_POS 4
  273. #define IRQ_TIMER7_POS 8
  274. #define IRQ_TIMER8_POS 12
  275. #define IRQ_TIMER9_POS 16
  276. #define IRQ_TIMER10_POS 20
  277. #define IRQ_TIMER11_POS 24
  278. #define IRQ_PROG0_INTA_POS 28
  279. /* IAR6 BIT FIELDS */
  280. #define IRQ_PROG0_INTB_POS 0
  281. #define IRQ_PROG1_INTA_POS 4
  282. #define IRQ_PROG1_INTB_POS 8
  283. #define IRQ_PROG2_INTA_POS 12
  284. #define IRQ_PROG2_INTB_POS 16
  285. #define IRQ_DMA1_WRRD0_POS 20
  286. #define IRQ_DMA1_WRRD1_POS 24
  287. #define IRQ_DMA2_WRRD0_POS 28
  288. /* IAR7 BIT FIELDS */
  289. #define IRQ_DMA2_WRRD1_POS 0
  290. #define IRQ_IMDMA_WRRD0_POS 4
  291. #define IRQ_IMDMA_WRRD1_POS 8
  292. #define IRQ_WDTIMER_POS 12
  293. #define IRQ_RESERVED_1_POS 16
  294. #define IRQ_RESERVED_2_POS 20
  295. #define IRQ_SUPPLE_0_POS 24
  296. #define IRQ_SUPPLE_1_POS 28
  297. #endif /* _BF561_IRQ_H_ */