vic068.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:33k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* vic068.h - VMEbus Interface Controller */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01k,22sep92,rrr  added support for c++
  7. 01j,26may92,rrr  the tree shuffle
  8. 01i,04oct91,rrr  passed through the ansification filter
  9.   -fixed #else and #endif
  10.   -changed ASMLANGUAGE to _ASMLANGUAGE
  11.   -changed copyright notice
  12. 01h,06may91,nfs  moved ifdef's to ensure clean mangening
  13. 01g,30apr91,nfs  added ifdef for documentation
  14. 01f,25apr91,nfs  corrected VME_ICGS and VME_ICMS defines (rs33 document error)
  15.  corrected VME_SET_ADRS and VME_CLR_ADRS (VIC document error)
  16.                  ICR5 defines removed, revisions are referred to by their hex
  17.  code (f1,f2,f3,f4,f5 and f8 are currently valid)
  18. 01e,25mar91,del  re-definition of VIC_ADRS and VME_ICF_ADRS permitted
  19. 01d,25mar91,nfs  re-written
  20.             jcf
  21. 01c,25nov90,gae  WRS cleanup.
  22. 01b,22mar90,eve  general cleanup
  23. 01a,12mar89,fwa  written.
  24. */
  25. #ifdef DOC
  26. #define INCvic068h
  27. #endif /* DOC */
  28. #ifndef __INCvic068h
  29. #define __INCvic068h
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /*
  34. This file contains constants for the VTC VMEbus Interface controller.
  35. The macro VIC_BASE_ADRS must be defined when including this header.
  36. The following standards have been adopted in the creation of this file.
  37. Register definitions which provide access to the VIC chip locally
  38. (on-board) have the prefix "VIC".  Register definitions which provide
  39. access to the VIC chip via the VMEbus (off-board) have the prefix
  40. "VME".
  41. The registers are listed in ascending (numerical) order; the definitions
  42. for each register are started with a header eg.
  43.  Register    Register Register          Register
  44.  Mnemonic     Number  Address             Name
  45.     |           |        |                 |
  46.     v           v        v                 v
  47. *****************************************************************
  48. * VIICR        0x01    0x03     VME Interrupter Irq Control Reg *
  49. *****************************************************************
  50. in some cases where a number of registers have the same definitions the
  51. header looks like this eg.
  52. ****************************************************************
  53. * VICR1        0x02    0x07     VME Interrupt Control Reg #1   *
  54. * to                                                           *
  55. * VICR7        0x08    0x1f     VME Interrupt Control Reg #7   *
  56. ****************************************************************
  57. The format of the definitions is as follows; the define name always
  58. starts with the register mnemonic it is associated with. The [7-0]
  59. number at the end of the comment indicates the bit position the define
  60. applies to; the definition ICGICR_IRQ_EN_ICGS3, in the following
  61. example, the 7 applies to bit 7
  62.    | |
  63.    v v
  64.  define ICGICR_IRQ_EN_ICGS3 0x00  * enable  ICGS3 local int 7 *
  65. If the define applies to more than one bit, then the applicable bit
  66. range is specified by two digits; in the following example ICGICR_IRQ_EN_ICGS,
  67. applies to the four bit field, bits 7-4.
  68. |
  69. v
  70.  define ICGICR_IRQ_EN_ICGS 0x00  * enable  all ICGS local int's 74 *
  71. If no bit field is given, then the define applies to the whole register.
  72. */
  73. #ifdef _ASMLANGUAGE
  74. #define CAST
  75. #else
  76. /* #define CAST (UCHAR *) */
  77. #define CAST (char *)
  78. #endif /* _ASMLANGUAGE */
  79. /* on-board access, register definitions */
  80. #define VIC_REG_INTERVAL 4
  81. #ifndef VIC_ADRS /* to permit alternative board addressing */
  82. #define VIC_ADRS(reg)   (CAST (VIC_BASE_ADRS + (reg * VIC_REG_INTERVAL) + 3))
  83. #endif /* VIC_ADRS */
  84. #define VIC_VIICR VIC_ADRS(0x00) /* VME Interrupter Irq Control Reg */
  85. #define VIC_VICR1 VIC_ADRS(0x01) /* VME Interrupt Control Reg #1    */
  86. #define VIC_VICR2 VIC_ADRS(0x02) /* VME Interrupt Control Reg #2    */
  87. #define VIC_VICR3 VIC_ADRS(0x03) /* VME Interrupt Control Reg #3    */
  88. #define VIC_VICR4 VIC_ADRS(0x04) /* VME Interrupt Control Reg #4    */
  89. #define VIC_VICR5 VIC_ADRS(0x05) /* VME Interrupt Control Reg #5    */
  90. #define VIC_VICR6 VIC_ADRS(0x06) /* VME Interrupt Control Reg #6    */
  91. #define VIC_VICR7 VIC_ADRS(0x07) /* VME Interrupt Control Reg #7    */
  92. #define VIC_DSICR VIC_ADRS(0x08) /* DMA Status Int Control Reg      */
  93. #define VIC_LICR1 VIC_ADRS(0x09) /* Local Interrupt Control Reg #1  */
  94. #define VIC_LICR2 VIC_ADRS(0x0a) /* Local Interrupt Control Reg #2  */
  95. #define VIC_LICR3 VIC_ADRS(0x0b) /* Local Interrupt Control Reg #3  */
  96. #define VIC_LICR4 VIC_ADRS(0x0c) /* Local Interrupt Control Reg #4  */
  97. #define VIC_LICR5 VIC_ADRS(0x0d) /* Local Interrupt Control Reg #5  */
  98. #define VIC_LICR6 VIC_ADRS(0x0e) /* Local Interrupt Control Reg #6  */
  99. #define VIC_LICR7 VIC_ADRS(0x0f) /* Local Interrupt Control Reg #7  */
  100. #define VIC_ICGICR VIC_ADRS(0x10) /* ICGS Interrupt Control Reg      */
  101. #define VIC_ICMICR VIC_ADRS(0x11) /* ICMS Interrupt Control Reg      */
  102. #define VIC_EGICR VIC_ADRS(0x12) /* Error Group Int Control Reg     */
  103. #define VIC_ICGIVBR VIC_ADRS(0x13) /* ICGS Interrupt Vector Base Reg  */
  104. #define VIC_ICMIVBR VIC_ADRS(0x14) /* ICMS Interrupt Vector Base Reg  */
  105. #define VIC_LIVBR VIC_ADRS(0x15) /* Local Int Vector Base Reg       */
  106. #define VIC_EGIVBR VIC_ADRS(0x16) /* Error Group Int Vec Base Reg    */
  107. #define VIC_ICSR VIC_ADRS(0x17) /* Interprocessor Comm Switch Reg  */
  108. #define VIC_ICR0 VIC_ADRS(0x18) /* Interprocessor Comm. Reg #0     */
  109. #define VIC_ICR1 VIC_ADRS(0x19) /* Interprocessor Comm. Reg #1     */
  110. #define VIC_ICR2 VIC_ADRS(0x1a) /* Interprocessor Comm. Reg #2     */
  111. #define VIC_ICR3 VIC_ADRS(0x1b) /* Interprocessor Comm. Reg #3     */
  112. #define VIC_ICR4 VIC_ADRS(0x1c) /* Interprocessor Comm. Reg #4     */
  113. #define VIC_ICR5 VIC_ADRS(0x1d) /* Interprocessor Comm. Reg #5     */
  114. #define VIC_ICR6 VIC_ADRS(0x1e) /* Interprocessor Comm. Reg #6     */
  115. #define VIC_ICR7 VIC_ADRS(0x1f) /* Interprocessor Comm. Reg #7     */
  116. #define VIC_VIRSR VIC_ADRS(0x20) /* VME Interrupt Request/Stat. Reg */
  117. #define VIC_VIVR1 VIC_ADRS(0x21) /* VME Interrupt Vector Reg #1     */
  118. #define VIC_VIVR2 VIC_ADRS(0x22) /* VME Interrupt Vector Reg #2     */
  119. #define VIC_VIVR3 VIC_ADRS(0x23) /* VME Interrupt Vector Reg #3     */
  120. #define VIC_VIVR4 VIC_ADRS(0x24) /* VME Interrupt Vector Reg #4     */
  121. #define VIC_VIVR5 VIC_ADRS(0x25) /* VME Interrupt Vector Reg #5     */
  122. #define VIC_VIVR6 VIC_ADRS(0x26) /* VME Interrupt Vector Reg #6     */
  123. #define VIC_VIVR7 VIC_ADRS(0x27) /* VME Interrupt Vector Reg #7     */
  124. #define VIC_TTR VIC_ADRS(0x28) /* Transfer Time-out Reg           */
  125. #define VIC_LBTR VIC_ADRS(0x29) /* Local Bus Timing Reg            */
  126. #define VIC_BTDR VIC_ADRS(0x2a) /* Block Transfer Definition Reg   */
  127. #define VIC_ICR VIC_ADRS(0x2b) /* Interface Configuration Reg     */
  128. #define VIC_ARCR VIC_ADRS(0x2c) /* Arbiter/Requester Config. Reg   */
  129. #define VIC_AMSR VIC_ADRS(0x2d) /* AM Source Reg                   */
  130. #define VIC_BESR VIC_ADRS(0x2e) /* Bus Error Status Reg            */
  131. #define VIC_DSR VIC_ADRS(0x2f) /* DMA Status Reg                  */
  132. #define VIC_SS0CR0 VIC_ADRS(0x30) /* Slave Select 0/Control Reg #0   */
  133. #define VIC_SS0CR1 VIC_ADRS(0x31) /* Slave Select 0/Control Reg #1   */
  134. #define VIC_SS1CR0 VIC_ADRS(0x32) /* Slave Select 1/Control Reg #0   */
  135. #define VIC_SS1CR1 VIC_ADRS(0x33) /* Slave Select 1/Control Reg #1   */
  136. #define VIC_RCR VIC_ADRS(0x34) /* Release Control Reg             */
  137. #define VIC_BTCR VIC_ADRS(0x35) /* Block Transfer Control Reg      */
  138. #define VIC_BTLR0 VIC_ADRS(0x36) /* Block Transfer Length Reg #0    */
  139. #define VIC_BTLR1 VIC_ADRS(0x37) /* Block Transfer Length Reg #1    */
  140. #define VIC_SRR VIC_ADRS(0x38) /* System Reset Reg                */
  141. /* off-board access, register definitions */
  142. #define VME_ICF_REG_INTERVAL 2
  143. #ifndef VME_ICF_ADRS /* to permit alternative off-board addressing */
  144. #define VME_ICF_ADRS(adrs, icf, type, reg) 
  145. (CAST (adrs + icf + (reg * VME_ICF_REG_INTERVAL) + type ))
  146. #endif /* VME_ICF_ADRS */
  147. /* Interprocessor Communication Facility - icf */
  148. #define VME_ICR 0x00 /* IC Registers       ICR0-7  */
  149. #define VME_ICGS 0x10 /* IC Global Switches ICGS0-3 */
  150. #define VME_ICMS 0x20 /* IC Module Switches ICMS0-3 */
  151. /* Type of register access - type */
  152. #define VME_ODD_ADRS 0x01 /* ICR always accessed at odd byte addresses */
  153. #define VME_SET_ADRS 0x01 /* ICGS and ICMS set    switch access */
  154. #define VME_CLR_ADRS 0x00 /* ICGS and ICMS clear  switch access */
  155. #define VME_ICR0(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,0)
  156. #define VME_ICR1(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,1)
  157. #define VME_ICR2(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,2)
  158. #define VME_ICR3(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,3)
  159. #define VME_ICR4(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,4)
  160. #define VME_ICR5(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,5)
  161. #define VME_ICR6(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,6)
  162. #define VME_ICR7(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICR,VME_ODD_ADRS,7)
  163. #define VME_ICGS0_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_SET_ADRS,0)
  164. #define VME_ICGS0_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_CLR_ADRS,0)
  165. #define VME_ICGS1_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_SET_ADRS,1)
  166. #define VME_ICGS1_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_CLR_ADRS,1)
  167. #define VME_ICGS2_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_SET_ADRS,2)
  168. #define VME_ICGS2_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_CLR_ADRS,2)
  169. #define VME_ICGS3_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_SET_ADRS,3)
  170. #define VME_ICGS3_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICGS,VME_CLR_ADRS,3)
  171. #define VME_ICMS0_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_SET_ADRS,0)
  172. #define VME_ICMS0_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_CLR_ADRS,0)
  173. #define VME_ICMS1_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_SET_ADRS,1)
  174. #define VME_ICMS1_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_CLR_ADRS,1)
  175. #define VME_ICMS2_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_SET_ADRS,2)
  176. #define VME_ICMS2_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_CLR_ADRS,2)
  177. #define VME_ICMS3_SET(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_SET_ADRS,3)
  178. #define VME_ICMS3_CLR(baseAdrs) VME_ICF_ADRS(baseAdrs,VME_ICMS,VME_CLR_ADRS,3)
  179. /****************************************************************
  180. * VIICR        0x00    0x03     VME Interrupter Irq Control Reg *
  181. *****************************************************************/
  182. #define VIICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask 7 */
  183. #define VIICR_IRQ_DISABLE 0x80 /* disable interrupter IRQ      7 */
  184. /***************************************************************
  185. * VICR1        0x01    0x07     VME Interrupt Control Reg #1   *
  186. * to                                                           *
  187. * VICR7        0x07    0x1f     VME Interrupt Control Reg #7   *
  188. ****************************************************************/
  189. #define VICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask 7 */
  190. #define VICR_IRQ_DISABLE 0x80 /* disable interrupt IRQ 7 */
  191. /***************************************************************
  192. * DSICR        0x08    0x23     DMA Status Int Control Reg     *
  193. ****************************************************************/
  194. #define DSICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask 7 */
  195. #define DSICR_IRQ_DISABLE 0x80 /* disable DMA termination IRQ 7 */
  196. /***************************************************************
  197. * LICR1        0x09    0x27     Local Interrupt Control Reg #1 *
  198. * to                                                           *
  199. * LICR7        0x0f    0x3f     Local Interrupt Control Reg #7 *
  200. ****************************************************************/
  201. #define LICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask   */
  202. #define LICR_IRQ_STATE 0x08 /* LIRQ(i) state 3 */
  203. #define LICR_IRQ_VEC_DEV 0x00 /* device supplies vector 4 */
  204. #define LICR_IRQ_VEC_VIC 0x10 /* VIC supplies vector 4 */
  205. #define LICR_IRQ_LEVEL 0x00 /* level sensitive 5 */
  206. #define LICR_IRQ_EDGE 0x20 /* edge sensitive 5 */
  207. #define LICR_IRQ_ACTIVEL 0x00 /* active low 6 */
  208. #define LICR_IRQ_ACTIVEH 0x40 /* active high 6 */
  209. #define LICR_IRQ_ENABLE 0x00 /* enable  IRQ 7 */
  210. #define LICR_IRQ_DISABLE 0x80 /* disable IRQ 7 */
  211. /***************************************************************
  212. * ICGICR       0x10    0x43     ICGS Interrupt Control Reg     *
  213. ****************************************************************/
  214. #define ICGICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask   */
  215. #define ICGICR_IRQ_ICGS0_ENA 0x00 /* enable  ICGS0 local interrpt 4 */
  216. #define ICGICR_IRQ_ICGS0_DIS 0x10 /* disable ICGS0 local interrpt 4 */
  217. #define ICGICR_IRQ_ICGS1_ENA 0x00 /* enable  ICGS1 local interrpt 5 */
  218. #define ICGICR_IRQ_ICGS1_DIS    0x20 /* disable ICGS1 local interrpt 5 */
  219. #define ICGICR_IRQ_ICGS2_ENA 0x00 /* enable  ICGS2 local interrpt 6 */
  220. #define ICGICR_IRQ_ICGS2_DIS 0x40 /* disable ICGS2 local interrpt 6 */
  221. #define ICGICR_IRQ_ICGS3_ENA 0x00 /* enable  ICGS3 local interrpt 7 */
  222. #define ICGICR_IRQ_ICGS3_DIS 0x80 /* disable ICGS3 local interrpt 7 */
  223. /***************************************************************
  224. * ICMICR       0x11    0x47     ICMS Interrupt Control Reg     *
  225. ****************************************************************/
  226. #define ICMICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask   */
  227. #define ICMICR_IRQ_ICMS0_DIS 0x10 /* disable ICMS0 local interrpt 4 */
  228. #define ICMICR_IRQ_ICMS1_DIS 0x20 /* disable ICMS1 local interrpt 5 */
  229. #define ICMICR_IRQ_ICMS2_DIS 0x40 /* disable ICMS2 local interrpt 6 */
  230. #define ICMICR_IRQ_ICMS3_DIS 0x80 /* disable ICMS3 local interrpt 7 */
  231. /***************************************************************
  232. * EGICR        0x12    0x4b     Error Group Int Control Reg    *
  233. ****************************************************************/
  234. #define EGICR_IRQ_LVL_MASK 0x07 /* local interrupt level mask   */
  235. #define EGICR_IRQ_SYSFAIL_ENA 0x00 /* enable  SYSFAIL* local int 4 */
  236. #define EGICR_IRQ_SYSFAIL_DIS 0x10 /* disable SYSFAIL* local int 4 */
  237. #define EGICR_IRQ_ABTTO_ENA 0x00 /* enable  arbitration time out 5 */
  238. #define EGICR_IRQ_ABTTO_DIS 0x20 /* disable arbitration time out 5 */
  239. #define EGICR_IRQ_WPFAIL_ENA 0x00 /* enable  write post fail 6 */
  240. #define EGICR_IRQ_WPFAIL_DIS 0x40 /* disable write post fail 6 */
  241. #define EGICR_IRQ_ACFAIL_ENA 0x00 /* enable  ACFAIL* local int 7 */
  242. #define EGICR_IRQ_ACFAIL_DIS 0x80 /* disable ACFAIL* local int 7 */
  243. /***************************************************************
  244. * ICGIVBR      0x13    0x4f     ICGS Interrupt Vector Base Reg *
  245. ****************************************************************/
  246. /* Identity of interrupting ICGS (read only) */
  247. #define ICGIVBR_ICGS0 0x00 /* ICGS0 10 */
  248. #define ICGIVBR_ICGS1 0x01 /* ICGS1 10 */
  249. #define ICGIVBR_ICGS2 0x02 /* ICGS2 10 */
  250. #define ICGIVBR_ICGS3 0x03 /* ICGS3 10 */
  251. #define ICGIVBR_VEC_MASK 0xfc /* ICGS vector base mask   */
  252. /***************************************************************
  253. * ICMIVBR      0x14    0x53     ICMS Interrupt Vector Base Reg *
  254. ****************************************************************/
  255. /* Identity of interrupting ICMS (read only) */
  256. #define ICMIVBR_ICMS0 0x00 /* ICMS0 10 */
  257. #define ICMIVBR_ICMS1 0x01 /* ICMS1 10 */
  258. #define ICMIVBR_ICMS2 0x02 /* ICMS2 10 */
  259. #define ICMIVBR_ICMS3 0x03 /* ICMS3 10 */
  260. #define ICMIVBR_VEC_MASK 0xfc /* ICMI vector base mask   */
  261. /***************************************************************
  262. * LIVBR        0x15    0x57     Local Int Vector Base Reg      *
  263. ****************************************************************/
  264. /* Identity of local interrupt (read only) */
  265. #define LIVBR_LIRQ1 0x01 /* LIRQ1 20 */
  266. #define LIVBR_LIRQ2 0x02 /* LIRQ2 20 */
  267. #define LIVBR_LIRQ3 0x03 /* LIRQ3 20 */
  268. #define LIVBR_LIRQ4 0x04 /* LIRQ4 20 */
  269. #define LIVBR_LIRQ5 0x05 /* LIRQ5 20 */
  270. #define LIVBR_LIRQ6 0x06 /* LIRQ6 20 */
  271. #define LIVBR_LIRQ7 0x07 /* LIRQ7 20 */
  272. #define LIVBR_VEC_MASK 0xf8 /* LIRQ vector base mask   */
  273. /***************************************************************
  274. * EGIVBR       0x16    0x5b     Error Group Int Vec Base Reg   *
  275. ****************************************************************/
  276. /* Error Conditions (read only) */
  277. #define EGIVBR_ACFAIL 0x00 /* ACFAIL* error condition 20 */
  278. #define EGIVBR_WPFAIL 0x01 /* write post fail error cond 20 */
  279. #define EGIVBR_ABTTO 0x02 /* arbitration time out err con 20 */
  280. #define EGIVBR_SYSFAIL 0x03 /* SYSFAIL* error condition 20 */
  281. #define EGIVBR_VIIA 0x04 /* VMEbus Interrupter Interrupt 20 */
  282. /* Acknowledge error condition 20 */
  283. #define EGIVBR_DMAI 0x05 /* DMA Interrupt 20 */
  284. #define EGIVBR_VEC_MASK 0xf8 /* EGIRQ vector base mask   */
  285. /***************************************************************
  286. * ICSR         0x17    0x5f     Interprocessor Comm Switch Reg *
  287. ****************************************************************/
  288. #define ICSR_ICMS0 0x01 /* set   ICMS0  0 */
  289. #define ICSR_ICMS1 0x02 /* set   ICMS1  1 */
  290. #define ICSR_ICMS2 0x04 /* set   ICMS2  2 */
  291. #define ICSR_ICMS3 0x08 /* set   ICMS3  3 */
  292. /* ICGS (read only) */
  293. #define ICSR_ICGS0 0x10 /* set   ICGS0  4 */
  294. #define ICSR_ICGS1 0x20 /* set   ICGS1  5 */
  295. #define ICSR_ICGS2 0x40 /* set   ICGS2  6 */
  296. #define ICSR_ICGS3 0x80 /* set   ICGS3  7 */
  297. /***************************************************************
  298. * ICR0         0x18    0x63     Interprocessor Comm. Reg #0    *
  299. * to                                                           *
  300. * ICR4         0x1c    0x73     Interprocessor Comm. Reg #4    *
  301. ****************************************************************/
  302. /* none */
  303. /***************************************************************
  304. * ICR5         0x1d    0x77     Interprocessor Comm. Reg #5    *
  305. *                               (VIC ID Register)        *
  306. ****************************************************************/
  307. /* none - revisions are referred to by the hex code */
  308. /***************************************************************
  309. * ICR6         0x1e    0x7b     Interprocessor Comm. Reg #6    *
  310. ****************************************************************/
  311. /* XXX should the following fields be 6 or 7 bits wide ? */
  312. #define ICR6_HALT 0x3d /* VIC detected VME HALT   50 */
  313. #define ICR6_IRESET 0x3e /* VIC performing reset function  50 */
  314. #define ICR6_SYSRESET 0x3f /* VMEbus SYSRESET   50 */
  315. #define ICR6_HALT_IRESET 0x40 /* VMEbus HALT or IRESET asserted  6 */
  316. #define ICR6_SYSFAIL 0x40 /* assert SYSFAIL    6 */
  317. #define ICR6_ACFAIL 0x80 /* ACFAIL state    7 */
  318. /***************************************************************
  319. * ICR7         0x1f    0x7f     Interprocessor Comm. Reg #7    *
  320. ****************************************************************/
  321. #define ICR7_ICR0 0x01 /* ICR0 semaphore 0 */
  322. #define ICR7_ICR1 0x02 /* ICR1 semaphore 1 */
  323. #define ICR7_ICR2 0x04 /* ICR2 semaphore 2 */
  324. #define ICR7_ICR3 0x08 /* ICR3 semaphore 3 */
  325. #define ICR7_ICR4 0x10 /* ICR4 semaphore 4 */
  326. #define ICR7_MASTER     0x20    /* the VIC is VMEbus master     5 */
  327. #define ICR7_RESET 0x40 /* assert  RESET* and HALT*  6 */
  328. #define ICR7_SYSFAIL_INH 0x80 /* inhibit SYSFAIL* assertion 7 */
  329. /*****************************************************************
  330. * VIRSR        0x20    0x83     VME Interrupt Request/Status Reg *
  331. ******************************************************************/
  332. #define VIRSR_IRQ_ENA 0x01     /* VMEbus interrupt enable  0 */
  333. #define VIRSR_IRQ1 0x02     /* assert on VMEbus, VME IRQ 1 1 */
  334. #define VIRSR_IRQ2 0x04     /* assert on VMEbus, VME IRQ 2 2 */
  335. #define VIRSR_IRQ3 0x08     /* assert on VMEbus, VME IRQ 3 3 */
  336. #define VIRSR_IRQ4 0x10     /* assert on VMEbus, VME IRQ 4 4 */
  337. #define VIRSR_IRQ5 0x20     /* assert on VMEbus, VME IRQ 5 5 */
  338. #define VIRSR_IRQ6 0x40     /* assert on VMEbus, VME IRQ 6 6 */
  339. #define VIRSR_IRQ7 0x80     /* assert on VMEbus, VME IRQ 7 7 */
  340. /***************************************************************
  341. * VIVR1        0x21    0x87     VME Interrupt Vector Reg #1    *
  342. * to                                                           *
  343. * VIVR7        0x27    0xaf     VME Interrupt Vector Reg #7    *
  344. ****************************************************************/
  345. /* none */
  346. /***************************************************************
  347. * TTR          0x28    0xa3     Transfer Time-out Reg          *
  348. ****************************************************************/
  349. #define TTR_VTO_ACQ_EXC 0x00 /* exclude aquisition time  0 */
  350. #define TTR_VTO_ACQ_INC 0x01 /* include aquisition time  0 */
  351. #define TTR_ARBTO 0x02 /* arbitration timeout occured  1 */
  352. #define TTR_LTO_4 0x00 /* local 4 us time out 42 */
  353. #define TTR_LTO_16 0x04 /* local 16 us time out  42 */
  354. #define TTR_LTO_32 0x08 /* local 32 us time out  42 */
  355. #define TTR_LTO_64 0x0c /* local 64 us time out 42 */
  356. #define TTR_LTO_128 0x10 /* local 128 us time out 42 */
  357. #define TTR_LTO_256 0x14 /* local 256 us time out 42 */
  358. #define TTR_LTO_512 0x18 /* local 512 us time out 42 */
  359. #define TTR_LTO_INF 0x1c /* local infinite time out 42 */
  360. #define TTR_VTO_4 0x00 /* VMEbus 4 us time out 75 */
  361. #define TTR_VTO_16 0x20 /* VMEbus 16 us time out 75 */
  362. #define TTR_VTO_32 0x40 /* VMEbus 32 us time out 75 */
  363. #define TTR_VTO_64 0x60 /* VMEbus 64 us time out 75 */
  364. #define TTR_VTO_128 0x80 /* VMEbus 128 us time out 75 */
  365. #define TTR_VTO_256 0xa0 /* VMEbus 256 us time out 75 */
  366. #define TTR_VTO_512 0xc0 /* VMEbus 512 us time out 75 */
  367. #define TTR_VTO_INF 0xe0 /* VMEbus infinite time out 75 */
  368. /***************************************************************
  369. * LBTR         0x29    0xa7     Local Bus Timing Reg           *
  370. ****************************************************************/
  371. #define LBTR_PASL_2 0x00 /* PAS low 2 * 64 MHz clocks 30 */
  372. #define LBTR_PASL_3 0x01 /* PAS low 3 * 64 MHz clocks 30 */
  373. #define LBTR_PASL_4 0x02 /* PAS low 4 * 64 MHz clocks 30 */
  374. #define LBTR_PASL_5 0x03 /* PAS low 5 * 64 MHz clocks 30 */
  375. #define LBTR_PASL_6 0x04 /* PAS low 6 * 64 MHz clocks 30 */
  376. #define LBTR_PASL_7 0x05 /* PAS low 7 * 64 MHz clocks 30 */
  377. #define LBTR_PASL_8 0x06 /* PAS low 8 * 64 MHz clocks 30 */
  378. #define LBTR_PASL_9 0x07 /* PAS low 9 * 64 MHz clocks 30 */
  379. #define LBTR_PASL_10 0x08 /* PAS low 10 * 64 MHz clocks 30 */
  380. #define LBTR_PASL_11 0x09 /* PAS low 11 * 64 MHz clocks 30 */
  381. #define LBTR_PASL_12 0x0a /* PAS low 12 * 64 MHz clocks 30 */
  382. #define LBTR_PASL_13 0x0b /* PAS low 13 * 64 MHz clocks 30 */
  383. #define LBTR_PASL_14 0x0c /* PAS low 14 * 64 MHz clocks 30 */
  384. #define LBTR_PASL_15 0x0d /* PAS low 15 * 64 MHz clocks 30 */
  385. #define LBTR_PASL_16 0x0e /* PAS low 16 * 64 MHz clocks 30 */
  386. #define LBTR_PASL_17 0x0f /* PAS low 17 * 64 MHz clocks 30 */
  387. #define LBTR_DS_1 0x00 /* DS 1 * 64 MHz clocks   4 */
  388. #define LBTR_DS_2 0x10 /* DS 2 * 64 MHz clocks   4 */
  389. #define LBTR_PASH_1 0x00 /* PAS high 1 * 64 MHz clocks 75 */
  390. #define LBTR_PASH_2 0x20 /* PAS high 2 * 64 MHz clocks 75 */
  391. #define LBTR_PASH_3 0x40 /* PAS high 3 * 64 MHz clocks 75 */
  392. #define LBTR_PASH_4 0x60 /* PAS high 4 * 64 MHz clocks 75 */
  393. #define LBTR_PASH_5 0x80 /* PAS high 5 * 64 MHz clocks 75 */
  394. #define LBTR_PASH_6 0xa0 /* PAS high 6 * 64 MHz clocks 75 */
  395. #define LBTR_PASH_7 0xc0 /* PAS high 7 * 64 MHz clocks 75 */
  396. #define LBTR_PASH_8 0xe0 /* PAS high 8 * 64 MHz clocks 75 */
  397. /***************************************************************
  398. * BTDR         0x2a    0xab     Block Transfer Definition Reg  *
  399. ****************************************************************/
  400. #define BTDR_DPADEN 0x01 /* enable dual path DPADEN 0 */
  401. #define BTDR_AMSR 0x02 /* use AMSR for BT add modifier 1 */
  402. #define BTDR_LBTDMA_ENA 0x04 /* enable local BT 256 byte DMA 2 */
  403. #define BTDR_VBTDMA_ENA 0x08    /* enable  VME BT 256 byte DMA 3 */
  404. /***************************************************************
  405. * ICR          0x2b    0xaf     Interface Configuration Reg    *
  406. ****************************************************************/
  407. #define ICR_SCON 0x01 /* system controller pin           0 */
  408. #define ICR_TURBO 0x02 /* speed up transfers              1 */
  409. #define ICR_MORE_SETTLE_TIME 0x04 /* add 1 64 MHz intvl to async pins2 */
  410. #define ICR_DLK_RMC_NO_RETRY 0x08 /* enable deadlock signalling      3 */
  411. #define ICR_DLK_RETRY 0x10 /* signal deadlock with HALT*      4 */
  412. #define ICR_REQ_RMC 0x20 /* request bus if RMC* is asserted 5 */
  413. #define ICR_AS_STRETCH 0x40 /* strech AS*                      6 */
  414. #define ICR_AS_SIZE 0x80 /* use size information for AS*    7 */
  415. /***************************************************************
  416. * ARCR         0x2c    0xb3     Arbiter/Requester Config. Reg  *
  417. ****************************************************************/
  418. #define ARCR_NOT_FAIR 0x00 /* disable fairness               30 */
  419. #define ARCR_NO_TOUT 0x0f /* disable timeout                30 */
  420. #define ARCR_DRAM_REFRESH 0x10 /* enable DRAM refresh             4 */
  421. #define ARCR_VBRL_BR0 0x00 /* VME bus request level BR0      65 */
  422. #define ARCR_VBRL_BR1 0x20 /* VME bus request level BR1      65 */
  423. #define ARCR_VBRL_BR2 0x40 /* VME bus request level BR2      65 */
  424. #define ARCR_VBRL_BR3 0x60 /* VME bus request level BR3      65 */
  425. #define ARCR_RND_ROBIN 0x00 /* select round robin arbitration  7 */
  426. #define ARCR_PRIORITY 0x80 /* select priority arbitration     7 */
  427. /***************************************************************
  428. * AMSR         0x2d    0xb7     AM Source Reg                  *
  429. ****************************************************************/
  430. /* Extended (A32) address modifier codes   */
  431. #define AMSR_EXT_USR_DATA 0x09 /* user data        50 */
  432. #define AMSR_EXT_USR_PROG 0x0a /* user program access        50 */
  433. #define AMSR_EXT_USR_BLOCK 0x0b /* user block transfer access  50 */
  434. #define AMSR_EXT_SPR_DATA 0x0d /* supervisory data access     50 */
  435. #define AMSR_EXT_SPR_PROG 0x0e /* supervisory program access  50 */
  436. #define AMSR_EXT_SPR_BLOCK 0x0f /* super block transfer access 50 */
  437. /* AMSR_Short (A16) address modifier codes      */
  438. #define AMSR_SHT_USR_ACCESS 0x29 /* user access                 50 */
  439. #define AMSR_SHT_SPR_ACCESS 0x2d /* supervisory access          50 */
  440. /* AMSR_Standard (A24) address modifier codes   */
  441. #define AMSR_STD_USR_DATA 0x39    /* user data                   50 */
  442. #define AMSR_STD_USR_PROG 0x3a    /* user program access         50 */
  443. #define AMSR_STD_USR_BLOCK 0x3b    /* user block transfer access  50 */
  444. #define AMSR_STD_SPR_DATA 0x3d    /* supervisory data access     50 */
  445. #define AMSR_STD_SPR_PROG 0x3e    /* supervisory program access  50 */
  446. #define AMSR_STD_SPR_BLOCK 0x3f    /* super block transfer access 50 */
  447. /* AMSR_during slave access/cycles   */
  448. #define AMSR_SLV_CMP_ALL 0x00 /* all 6 add modifier bits comp    6 */
  449. #define AMSR_SLV_CMP_3MSB 0x40 /* only 3 most significant add    6 */
  450. /* modifier bits compared      */
  451. /* Master access/cycles      */
  452. #define AMSR_MSTR_CMP_ALL 0x00 /* all 6 add modifier bits used    7 */
  453. #define AMSR_MSTR_CMP_3MSB 0x80 /* only 3 most significant add    7 */
  454. /* modifier bits used      */
  455. /***************************************************************
  456. * BESR         0x2e    0xbb     Bus Error Status Reg           *
  457. ****************************************************************/
  458. #define BESR_LBTOA 0x01 /* local  bus time out during 0 */
  459. /* attempted acquisition   */
  460. #define BESR_SA_SLSEL1 0x02 /* self-access by SLSEL1 1 */
  461. #define BESR_SA_SLSEL0 0x04 /* self-access by SLSEL0 2 */
  462. #define BESR_LBTO 0x08 /* local  bus time out 3 */
  463. #define BESR_VBTO 0x10 /* VMEbus time out (bus master) 4 */
  464. #define BESR_VBERR 0x20 /* VMEbus bus error BERR* 5 */
  465. #define BESR_LBERR 0x40 /* local  bus error LBERR* 6 */
  466. #define BESR_MASTER 0x80 /* the VIC is VMEbus master 7 */
  467. /***************************************************************
  468. * DSR          0x2f    0xbf     DMA Status Reg                 *
  469. ****************************************************************/
  470. #define DSR_INTER_DMA 0x01 /* interleaved DMA in progress 0 */
  471. #define DSR_LBERR_DMA 0x02 /* local  bus error LBERR* during DMA 1 */
  472. #define DSR_VBERR_DMA 0x04 /* VMEbus bus error BERR*  during DMA 2 */
  473. #define DSR_LBERR 0x08 /* local  bus error LBERR* asserted     3 */
  474. #define DSR_VBERR 0x10 /* VMEbus bus error BERR*  asserted 4 */
  475. #define DSR_BTDMA 0x60 /* VME/local 256 byte address error    65 */
  476. #define DSR_MASTER_WP 0x80 /* master write post info is stored 7 */
  477. /****************************************************************/
  478. /* SS0CR0       0x30    0xc3     Slave Select 0/Control Reg #0  */
  479. /* and */
  480. /* SS1CR0       0x32    0xcb     Slave Select 1/Control Reg #0  */
  481. /****************************************************************/
  482. /* SS0CR0 and SS1CR0 */
  483. #define SSCR0_BLT_NONE 0x00 /* no block transfer allowed    10 */
  484. #define SSCR0_BLT_LOCAL 0x01 /* emulate blck trans on local bus 10 */
  485. #define SSCR0_BLT_ACC 0x02 /* accelerated block transfer      10 */
  486. #define SSCR0_ASIZ_A32 0x00 /* A32   address size    32 */
  487. #define SSCR0_ASIZ_A24 0x04 /* A24   address size    32 */
  488. #define SSCR0_ASIZ_A16 0x08 /* A16   address size    32 */
  489. #define SSCR0_ASIZ_AMREG 0x0c /* use Addr Modifier source reg    32 */
  490. #define SSCR0_SLSEL_D32 0x10 /* D32 SLSEL[01]* data size     4 */
  491. #define SSCR0_SLSEL_D16 0x00 /* D32 SLSEL[01]* data size     4 */
  492. #define SSCR0_SLSEL_SPR 0x20 /* supervisory SLSEL[01]* access only  5 */
  493. #define SSCR0_SLSEL_ALL 0x00 /* all modes   SLSEL[01]* access     5 */
  494. /* SS1CR0 */
  495. #define SSCR0_MASTER_WP      0x40    /* enable master write posting     6 */
  496. #define SSCR0_MASTER_NWP      0x00    /* no     master write posting     6 */
  497. #define SSCR0_SLAVE_WP       0x80    /* enable slave  write posting     7 */
  498. #define SSCR0_SLAVE_NWP       0x00    /* no     slave  write posting     7 */
  499. /* SS0CR0 */
  500. #define SSCR0_TIMER_MASK 0x3f /* timer field mask                   */
  501. #define SSCR0_TIMER_DIS 0x00 /* timer disabled    76 */
  502. #define SSCR0_TIMER_50 0x40 /* 50  Hz timer (output on LIRQ2*) 76 */
  503. #define SSCR0_TIMER_1000 0x80 /* 1000 Hz timer (outpt on LIRQ2*) 76 */
  504. #define SSCR0_TIMER_100 0xc0 /* 100 Hz timer (output on LIRQ2*) 76 */
  505. /***************************************************************
  506. * SS0CR1       0x31    0xc7     Slave Select 0/Control Reg #1  *
  507. * and        *
  508. * SS1CR1       0x33    0xcf     Slave Select 1/Control Reg #1  *
  509. ****************************************************************/
  510. #define SSCR1_DTACK_0 0x00 /* 0   x 64 Mhz DTACK* delay 30 */
  511. #define SSCR1_DTACK_2 0x01 /* 2   x 64 Mhz DTACK* delay 30 */
  512. #define SSCR1_DTACK_25 0x02 /* 2.5 x 64 Mhz DTACK* delay 30 */
  513. #define SSCR1_DTACK_3 0x03 /* 3   x 64 Mhz DTACK* delay 30 */
  514. #define SSCR1_DTACK_35 0x04 /* 3.5 x 64 Mhz DTACK* delay 30 */
  515. #define SSCR1_DTACK_4 0x05 /* 4   x 64 Mhz DTACK* delay 30 */
  516. #define SSCR1_DTACK_45 0x06 /* 4.5 x 64 Mhz DTACK* delay 30 */
  517. #define SSCR1_DTACK_5 0x07 /* 5   x 64 Mhz DTACK* delay 30 */
  518. #define SSCR1_DTACK_55 0x08 /* 5.5 x 64 Mhz DTACK* delay 30 */
  519. #define SSCR1_DTACK_6 0x09 /* 6   x 64 Mhz DTACK* delay 30 */
  520. #define SSCR1_DTACK_65 0x0a /* 6.5 x 64 Mhz DTACK* delay 30 */
  521. #define SSCR1_DTACK_7 0x0b /* 7   x 64 Mhz DTACK* delay 30 */
  522. #define SSCR1_DTACK_75 0x0c /* 7.5 x 64 Mhz DTACK* delay 30 */
  523. #define SSCR1_DTACK_8 0x0d /* 8   x 64 Mhz DTACK* delay 30 */
  524. #define SSCR1_DTACK_85 0x0e /* 8.5 x 64 Mhz DTACK* delay 30 */
  525. #define SSCR1_DTACK_9 0x0f /* 9   x 64 Mhz DTACK* delay 30 */
  526. #define SSCR1_DSACK_0 0x00 /* 0   x 64 Mhz DTACK* delay 74 */
  527. #define SSCR1_DSACK_2 0x10 /* 2   x 64 Mhz DTACK* delay 74 */
  528. #define SSCR1_DSACK_25 0x20 /* 2.5 x 64 Mhz DTACK* delay 74 */
  529. #define SSCR1_DSACK_3 0x30 /* 3   x 64 Mhz DTACK* delay 74 */
  530. #define SSCR1_DSACK_35 0x40 /* 3.5 x 64 Mhz DTACK* delay 74 */
  531. #define SSCR1_DSACK_4 0x50 /* 4   x 64 Mhz DTACK* delay 74 */
  532. #define SSCR1_DSACK_45 0x60 /* 4.5 x 64 Mhz DTACK* delay 74 */
  533. #define SSCR1_DSACK_5 0x70 /* 5   x 64 Mhz DTACK* delay 74 */
  534. #define SSCR1_DSACK_55 0x80 /* 5.5 x 64 Mhz DTACK* delay 74 */
  535. #define SSCR1_DSACK_6 0x90 /* 6   x 64 Mhz DTACK* delay 74 */
  536. #define SSCR1_DSACK_65 0xa0 /* 6.5 x 64 Mhz DTACK* delay 74 */
  537. #define SSCR1_DSACK_7 0xb0 /* 7   x 64 Mhz DTACK* delay 74 */
  538. #define SSCR1_DSACK_75 0xc0 /* 7.5 x 64 Mhz DTACK* delay 74 */
  539. #define SSCR1_DSACK_8 0xd0 /* 8   x 64 Mhz DTACK* delay 74 */
  540. #define SSCR1_DSACK_85 0xe0 /* 8.5 x 64 Mhz DTACK* delay 74 */
  541. #define SSCR1_DSACK_9 0xf0 /* 9   x 64 Mhz DTACK* delay 74 */
  542. /***************************************************************
  543. * RCR          0x34    0xd3     Release Control Reg            *
  544. ****************************************************************/
  545. #define RCR_ROR 0x00 /* release on request 76 */
  546. #define RCR_RWD 0x40 /* release when done 76 */
  547. #define RCR_ROC 0x80 /* release on BCLR* 76 */
  548. #define RCR_BCAP 0xc0 /* bus capture and hold 76 */
  549. /***************************************************************
  550. * BTCR         0x35    0xd7     Block Transfer Control Reg     *
  551. ****************************************************************/
  552. #define BTCR_LCIP_MASK 0x0f /* local cycle interl've period mk 30 */
  553. #define BTCR_DMA_WRITE 0x10 /* write DMA enable     4 */
  554. /* Note: bits 7, 6 and 5 are mutually exclusive        */
  555. #define BTCR_MBT 0x20 /* enable   MOVEM type block trsfer 5 */
  556. #define BTCR_VDMA_GO 0x40 /* initiate VME   DMA block trsfer  6 */
  557. #define BTCR_LDMA_GO 0x80 /* initiate local DMA block trsfer  7 */
  558. /***************************************************************
  559. * BTLR0        0x36    0xdb     Block Transfer Length Reg #0   *
  560. * and        *
  561. * BTLR1        0x37    0xdf     Block Transfer Length Reg #1   *
  562. ****************************************************************/
  563. /* none */
  564. /***************************************************************
  565. * SRR          0x38    0xe3     System Reset Reg               *
  566. ****************************************************************/
  567. #define SRR_SYSRESET 0xf0 /* assert SYSRESET on the VMEbus and */
  568. /* reset all reset-able VIC registers */
  569. #ifdef __cplusplus
  570. }
  571. #endif
  572. #endif /* __INCvic068h */