sysEpic.h
上传用户:dqzhongke1
上传日期:2022-06-26
资源大小:667k
文件大小:30k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* sysEpic.h - Embedded Programmable Interrupt Controller (EPIC) driver */
  2. /*
  3.  * Copyright (c) 2005-2006 Wind River Systems, Inc.
  4.  *
  5.  * The right to copy, distribute, modify, or otherwise make use
  6.  * of this software may be licensed only pursuant to the terms
  7.  * of an applicable Wind River license agreement.
  8.  */
  9. /* Copyright 1996, 1998 Motorola, Inc. */
  10. /*
  11. modification history
  12. --------------------
  13. 01b,27jan06,dtr  Tidy up - coding conventions.
  14. 01a,06may05,dtr  Modified for 8548 from cds85xx/01h
  15. */
  16. #ifndef __INCsysEpich
  17. #define __INCsysEpich
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /*  interrupt handler description  */
  22.     
  23. typedef struct intHandlerDesc     
  24.     {
  25.     VOIDFUNCPTR vec; /* interrupt vector */
  26.     int arg; /* interrupt handler argument */
  27.     struct  intHandlerDesc * next; /* pointer to the next handler */
  28.     } INT_HANDLER_DESC;
  29. /*   limit values  */
  30. /* bits 31(MSB)...0(LSB) enable only 1 bit at bit x */
  31. #define EPIC_BIT(x)          (1 << (x))
  32. /* bits 31(MSB)...0(LSB) enable from bit x to bit y where y>x */
  33. #define EPIC_BITS_M2N(x, y)  (( 1 << ((y)-(x)+1) ) - 1) << (x)
  34. /* bits 31(MSB)...0(LSB) from bit x towards LSB enable y bits */          
  35. #define EPIC_BITS(x, y)      EPIC_BITS_M2N(x-y+1, x)
  36. #define  INTERRUPT_TABLESIZE   256
  37.     
  38. #define EPIC_CCSROFF   0x40000 /* EUMBBAR of EPIC  */
  39. /* default is LEVEL sensitive, ACTIVE_HIGH polarity */
  40. #ifndef EPIC_EX_DFT_SENSE
  41. #   define EPIC_EX_DFT_SENSE EPIC_SENSE_LVL
  42. #endif  /* EPIC_EX_DFT_SENSE */
  43. #ifndef EPIC_EX_DFT_POLAR
  44. #   define EPIC_EX_DFT_POLAR EPIC_INT_ACT_HIGH
  45. #endif  /* EPIC_EX_DFT_POLAR */
  46. #ifndef EPIC_IN_DFT_POLAR
  47. #   define EPIC_IN_DFT_POLAR EPIC_INT_ACT_HIGH
  48. #endif  /* EPIC_IN_DFT_POLAR */
  49. /*   Private Access Registers  */
  50. #define EPIC_IPI_DPATCH_REG0 (EPIC_CCSROFF + 0x00040)/* IPI0 dispatch */
  51. #define EPIC_IPI_DPATCH_REG1 (EPIC_CCSROFF + 0x00050)/* IPI1 dispatch */
  52. #define EPIC_IPI_DPATCH_REG2 (EPIC_CCSROFF + 0x00060)/* IPI2 dispatch */
  53. #define EPIC_IPI_DPATCH_REG3 (EPIC_CCSROFF + 0x00070)/* IPI3 dispatch */
  54. #define EPIC_CTASK_PRI_REG (EPIC_CCSROFF + 0x00080)/* Cur Task Prio */
  55. #define EPIC_WHO_AM_I_REG (EPIC_CCSROFF + 0x00090)/* Who am I */
  56. #define EPIC_INT_ACK_REG (EPIC_CCSROFF + 0x000a0)/* Int ack */
  57. #define EPIC_EOI_REG (EPIC_CCSROFF + 0x000b0)/* End of Int */
  58. /*   Global and Timer  */
  59. #define EPIC_FEATURES_REG (EPIC_CCSROFF + 0x01000)/* Feature reporting */
  60. #define EPIC_GLOBAL_REG (EPIC_CCSROFF + 0x01020)/* Global config.  */
  61. #define EPIC_VENDOR_ID_REG (EPIC_CCSROFF + 0x01080)/* Vendor id */
  62. #define EPIC_PROC_INIT_REG (EPIC_CCSROFF + 0x01090)/* Processor init. */
  63. #define EPIC_IPI_0_VEC_REG (EPIC_CCSROFF + 0x010a0)/* IPI0 vect/prio */
  64. #define EPIC_IPI_1_VEC_REG (EPIC_CCSROFF + 0x010b0)/* IPI1 vect/prio */
  65. #define EPIC_IPI_2_VEC_REG (EPIC_CCSROFF + 0x010c0)/* IPI2 vect/prio */
  66. #define EPIC_IPI_3_VEC_REG (EPIC_CCSROFF + 0x010d0)/* IPI3 vect/prio */
  67. #define EPIC_SPUR_VEC_REG (EPIC_CCSROFF + 0x010e0)/* Spurious vector */
  68. #define EPIC_TM_FREQ_REG (EPIC_CCSROFF + 0x010f0)/* Timer Frequency */
  69. #define EPIC_TM0_CUR_COUNT_REG (EPIC_CCSROFF + 0x01100)/* Gbl TM0 Cur. Count*/
  70. #define EPIC_TM0_BASE_COUNT_REG (EPIC_CCSROFF + 0x01110)/* Gbl TM0 Base Count*/
  71. #define EPIC_TM0_VEC_REG (EPIC_CCSROFF + 0x01120)/* Gbl TM0 Vector Pri*/
  72. #define EPIC_TM0_DES_REG (EPIC_CCSROFF + 0x01130)/* Gbl TM0 Dest. */
  73. #define EPIC_TM1_CUR_COUNT_REG (EPIC_CCSROFF + 0x01140)/* Gbl TM1 Cur. Count*/
  74. #define EPIC_TM1_BASE_COUNT_REG (EPIC_CCSROFF + 0x01150)/* Gbl TM1 Base Count*/
  75. #define EPIC_TM1_VEC_REG (EPIC_CCSROFF + 0x01160)/* Gbl TM1 Vector Pri*/
  76. #define EPIC_TM1_DES_REG (EPIC_CCSROFF + 0x01170)/* Gbl TM1 Dest. */
  77. #define EPIC_TM2_CUR_COUNT_REG (EPIC_CCSROFF + 0x01180)/* Gbl TM2 Cur. Count*/
  78. #define EPIC_TM2_BASE_COUNT_REG (EPIC_CCSROFF + 0x01190)/* Gbl TM2 Base Count*/
  79. #define EPIC_TM2_VEC_REG (EPIC_CCSROFF + 0x011a0)/* Gbl TM2 Vector Pri*/
  80. #define EPIC_TM2_DES_REG (EPIC_CCSROFF + 0x011b0)/* Gbl TM2 Dest */
  81. #define EPIC_TM3_CUR_COUNT_REG (EPIC_CCSROFF + 0x011c0)/* Gbl TM3 Cur. Count*/
  82. #define EPIC_TM3_BASE_COUNT_REG (EPIC_CCSROFF + 0x011d0)/* Gbl TM3 Base Count*/
  83. #define EPIC_TM3_VEC_REG (EPIC_CCSROFF + 0x011e0)/* Gbl TM3 Vector Pri*/
  84. #define EPIC_TM3_DES_REG (EPIC_CCSROFF + 0x011f0)/* Gbl TM3 Dest. */
  85. #define EPIC_TM_CTRL (EPIC_CCSROFF + 0x01300)/* Timer Control */
  86. #define EPIC_IRQ_SUMM_REG0 (EPIC_CCSROFF + 0x01310)/* IRQ_OUT Summary 0 */
  87. #define EPIC_IRQ_SUMM_REG1 (EPIC_CCSROFF + 0x01320)/* IRQ_OUT Summary 1 */
  88. #define EPIC_CRIT_SUMM_REG0 (EPIC_CCSROFF + 0x01330)/* Crit Int Summary 0 */
  89. #define EPIC_CRIT_SUMM_REG1 (EPIC_CCSROFF + 0x01340)/* Crit Int Summary 1 */
  90. #define EPIC_PERFMON_0_MSK_REG0 (EPIC_CCSROFF + 0x01350)/* PerfMon 0 Mask 0 */
  91. #define EPIC_PERFMON_0_MSK_REG1 (EPIC_CCSROFF + 0x01360)/* PerfMon 0 Mask 1 */
  92. #define EPIC_PERFMON_1_MSK_REG0 (EPIC_CCSROFF + 0x01370)/* PerfMon 1 Mask 0 */
  93. #define EPIC_PERFMON_1_MSK_REG1 (EPIC_CCSROFF + 0x01380)/* PerfMon 1 Mask 1 */
  94. #define EPIC_PERFMON_2_MSK_REG0 (EPIC_CCSROFF + 0x01390)/* PerfMon 2 Mask 0 */
  95. #define EPIC_PERFMON_2_MSK_REG1 (EPIC_CCSROFF + 0x013a0)/* PerfMon 2 Mask 1 */
  96. #define EPIC_PERFMON_3_MSK_REG0 (EPIC_CCSROFF + 0x013b0)/* PerfMon 3 Mask 0 */
  97. #define EPIC_PERFMON_3_MSK_REG1 (EPIC_CCSROFF + 0x013c0)/* PerfMon 3 Mask 1 */
  98. #define EPIC_MSG_REG0 (EPIC_CCSROFF + 0x01400)/* Message 0 */
  99. #define EPIC_MSG_REG1 (EPIC_CCSROFF + 0x01410)/* Message 1 */
  100. #define EPIC_MSG_REG2 (EPIC_CCSROFF + 0x01420)/* Message 2 */
  101. #define EPIC_MSG_REG3 (EPIC_CCSROFF + 0x01430)/* Message 3 */
  102. #define EPIC_MSG_EN_REG (EPIC_CCSROFF + 0x01500)/* Message Enable */
  103. #define EPIC_MSG_STATE_REG (EPIC_CCSROFF + 0x01510)/* Message Status */
  104. /*   Interrupt Source Config  */
  105. #define EPIC_EX_INT0_VEC_REG (EPIC_CCSROFF + 0x10000)/* Ext IRQ0 vect/prio*/
  106. #define EPIC_EX_INT0_DES_REG (EPIC_CCSROFF + 0x10010)/* Ext IRQ0 Dest */
  107. #define EPIC_EX_INT1_VEC_REG (EPIC_CCSROFF + 0x10020)/* Ext IRQ1 vect/prio*/
  108. #define EPIC_EX_INT1_DES_REG (EPIC_CCSROFF + 0x10030)/* Ext IRQ1 Dest */
  109. #define EPIC_EX_INT2_VEC_REG (EPIC_CCSROFF + 0x10040)/* Ext IRQ2 vect/prio*/
  110. #define EPIC_EX_INT2_DES_REG (EPIC_CCSROFF + 0x10050)/* Ext IRQ2 Dest */
  111. #define EPIC_EX_INT3_VEC_REG (EPIC_CCSROFF + 0x10060)/* Ext IRQ3 vect/prio*/
  112. #define EPIC_EX_INT3_DES_REG (EPIC_CCSROFF + 0x10070)/* Ext IRQ3 Dest */
  113. #define EPIC_EX_INT4_VEC_REG (EPIC_CCSROFF + 0x10080)/* Ext IRQ4 vect/prio*/
  114. #define EPIC_EX_INT4_DES_REG (EPIC_CCSROFF + 0x10090)/* Ext IRQ4 Dest */
  115. #define EPIC_EX_INT5_VEC_REG (EPIC_CCSROFF + 0x100a0)/* Ext IRQ5 vect/prio*/
  116. #define EPIC_EX_INT5_DES_REG (EPIC_CCSROFF + 0x100b0)/* Ext IRQ5 Dest */
  117. #define EPIC_EX_INT6_VEC_REG (EPIC_CCSROFF + 0x100c0)/* Ext IRQ6 vect/prio*/
  118. #define EPIC_EX_INT6_DES_REG (EPIC_CCSROFF + 0x100d0)/* Ext IRQ6 Dest */
  119. #define EPIC_EX_INT7_VEC_REG (EPIC_CCSROFF + 0x100e0)/* Ext IRQ7 vect/prio*/
  120. #define EPIC_EX_INT7_DES_REG (EPIC_CCSROFF + 0x100f0)/* Ext IRQ7 Dest */
  121. #define EPIC_EX_INT8_VEC_REG (EPIC_CCSROFF + 0x10100)/* Ext IRQ8 vect/prio*/
  122. #define EPIC_EX_INT8_DES_REG (EPIC_CCSROFF + 0x10110)/* Ext IRQ8 Dest */
  123. #define EPIC_EX_INT9_VEC_REG (EPIC_CCSROFF + 0x10120)/* Ext IRQ9 vect/prio*/
  124. #define EPIC_EX_INT9_DES_REG (EPIC_CCSROFF + 0x10130)/* Ext IRQ9 Dest */
  125. #define EPIC_EX_INT10_VEC_REG (EPIC_CCSROFF + 0x10140)/* Ext IRQ10 vect/pri*/
  126. #define EPIC_EX_INT10_DES_REG (EPIC_CCSROFF + 0x10150)/* Ext IRQ10 Dest */
  127. #define EPIC_EX_INT11_VEC_REG (EPIC_CCSROFF + 0x10160)/* Ext IRQ11 vect/pri*/
  128. #define EPIC_EX_INT11_DES_REG (EPIC_CCSROFF + 0x10170)/* Ext IRQ11 Dest */
  129. #define EPIC_IN_INT0_VEC_REG (EPIC_CCSROFF + 0x10200)/* Int IRQ0 vect/prio*/
  130. #define EPIC_IN_INT0_DES_REG (EPIC_CCSROFF + 0x10210)/* Int IRQ0 Dest */
  131. #define EPIC_IN_INT1_VEC_REG (EPIC_CCSROFF + 0x10220)/* Int IRQ1 vect/prio*/
  132. #define EPIC_IN_INT1_DES_REG (EPIC_CCSROFF + 0x10230)/* Int IRQ1 Dest */
  133. #define EPIC_IN_INT2_VEC_REG (EPIC_CCSROFF + 0x10240)/* Int IRQ2 vect/prio*/
  134. #define EPIC_IN_INT2_DES_REG (EPIC_CCSROFF + 0x10250)/* Int IRQ2 Dest */
  135. #define EPIC_IN_INT3_VEC_REG (EPIC_CCSROFF + 0x10260)/* Int IRQ3 vect/prio*/
  136. #define EPIC_IN_INT3_DES_REG (EPIC_CCSROFF + 0x10270)/* Int IRQ3 Dest */
  137. #define EPIC_IN_INT4_VEC_REG (EPIC_CCSROFF + 0x10280)/* Int IRQ4 vect/prio*/
  138. #define EPIC_IN_INT4_DES_REG (EPIC_CCSROFF + 0x10290)/* Int IRQ4 Dest */
  139. #define EPIC_IN_INT5_VEC_REG (EPIC_CCSROFF + 0x102a0)/* Int IRQ5 vect/prio*/
  140. #define EPIC_IN_INT5_DES_REG (EPIC_CCSROFF + 0x102b0)/* Int IRQ5 Dest */
  141. #define EPIC_IN_INT6_VEC_REG (EPIC_CCSROFF + 0x102c0)/* Int IRQ6 vect/prio*/
  142. #define EPIC_IN_INT6_DES_REG (EPIC_CCSROFF + 0x102d0)/* Int IRQ6 Dest */
  143. #define EPIC_IN_INT7_VEC_REG (EPIC_CCSROFF + 0x102e0)/* Int IRQ7 vect/prio*/
  144. #define EPIC_IN_INT7_DES_REG (EPIC_CCSROFF + 0x102f0)/* Int IRQ7 Dest */
  145. #define EPIC_IN_INT8_VEC_REG (EPIC_CCSROFF + 0x10300)/* Int IRQ8 vect/prio*/
  146. #define EPIC_IN_INT8_DES_REG (EPIC_CCSROFF + 0x10310)/* Int IRQ8 Dest */
  147. #define EPIC_IN_INT9_VEC_REG (EPIC_CCSROFF + 0x10320)/* Int IRQ9 vect/prio*/
  148. #define EPIC_IN_INT9_DES_REG (EPIC_CCSROFF + 0x10330)/* Int IRQ9 Dest */
  149. #define EPIC_IN_INT10_VEC_REG (EPIC_CCSROFF + 0x10340)/* Int IRQ10 vect/pri*/
  150. #define EPIC_IN_INT10_DES_REG (EPIC_CCSROFF + 0x10350)/* Int IRQ10 Dest */
  151. #define EPIC_IN_INT11_VEC_REG (EPIC_CCSROFF + 0x10360)/* Int IRQ11 vect/pri*/
  152. #define EPIC_IN_INT11_DES_REG (EPIC_CCSROFF + 0x10370)/* Int IRQ11 Dest */
  153. #define EPIC_IN_INT12_VEC_REG (EPIC_CCSROFF + 0x10380)/* Int IRQ12 vect/pri*/
  154. #define EPIC_IN_INT12_DES_REG (EPIC_CCSROFF + 0x10390)/* Int IRQ12 Dest */
  155. #define EPIC_IN_INT13_VEC_REG (EPIC_CCSROFF + 0x103a0)/* Int IRQ13 vect/pri*/
  156. #define EPIC_IN_INT13_DES_REG (EPIC_CCSROFF + 0x103b0)/* Int IRQ13 Dest */
  157. #define EPIC_IN_INT14_VEC_REG (EPIC_CCSROFF + 0x103c0)/* Int IRQ14 vect/pri*/
  158. #define EPIC_IN_INT14_DES_REG (EPIC_CCSROFF + 0x103d0)/* Int IRQ14 Dest */
  159. #define EPIC_IN_INT15_VEC_REG (EPIC_CCSROFF + 0x103e0)/* Int IRQ15 vect/pri*/
  160. #define EPIC_IN_INT15_DES_REG (EPIC_CCSROFF + 0x103f0)/* Int IRQ15 Dest */
  161. #define EPIC_IN_INT16_VEC_REG (EPIC_CCSROFF + 0x10400)/* Int IRQ16 vect/pri*/
  162. #define EPIC_IN_INT16_DES_REG (EPIC_CCSROFF + 0x10410)/* Int IRQ16 Dest */
  163. #define EPIC_IN_INT17_VEC_REG (EPIC_CCSROFF + 0x10420)/* Int IRQ17 vect/pri*/
  164. #define EPIC_IN_INT17_DES_REG (EPIC_CCSROFF + 0x10430)/* Int IRQ17 Dest */
  165. #define EPIC_IN_INT18_VEC_REG (EPIC_CCSROFF + 0x10440)/* Int IRQ18 vect/pri*/
  166. #define EPIC_IN_INT18_DES_REG (EPIC_CCSROFF + 0x10450)/* Int IRQ18 Dest */
  167. #define EPIC_IN_INT19_VEC_REG (EPIC_CCSROFF + 0x10460)/* Int IRQ19 vect/pri*/
  168. #define EPIC_IN_INT19_DES_REG (EPIC_CCSROFF + 0x10470)/* Int IRQ19 Dest */
  169. #define EPIC_IN_INT20_VEC_REG (EPIC_CCSROFF + 0x10480)/* Int IRQ20 vect/pri*/
  170. #define EPIC_IN_INT20_DES_REG (EPIC_CCSROFF + 0x10490)/* Int IRQ20 Dest */
  171. #define EPIC_IN_INT21_VEC_REG (EPIC_CCSROFF + 0x104a0)/* Int IRQ21 vect/pri*/
  172. #define EPIC_IN_INT21_DES_REG (EPIC_CCSROFF + 0x104b0)/* Int IRQ21 Dest */
  173. #define EPIC_IN_INT22_VEC_REG (EPIC_CCSROFF + 0x104c0)/* Int IRQ22 vect/pri*/
  174. #define EPIC_IN_INT22_DES_REG (EPIC_CCSROFF + 0x104d0)/* Int IRQ22 Dest */
  175. #define EPIC_IN_INT23_VEC_REG (EPIC_CCSROFF + 0x104e0)/* Int IRQ23 vect/pri*/
  176. #define EPIC_IN_INT23_DES_REG (EPIC_CCSROFF + 0x104f0)/* Int IRQ23 Dest */
  177. #define EPIC_IN_INT24_VEC_REG (EPIC_CCSROFF + 0x10500)/* Int IRQ24 vect/pri*/
  178. #define EPIC_IN_INT24_DES_REG (EPIC_CCSROFF + 0x10510)/* Int IRQ24 Dest */
  179. #define EPIC_IN_INT25_VEC_REG (EPIC_CCSROFF + 0x10520)/* Int IRQ25 vect/pri*/
  180. #define EPIC_IN_INT25_DES_REG (EPIC_CCSROFF + 0x10530)/* Int IRQ25 Dest */
  181. #define EPIC_IN_INT26_VEC_REG (EPIC_CCSROFF + 0x10540)/* Int IRQ26 vect/pri*/
  182. #define EPIC_IN_INT26_DES_REG (EPIC_CCSROFF + 0x10550)/* Int IRQ26 Dest */
  183. #define EPIC_IN_INT27_VEC_REG (EPIC_CCSROFF + 0x10560)/* Int IRQ27 vect/pri*/
  184. #define EPIC_IN_INT27_DES_REG (EPIC_CCSROFF + 0x10570)/* Int IRQ27 Dest */
  185. #define EPIC_IN_INT28_VEC_REG (EPIC_CCSROFF + 0x10580)/* Int IRQ28 vect/pri*/
  186. #define EPIC_IN_INT28_DES_REG (EPIC_CCSROFF + 0x10590)/* Int IRQ28 Dest */
  187. #define EPIC_IN_INT29_VEC_REG (EPIC_CCSROFF + 0x105a0)/* Int IRQ29 vect/pri*/
  188. #define EPIC_IN_INT29_DES_REG (EPIC_CCSROFF + 0x105b0)/* Int IRQ29 Dest */
  189. #define EPIC_IN_INT30_VEC_REG (EPIC_CCSROFF + 0x105c0)/* Int IRQ30 vect/pri*/
  190. #define EPIC_IN_INT30_DES_REG (EPIC_CCSROFF + 0x105d0)/* Int IRQ30 Dest */
  191. #define EPIC_IN_INT31_VEC_REG (EPIC_CCSROFF + 0x105e0)/* Int IRQ31 vect/pri*/
  192. #define EPIC_IN_INT31_DES_REG (EPIC_CCSROFF + 0x105f0)/* Int IRQ31 Dest */
  193. #define EPIC_IN_INT32_VEC_REG (EPIC_CCSROFF + 0x10600)/* Int IRQ32 vect/pri*/
  194. #define EPIC_IN_INT32_DES_REG (EPIC_CCSROFF + 0x10610)/* Int IRQ32 Dest */
  195. #define EPIC_IN_INT33_VEC_REG (EPIC_CCSROFF + 0x10620)/* Int IRQ33 vect/pri*/
  196. #define EPIC_IN_INT33_DES_REG (EPIC_CCSROFF + 0x10630)/* Int IRQ33 Dest */
  197. #define EPIC_IN_INT34_VEC_REG (EPIC_CCSROFF + 0x10640)/* Int IRQ34 vect/pri*/
  198. #define EPIC_IN_INT34_DES_REG (EPIC_CCSROFF + 0x10650)/* Int IRQ34 Dest */
  199. #define EPIC_IN_INT35_VEC_REG (EPIC_CCSROFF + 0x10660)/* Int IRQ35 vect/pri*/
  200. #define EPIC_IN_INT35_DES_REG (EPIC_CCSROFF + 0x10670)/* Int IRQ35 Dest */
  201. #define EPIC_IN_INT36_VEC_REG (EPIC_CCSROFF + 0x10680)/* Int IRQ36 vect/pri*/
  202. #define EPIC_IN_INT36_DES_REG (EPIC_CCSROFF + 0x10690)/* Int IRQ36 Dest */
  203. #define EPIC_IN_INT37_VEC_REG (EPIC_CCSROFF + 0x106a0)/* Int IRQ37 vect/pri*/
  204. #define EPIC_IN_INT37_DES_REG (EPIC_CCSROFF + 0x106b0)/* Int IRQ37 Dest */
  205. #define EPIC_IN_INT38_VEC_REG (EPIC_CCSROFF + 0x106c0)/* Int IRQ38 vect/pri*/
  206. #define EPIC_IN_INT38_DES_REG (EPIC_CCSROFF + 0x106d0)/* Int IRQ38 Dest */
  207. #define EPIC_IN_INT39_VEC_REG (EPIC_CCSROFF + 0x106e0)/* Int IRQ39 vect/pri*/
  208. #define EPIC_IN_INT39_DES_REG (EPIC_CCSROFF + 0x106f0)/* Int IRQ39 Dest */
  209. #define EPIC_IN_INT40_VEC_REG (EPIC_CCSROFF + 0x10700)/* Int IRQ40 vect/pri*/
  210. #define EPIC_IN_INT40_DES_REG (EPIC_CCSROFF + 0x10710)/* Int IRQ40 Dest */
  211. #define EPIC_IN_INT41_VEC_REG (EPIC_CCSROFF + 0x10720)/* Int IRQ41 vect/pri*/
  212. #define EPIC_IN_INT41_DES_REG (EPIC_CCSROFF + 0x10730)/* Int IRQ41 Dest */
  213. #define EPIC_IN_INT42_VEC_REG (EPIC_CCSROFF + 0x10740)/* Int IRQ42 vect/pri*/
  214. #define EPIC_IN_INT42_DES_REG (EPIC_CCSROFF + 0x10750)/* Int IRQ42 Dest */
  215. #define EPIC_IN_INT43_VEC_REG (EPIC_CCSROFF + 0x10760)/* Int IRQ43 vect/pri*/
  216. #define EPIC_IN_INT43_DES_REG (EPIC_CCSROFF + 0x10770)/* Int IRQ43 Dest */
  217. #define EPIC_IN_INT44_VEC_REG (EPIC_CCSROFF + 0x10780)/* Int IRQ44 vect/pri*/
  218. #define EPIC_IN_INT44_DES_REG (EPIC_CCSROFF + 0x10790)/* Int IRQ44 Dest */
  219. #define EPIC_IN_INT45_VEC_REG (EPIC_CCSROFF + 0x107a0)/* Int IRQ45 vect/pri*/
  220. #define EPIC_IN_INT45_DES_REG (EPIC_CCSROFF + 0x107b0)/* Int IRQ45 Dest */
  221. #define EPIC_IN_INT46_VEC_REG (EPIC_CCSROFF + 0x107c0)/* Int IRQ46 vect/pri*/
  222. #define EPIC_IN_INT46_DES_REG (EPIC_CCSROFF + 0x107d0)/* Int IRQ46 Dest */
  223. #define EPIC_IN_INT47_VEC_REG (EPIC_CCSROFF + 0x107e0)/* Int IRQ47 vect/pri*/
  224. #define EPIC_IN_INT47_DES_REG (EPIC_CCSROFF + 0x107f0)/* Int IRQ48 Dest */
  225. #define EPIC_MSG_INT0_VEC_REG (EPIC_CCSROFF + 0x11600)/* MSG INT0 vect/prio*/
  226. #define EPIC_MSG_INT0_DES_REG (EPIC_CCSROFF + 0x11610)/* MSG INT0 Dest  */
  227. #define EPIC_MSG_INT1_VEC_REG (EPIC_CCSROFF + 0x11620)/* MSG INT1 vect/prio*/
  228. #define EPIC_MSG_INT1_DES_REG (EPIC_CCSROFF + 0x11630)/* MSG INT1 Dest  */
  229. #define EPIC_MSG_INT2_VEC_REG (EPIC_CCSROFF + 0x11640)/* MSG INT2 vect/prio*/
  230. #define EPIC_MSG_INT2_DES_REG (EPIC_CCSROFF + 0x11650)/* MSG INT2 Dest  */
  231. #define EPIC_MSG_INT3_VEC_REG (EPIC_CCSROFF + 0x11660)/* MSG INT3 vect/prio*/
  232. #define EPIC_MSG_INT3_DES_REG (EPIC_CCSROFF + 0x11670)/* MSG INT3 Dest  */
  233. #define EPIC_P0_IPI_DPATCH_REG0 (EPIC_CCSROFF + 0x20040)/* P0 IPI0 dispatch */
  234. #define EPIC_P0_IPI_DPATCH_REG1 (EPIC_CCSROFF + 0x20050)/* P0 IPI1 dispatch */
  235. #define EPIC_P0_IPI_DPATCH_REG2 (EPIC_CCSROFF + 0x20060)/* P0 IPI2 dispatch */
  236. #define EPIC_P0_IPI_DPATCH_REG3 (EPIC_CCSROFF + 0x20070)/* P0 IPI3 dispatch */
  237. #define EPIC_P0_CTASK_PRI_REG (EPIC_CCSROFF + 0x20080)/* P0 Cur Task Prio */
  238. #define EPIC_P0_WHO_AM_I_REG (EPIC_CCSROFF + 0x20090)/* P0 Who am I */
  239. #define EPIC_P0_INT_ACK_REG (EPIC_CCSROFF + 0x200a0)/* P0 Int Ack */
  240. #define EPIC_P0_EOI_REG (EPIC_CCSROFF + 0x200b0)/* P0 End of Int */
  241. #define EPIC_EX_VEC_REG_INTERVAL 0x20 /* ex vector regs distance */
  242. #define EPIC_IN_VEC_REG_INTERVAL 0x20 /* in vector regs distance */
  243. #define EPIC_GT_VEC_REG_INTERVAL 0x40 /* tm vector regs distance */
  244. #define EPIC_MSG_VEC_REG_INTERVAL 0x20 /* msg vector regs distance */
  245. #define EPIC_IPI_VEC_REG_INTERVAL 0x10 /* ipi vector regs distance */
  246. #define EPIC_EX_DEST_REG_VECREGOFF 0x10 /* EIDR offset from vec reg */
  247. #define EPIC_IN_DEST_REG_VECREGOFF 0x10 /* IIDR offset from vec reg */
  248. #define EPIC_MSG_DEST_REG_VECREGOFF 0x10 /* MIDR offset from vec reg */
  249. #define EPIC_EX_VEC_REG(irq)     (EPIC_EX_INT0_VEC_REG + 
  250.                                  ((irq) * EPIC_EX_VEC_REG_INTERVAL))
  251. #define EPIC_IN_VEC_REG(irq)     (EPIC_IN_INT0_VEC_REG + 
  252.                                  ((irq) * EPIC_IN_VEC_REG_INTERVAL))
  253. #define EPIC_GT_VEC_REG(irq)     (EPIC_TM0_VEC_REG + 
  254.                                  ((irq) * EPIC_GT_VEC_REG_INTERVAL))
  255. #define EPIC_MSG_VEC_REG(irq)    (EPIC_MSG_INT0_VEC_REG + 
  256.                                  ((irq) * EPIC_MSG_VEC_REG_INTERVAL))
  257. #define EPIC_IPI_VEC_REG(irq)    (EPIC_IPI_0_VEC_REG + 
  258.                                  ((irq) * EPIC_IPI_VEC_REG_INTERVAL))
  259. #define EPIC_EX_DEST_REG(irq)    (EPIC_EX_VEC_REG(irq) + 
  260.                                   EPIC_EX_DEST_REG_VECREGOFF)
  261. #define EPIC_IN_DEST_REG(irq)    (EPIC_IN_VEC_REG(irq) + 
  262.                                   EPIC_IN_DEST_REG_VECREGOFF)
  263. #define EPIC_MSG_DEST_REG(irq)   (EPIC_MSG_VEC_REG(irq) + 
  264.                                   EPIC_MSG_DEST_REG_VECREGOFF)
  265. /* GCR register */
  266. #define EPIC_GCR_RESET EPIC_BIT(31)
  267. #define EPIC_GCR_MODE_MIXED EPIC_BIT(29)
  268. /* IPI Vector/Priority registers */
  269. #define EPIC_IPIVPR_INTR_MSK        EPIC_BIT(31)
  270. #define EPIC_IPIVPR_INTR_ACTIVE     EPIC_BIT(30)
  271. #define EPIC_IPIVPR_PRIORITY_MSK    (EPIC_BIT(19) | EPIC_BIT(18) | EPIC_BIT(17) | EPIC_BIT(16))
  272. #define EPIC_IPIVPR_PRIORITY(p)     (((p) << 16) & EPIC_IPIVPR_PRIORITY_MSK)
  273. #define EPIC_IPIVPR_VECTOR_MSK      (0xffff)
  274. #define EPIC_IPIVPR_VECTOR(vec)     ((vec) & EPIC_IPIVPR_VECTOR_MSK)
  275. /* Global Timer Vector/Priority registers */
  276. #define EPIC_GTVPR_INTR_MSK        EPIC_BIT(31)
  277. #define EPIC_GTVPR_INTR_ACTIVE     EPIC_BIT(30)
  278. #define EPIC_GTVPR_PRIORITY_MSK    (EPIC_BIT(19) | EPIC_BIT(18) | EPIC_BIT(17) | EPIC_BIT(16))
  279. #define EPIC_GTVPR_PRIORITY(p)     (((p) << 16) & EPIC_GTVPR_PRIORITY_MSK)
  280. #define EPIC_GTVPR_VECTOR_MSK      (0xffff)
  281. #define EPIC_GTVPR_VECTOR(vec)     ((vec) & EPIC_GTVPR_VECTOR_MSK)
  282. /* Summary registers */
  283. #define EPIC_IRQSR0_MSG_INT_MSK 0xf000
  284. #define EPIC_IRQSR0_MSG_INT(n)  (EPIC_BIT(15-(n)) & EPIC_IRQSR0_MSG_INT_MSK)
  285. #define EPIC_IRQSR0_EX_INT_MSK  0xfff
  286. #define EPIC_IRQSR0_EX_INT(n)   (EPIC_BIT(11-(n)) & EPIC_IRQSR0_EX_INT_MSK)
  287. #define EPIC_IRQSR1_IN_INT(n)   EPIC_BIT(31-(n))
  288. #define EPIC_CISR0_MSG_INT_MSK  0xf000
  289. #define EPIC_CISR0_MSG_INT(n)   (EPIC_BIT(15-(n)) & EPIC_CISR0_MSG_INT_MSK)
  290. #define EPIC_CISR0_EX_INT_MSK   0xfff
  291. #define EPIC_CISR0_EX_INT(n)    (EPIC_BIT(11-(n)) & EPIC_CISR0_EX_INT_MSK)
  292. #define EPIC_CISR1_IN_INT(n)    EPIC_BIT(31-(n))
  293. /* Message registers */
  294. #define EPIC_MER_EN_MSK         0xf
  295. #define EPIC_MER_EN(n)          (EPIC_BIT(n) & EPIC_MER_EN_MSK)
  296. #define EPIC_MSR_ST_MSK         0xf
  297. #define EPIC_MSR_ST(n)          (EPIC_BIT(n) & EPIC_MER_ST_MSK)
  298. /* EIVPR registers */
  299. #define EPIC_EIVPR_INTR_MSK         EPIC_BIT(31)
  300. #define EPIC_EIVPR_INTR_ACTIVE      EPIC_BIT(30)
  301. #define EPIC_EIVPR_INTR_POLARITY    EPIC_BIT(23)
  302. #define EPIC_EIVPR_INTR_SENSE       EPIC_BIT(22)
  303. #define EPIC_EIVPR_POLARITY(p)      ((p) << 23)
  304. #define EPIC_EIVPR_SENS(s)          ((s) << 22)
  305. #define EPIC_EIVPR_PRIORITY_MSK     (EPIC_BIT(19) | EPIC_BIT(18) | EPIC_BIT(17) | EPIC_BIT(16))
  306. #define EPIC_EIVPR_PRIORITY(p)      (((p) << 16) & EPIC_EIVPR_PRIORITY_MSK)
  307. #define EPIC_EIVPR_VECTOR_MSK       (0xffff)
  308. #define EPIC_EIVPR_VECTOR(vec)      ((vec) & EPIC_EIVPR_VECTOR_MSK)
  309. #define EPIC_INT_ACT_LOW            0
  310. #define EPIC_INT_ACT_HIGH           1
  311. #define EPIC_INT_EDG_NEG            0
  312. #define EPIC_INT_EDG_POS            1
  313. #define EPIC_SENSE_LVL              1
  314. #define EPIC_SENSE_EDG              0
  315. /* EIDR registers */
  316. #define EPIC_EIDR_EX_PIN        EPIC_BIT(31)
  317. #define EPIC_EIDR_CRIT_INT      EPIC_BIT(30)
  318. /* Options for *VPR and *IDR registers */
  319. #define EPIC_OPT_EN_MSK             EPIC_EIVPR_INTR_MSK
  320. #define EPIC_OPT_EN_Y               0x00000000
  321. #define EPIC_OPT_EN_N               0x10000000
  322. #define EPIC_OPT_POLAR_MSK          EPIC_EIVPR_INTR_POLARITY
  323. #define EPIC_OPT_POLAR_ACT_LOW      0x00000000
  324. #define EPIC_OPT_POLAR_ACT_HIGH     0x00800000
  325. #define EPIC_OPT_POLAR_EDG_NEG      0x00000000
  326. #define EPIC_OPT_POLAR_EDG_POS      0x00800000
  327. #define EPIC_OPT_SENSE_MSK          EPIC_EIVPR_INTR_SENSE
  328. #define EPIC_OPT_SENSE_EDG          0x00000000
  329. #define EPIC_OPT_SENSE_LVL          0x00400000
  330. #define EPIC_OPT_PRI_MSK            EPIC_EIVPR_PRIORITY_MSK
  331. #define EPIC_OPT_PRI_VALUE(p)       EPIC_EIVPR_PRIORITY(p)
  332. #define EPIC_OPT_EXPIN_MSK          (EPIC_EIDR_EX_PIN >> 16)
  333. #define EPIC_OPT_EXPIN_OFF          (0x00000000 >> 16)
  334. #define EPIC_OPT_EXPIN_ON           (0x80000000 >> 16)
  335. #define EPIC_OPT_CRIT_MSK           (EPIC_EIDR_CRIT_INT >> 16)
  336. #define EPIC_OPT_CRIT_OFF           (0x00000000 >> 16)
  337. #define EPIC_OPT_CRIT_ON            (0x40000000 >> 16)
  338. /* IIVPR registers */
  339. #define EPIC_IIVPR_INTR_MSK         EPIC_BIT(31)
  340. #define EPIC_IIVPR_INTR_ACTIVE      EPIC_BIT(30)
  341. #define EPIC_IIVPR_INTR_POLARITY    EPIC_BIT(23)
  342. #define EPIC_IIVPR_POLARITY(p)      ((p) << 23)
  343. #define EPIC_IIVPR_PRIORITY_MSK     (EPIC_BIT(19) | EPIC_BIT(18) | EPIC_BIT(17) | EPIC_BIT(16))
  344. #define EPIC_IIVPR_PRIORITY(p)      (((p) << 16) & EPIC_IIVPR_PRIORITY_MSK)
  345. #define EPIC_IIVPR_VECTOR_MSK       (0xffff)
  346. #define EPIC_IIVPR_VECTOR(vec)      ((vec) & EPIC_IIVPR_VECTOR_MSK)
  347. /* IIDR registers */
  348. #define EPIC_IIDR_EX_PIN        EPIC_BIT(31)
  349. #define EPIC_IIDR_CRIT_INT      EPIC_BIT(30)
  350. /* MIVPR registers */
  351. #define EPIC_MIVPR_INTR_MSK         EPIC_BIT(31)
  352. #define EPIC_MIVPR_INTR_ACTIVE      EPIC_BIT(30)
  353. #define EPIC_MIVPR_PRIORITY_MSK     (EPIC_BIT(19) | EPIC_BIT(18) | EPIC_BIT(17) | EPIC_BIT(16))
  354. #define EPIC_MIVPR_PRIORITY(p)      (((p) << 16) & EPIC_MIVPR_PRIORITY_MSK)
  355. #define EPIC_MIVPR_VECTOR_MSK       (0xffff)
  356. #define EPIC_MIVPR_VECTOR(vec)      ((vec) & EPIC_MIVPR_VECTOR_MSK)
  357. /* MIDR registers */
  358. #define EPIC_MIDR_EX_PIN        EPIC_BIT(31)
  359. #define EPIC_MIDR_CRIT_INT      EPIC_BIT(30)
  360. /* IPIDR registers */
  361. #define EPIC_IPIDR_P0           EPIC_BIT(0)
  362. /* CTPR register */
  363. #define EPIC_CTPR_TASKPRI_MSK   (EPIC_BIT(3) | EPIC_BIT(2) | EPIC_BIT(1) | EPIC_BIT(0))
  364. #define EPIC_CTPR_TASKPRI(p)    ((p) & EPIC_CTPR_TASKPRI_MSK)
  365. /* WHOAMI register */
  366. #define EPIC_WHOAMI_ID_MSK      (EPIC_BIT(4) | EPIC_BIT(3) | EPIC_BIT(2) | EPIC_BIT(1) | EPIC_BIT(0))
  367. #define EPIC_WHOAMI_ID(n)       ((n) & EPIC_WHOAMI_ID_MSK)
  368. #define EPIC_INTER_IN_SERVICE  2
  369. #define EPIC_IN_INTERRUPT  20 /* internal type */
  370. #define EPIC_EX_INTERRUPT  21 /* external type */
  371. #define EPIC_INV_INTER_SOURCE  22 /* invalid interrupt source */
  372. #define EPIC_GT_INTERRUPT  23 /* global timer type */
  373. #define EPIC_MSG_INTERRUPT  24 /* message type */
  374. #define EPIC_IPI_INTERRUPT  25 /* inter-processor type */
  375. #define EPIC_VEC_HAS_NO_IDR     26 /* vector has no IDR reg */
  376. #define EPIC_VEC_OPTION_NA      27 /* option(s) not avail for this vec */
  377. #define EPIC_VEC_OPTION_INV     28 /* option mask is invalid */
  378. #define EPIC_MAX_EXT_IRQS 12
  379. #define EPIC_MAX_IN_IRQS 48
  380. #define EPIC_MAX_GT_IRQS 4
  381. #define EPIC_MAX_MSG_IRQS 4
  382. #define EPIC_MAX_IPI_IRQS 4
  383. #define EPIC_VEC_EXT_IRQ0       0
  384. #define EPIC_VEC_IN_IRQ0        (EPIC_VEC_EXT_IRQ0 + EPIC_MAX_EXT_IRQS)
  385. #define EPIC_VEC_GT_IRQ0        (EPIC_VEC_IN_IRQ0 + EPIC_MAX_IN_IRQS)
  386. #define EPIC_VEC_MSG_IRQ0       (EPIC_VEC_GT_IRQ0 + EPIC_MAX_GT_IRQS)
  387. #define EPIC_VEC_IPI_IRQ0       (EPIC_VEC_MSG_IRQ0 + EPIC_MAX_MSG_IRQS)
  388. #define EPIC_VEC_CTRL_EXT       (EPIC_VEC_IPI_IRQ0 + EPIC_MAX_IPI_IRQS)
  389. #define EPIC_MAX_ALL_IRQS       EPIC_VEC_CTRL_EXT
  390. #define EPIC_PRIORITY_MIN 0    /* minimum level of priority */
  391. #define EPIC_PRIORITY_MAX 15   /* maximum level of priority */
  392. #define EPIC_PRIORITY_DEFAULT 3
  393. #define EPIC_INV_PRIO_ERROR ((ULONG)(-1))
  394. #define EPIC_L2CACHE_INT_NUM        0
  395. #define EPIC_L2CACHE_INT_VEC        (EPIC_L2CACHE_INT_NUM + EPIC_VEC_IN_IRQ0)
  396. #define EPIC_ECM_INT_NUM            1
  397. #define EPIC_ECM_INT_VEC            (EPIC_ECM_INT_NUM + EPIC_VEC_IN_IRQ0)
  398. #define EPIC_DDR_INT_NUM            2
  399. #define EPIC_DDR_INT_VEC            (EPIC_DDR_INT_NUM + EPIC_VEC_IN_IRQ0)
  400. #define EPIC_LBC_INT_NUM            3
  401. #define EPIC_LBC_INT_VEC            (EPIC_LBC_INT_NUM + EPIC_VEC_IN_IRQ0)
  402. #define EPIC_DMA0_INT_NUM           4
  403. #define EPIC_DMA0_INT_VEC           (EPIC_DMA0_INT_NUM + EPIC_VEC_IN_IRQ0)
  404. #define EPIC_DMA1_INT_NUM           5
  405. #define EPIC_DMA1_INT_VEC           (EPIC_DMA1_INT_NUM + EPIC_VEC_IN_IRQ0)
  406. #define EPIC_DMA2_INT_NUM           6
  407. #define EPIC_DMA2_INT_VEC           (EPIC_DMA2_INT_NUM + EPIC_VEC_IN_IRQ0)
  408. #define EPIC_DMA3_INT_NUM           7
  409. #define EPIC_DMA3_INT_VEC           (EPIC_DMA3_INT_NUM + EPIC_VEC_IN_IRQ0)
  410. #define EPIC_PCI1_INT_NUM           8
  411. #define EPIC_PCI1_INT_VEC           (EPIC_PCI1_INT_NUM + EPIC_VEC_IN_IRQ0)
  412. #define EPIC_PCI2_INT_NUM           9
  413. #define EPIC_PCI2_INT_VEC           (EPIC_PCI2_INT_NUM + EPIC_VEC_IN_IRQ0)
  414. #define EPIC_PCI_EXPRESS_INT_NUM    10
  415. #define EPIC_PCI_EXPRESS_INT_VEC    (EPIC_PCI_EXPRESS_INT_NUM + EPIC_VEC_IN_IRQ0)
  416. #define EPIC_RES11_INT_NUM          11
  417. #define EPIC_RES11_INT_VEC          (EPIC_RES11_INT_NUM + EPIC_VEC_IN_IRQ0)
  418. #define EPIC_DUART2_INT_NUM         12
  419. #define EPIC_DUART2_INT_VEC         (EPIC_DUART2_INT_NUM + EPIC_VEC_IN_IRQ0)
  420. #define EPIC_TSEC1TX_INT_NUM        13
  421. #define EPIC_TSEC1TX_INT_VEC        (EPIC_TSEC1TX_INT_NUM + EPIC_VEC_IN_IRQ0)
  422. #define EPIC_TSEC1RX_INT_NUM        14
  423. #define EPIC_TSEC1RX_INT_VEC        (EPIC_TSEC1RX_INT_NUM + EPIC_VEC_IN_IRQ0)
  424. #define EPIC_TSEC3TX_INT_NUM        15
  425. #define EPIC_TSEC3TX_INT_VEC        (EPIC_TSEC3TX_INT_NUM + EPIC_VEC_IN_IRQ0)
  426. #define EPIC_TSEC3RX_INT_NUM        16
  427. #define EPIC_TSEC3RX_INT_VEC        (EPIC_TSEC3RX_INT_NUM + EPIC_VEC_IN_IRQ0)
  428. #define EPIC_TSEC3ERR_INT_NUM       17
  429. #define EPIC_TSEC3ERR_INT_VEC       (EPIC_TSEC3ERR_INT_NUM + EPIC_VEC_IN_IRQ0)
  430. #define EPIC_TSEC1ERR_INT_NUM       18
  431. #define EPIC_TSEC1ERR_INT_VEC       (EPIC_TSEC1ERR_INT_NUM + EPIC_VEC_IN_IRQ0)
  432. #define EPIC_TSEC2TX_INT_NUM        19
  433. #define EPIC_TSEC2TX_INT_VEC        (EPIC_TSEC2TX_INT_NUM + EPIC_VEC_IN_IRQ0)
  434. #define EPIC_TSEC2RX_INT_NUM        20
  435. #define EPIC_TSEC2RX_INT_VEC        (EPIC_TSEC2RX_INT_NUM + EPIC_VEC_IN_IRQ0)
  436. #define EPIC_TSEC4TX_INT_NUM        21
  437. #define EPIC_TSEC4TX_INT_VEC        (EPIC_TSEC4TX_INT_NUM + EPIC_VEC_IN_IRQ0)
  438. #define EPIC_TSEC4RX_INT_NUM        22
  439. #define EPIC_TSEC4RX_INT_VEC        (EPIC_TSEC4RX_INT_NUM + EPIC_VEC_IN_IRQ0)
  440. #define EPIC_TSEC4ERR_INT_NUM       23
  441. #define EPIC_TSEC4ERR_INT_VEC       (EPIC_TSEC4ERR_INT_NUM + EPIC_VEC_IN_IRQ0)
  442. #define EPIC_TSEC2ERR_INT_NUM       24
  443. #define EPIC_TSEC2ERR_INT_VEC       (EPIC_TSEC2ERR_INT_NUM + EPIC_VEC_IN_IRQ0)
  444. #define EPIC_RES25_INT_NUM          25
  445. #define EPIC_RES25_INT_VEC          (EPIC_RES25_INT_NUM + EPIC_VEC_IN_IRQ0)
  446. #define EPIC_DUART_INT_NUM          26
  447. #define EPIC_DUART_INT_VEC          (EPIC_DUART_INT_NUM + EPIC_VEC_IN_IRQ0)
  448. #define EPIC_I2C_INT_NUM            27
  449. #define EPIC_I2C_INT_VEC            (EPIC_I2C_INT_NUM + EPIC_VEC_IN_IRQ0)
  450. #define EPIC_PERFMON_INT_NUM        28
  451. #define EPIC_PERFMON_INT_VEC        (EPIC_PERFMON_INT_NUM + EPIC_VEC_IN_IRQ0)
  452. #define EPIC_SEC_INT_NUM            29
  453. #define EPIC_SEC_INT_VEC            (EPIC_SEC_INT_NUM + EPIC_VEC_IN_IRQ0)
  454. #define EPIC_RES30_INT_NUM          30
  455. #define EPIC_RES30_INT_VEC          (EPIC_RES30_INT_NUM + EPIC_VEC_IN_IRQ0)
  456. #define EPIC_RES31_INT_NUM          31
  457. #define EPIC_RES31_INT_VEC          (EPIC_RES31_INT_NUM + EPIC_VEC_IN_IRQ0)
  458. #define EPIC_SR_ERR_INT_NUM      32
  459. #define EPIC_SR_ERR_INT_VEC      (EPIC_SR_ERR_INT_NUM + EPIC_VEC_IN_IRQ0)
  460. #define EPIC_SR_OUT_DB1_INT_NUM  33
  461. #define EPIC_SR_OUT_DB1_INT_VEC  (EPIC_SR_OUT_DB1_INT_NUM + EPIC_VEC_IN_IRQ0)
  462. #define EPIC_SR_IN_DB1_INT_NUM   34
  463. #define EPIC_SR_IN_DB1_INT_VEC   (EPIC_SR_IN_DB1_INT_NUM + EPIC_VEC_IN_IRQ0)
  464. #define EPIC_RES35_INT_NUM          35
  465. #define EPIC_RES35_INT_VEC          (EPIC_RES35_INT_NUM + EPIC_VEC_IN_IRQ0)
  466. #define EPIC_RES36_INT_NUM          36
  467. #define EPIC_RES36_INT_VEC          (EPIC_RES36_INT_NUM + EPIC_VEC_IN_IRQ0)
  468. #define EPIC_SR_OUT_MU1_INT_NUM  37
  469. #define EPIC_SR_OUT_MU1_INT_VEC  (EPIC_SR_OUT_MU1_INT_NUM + EPIC_VEC_IN_IRQ0)
  470. #define EPIC_SR_IN_MU1_INT_NUM   38
  471. #define EPIC_SR_IN_MU1_INT_VEC   (EPIC_SR_IN_MU1_INT_NUM + EPIC_VEC_IN_IRQ0)
  472. #define EPIC_SR_OUT_MU2_INT_NUM  39
  473. #define EPIC_SR_OUT_MU2_INT_VEC  (EPIC_SR_OUT_MU2_INT_NUM + EPIC_VEC_IN_IRQ0)
  474. #define EPIC_SR_IN_MU2_INT_NUM   40
  475. #define EPIC_SR_IN_MU2_INT_VEC   (EPIC_SR_IN_MU2_INT_NUM + EPIC_VEC_IN_IRQ0)
  476. #define EPIC_RES41_INT_NUM          41
  477. #define EPIC_RES41_INT_VEC          (EPIC_RES41_INT_NUM + EPIC_VEC_IN_IRQ0)
  478. #define EPIC_RES42_INT_NUM          42
  479. #define EPIC_RES42_INT_VEC          (EPIC_RES42_INT_NUM + EPIC_VEC_IN_IRQ0)
  480. #define EPIC_RES43_INT_NUM          43
  481. #define EPIC_RES43_INT_VEC          (EPIC_RES43_INT_NUM + EPIC_VEC_IN_IRQ0)
  482. #define EPIC_RES44_INT_NUM          44
  483. #define EPIC_RES44_INT_VEC          (EPIC_RES44_INT_NUM + EPIC_VEC_IN_IRQ0)
  484. #define EPIC_RES45_INT_NUM          45
  485. #define EPIC_RES45_INT_VEC          (EPIC_RES45_INT_NUM + EPIC_VEC_IN_IRQ0)
  486. #define EPIC_RES46_INT_NUM          46
  487. #define EPIC_RES46_INT_VEC          (EPIC_RES46_INT_NUM + EPIC_VEC_IN_IRQ0)
  488. #define EPIC_RES47_INT_NUM          47
  489. #define EPIC_RES47_INT_VEC          (EPIC_RES47_INT_NUM + EPIC_VEC_IN_IRQ0)
  490. IMPORT STATUS sysEpicIntConnect (VOIDFUNCPTR * vector, VOIDFUNCPTR routine,
  491.                                    int parameter);
  492. IMPORT int sysEpicIntEnable (int vector);
  493. IMPORT int sysEpicIntDisable (int vector);
  494. IMPORT void    sysEpicInit (void);
  495. IMPORT STATUS  sysEpicIntrInit (void);
  496. IMPORT int sysEpicVecOptionsSet (int vector, UINT32 mask, UINT32 options);
  497. IMPORT UINT32 sysEpicVecOptionsGet (int vector);
  498. #ifdef INCLUDE_EPIC_CRT_INTR
  499. IMPORT UINT32 epicCisr0Get (void);
  500. IMPORT UINT32 epicCisr1Get (void);
  501. IMPORT int sysEpicCrtIntSet (int vector);
  502. IMPORT int sysEpicCrtIntUnset (int vector);
  503. IMPORT int sysEpicCrtIntGet (int vector);
  504. #endif  /* INCLUDE_EPIC_CRT_INTR */
  505. IMPORT int   epicCurTaskPrioSet (int prioNum);
  506. IMPORT int     epicIntAck (void);
  507. IMPORT void    epicEOI (void);
  508. IMPORT ULONG epicGetVecRegAdrs (int vector);
  509. IMPORT ULONG epicGetDestRegAdrs (int vector);
  510. IMPORT STATUS  epicIntSourceSet (ULONG srcAddr, int polarity,
  511.                                   int sense, int priority, int vector);
  512. IMPORT STATUS  epicIntSourceGet (ULONG srcAddr, int * pEnableMask,
  513.                                   int * pPolarity, int * pSense,
  514.                                   int * pPriority, int * pVector);
  515. IMPORT UINT32 sysEpicRegRead (ULONG regNum);
  516. IMPORT void sysEpicRegWrite (ULONG regNum, UINT32 regVal);
  517. #ifdef __cplusplus
  518. }
  519. #endif
  520. #endif /* __INCsysEpich */