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

VxWorks

开发平台:

C/C++

  1. /* fc68165.h - Force FC68165 (IOC) chip header file */
  2. /*
  3. modification history
  4. --------------------
  5. 01b,22sep92,rrr  added support for c++
  6. 01a,19jul92,caf  initial WRS version.  added check for _ASMLANGUAGE macro.
  7.  originally from Mike McCrary (Force).
  8. */
  9. /*
  10. This file contains the definitions for the IOC chip and IOC structure.
  11. */
  12. #ifndef __INCfc68165h
  13. #define __INCfc68165h
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifndef _ASMLANGUAGE
  18. typedef struct
  19.     {
  20.     unsigned long  base_address;    /* IOC_BASE      */
  21.     unsigned long  general_control;    /* IOC_GEN      */
  22.     unsigned long  supplementary_control;    /* IOC_SUPCTL      */
  23.     unsigned long  timebase;    /* IOC_TBASE      */
  24.     unsigned long  timer [4];    /* IOC_TIMER      */
  25.     unsigned long  spare1 [8];    /* IOC_SPARE1      */
  26.     unsigned long  cs_range [8];    /* IOC_CSRNG      */
  27.     unsigned long  cs_config [8];    /* IOC_CSCFG      */
  28.     unsigned long  int_intrq [8];    /* IOC_INTIRQ      */
  29.     unsigned long  ext_intrq [8];    /* IOC_EXTIRQ      */
  30.     unsigned long  dma_memory_address [4];    /* IOC_DMADDR      */
  31.     unsigned long  dma_attribute [4];    /* IOC_DMATTR      */
  32.     unsigned long  dma_control [4];    /* IOC_DMACTRL      */
  33.     unsigned long  spare2 [4];    /* IOC_SPARE2      */
  34.     unsigned char  remnant [0x100];
  35.     } FC68165;
  36. #endif /* _ASMLANGUAGE */
  37. /*
  38.  * The following are the bit mask definitions, etc.
  39.  */
  40. /* IOC_BASE */
  41. #define IOC_BASE_PGM 0x00000001
  42. /* IOC_GEN */
  43. #define IOC_GEN_IACK74_MASK 0xf0000000
  44. #define IOC_GEN_IACK118_MASK 0x0f000000
  45. #define IOC_GEN_IACKCODE_MASK 0x00f00000
  46. #define IOC_GEN_BG 0x00080000
  47. #define IOC_GEN_FIACK 0x00040000
  48. #define IOC_GEN_EPARITY 0x00020000
  49. #define IOC_GEN_GBERR 0x00010000
  50. #define IOC_GEN_IACKBERR_MASK 0x0000C000
  51. #define IOC_GEN_IACKBERR_DISAB 0x00000000
  52. #define IOC_GEN_IACKBERR_3us 0x00004000
  53. #define IOC_GEN_IACKBERR_400ns 0x00008000
  54. #define IOC_GEN_IACKBERR_0 0x0000C000
  55. #define IOC_GEN_FLXWAIT_MASK 0x00003000
  56. #define IOC_GEN_FLXWAIT_0 0x00000000
  57. #define IOC_GEN_FLXWAIT_40ns 0x00001000
  58. #define IOC_GEN_FLXWAIT_70ns 0x00002000
  59. #define IOC_GEN_FLXWAIT_100ns 0x00003000
  60. #define IOC_GEN_FLXBERR_MASK 0x00000c00
  61. #define IOC_GEN_FLXBERR_750us 0x00000000
  62. #define IOC_GEN_FLXBERR_50us 0x00000400
  63. #define IOC_GEN_FLXBERR_3us 0x00000800
  64. #define IOC_GEN_FLXBERR_750ns 0x00000C00
  65. #define IOC_GEN_BERRLOC_MASK 0x00000300
  66. #define IOC_GEN_BERRLOC_750us 0x00000000
  67. #define IOC_GEN_BERRLOC_50us 0x00000100
  68. #define IOC_GEN_BERRLOC_6us 0x00000200
  69. #define IOC_GEN_BERRLOC_1_5us 0x00000300
  70. #define IOC_GEN_ENAIACK 0x00000080
  71. #define IOC_GEN_DEBOUNCEIRQ0 0x00000020
  72. #define IOC_GEN_TACH_START 0x00000010
  73. #define IOC_GEN_SUP_ONLY 0x00000008
  74. #define IOC_GEN_FAIR_ARB 0x00000004
  75. #define IOC_GEN_BOOT_DECODE 0x00000002
  76. /* IOC_SUPCTL */
  77. #define IOC_SUPCTL_BRIDGE_MASK 0xff000000
  78. #define IOC_SUPCTL_BRIDGE_NORMAL 0x00000000
  79. #define IOC_SUPCTL_WATCHDOG_ENABLE 0x00800000 /* 1 = enabled      */
  80. #define IOC_SUPCTL_FC_MASK 0x007f0000
  81. #define IOC_SUPCTL_FC_6 0x00400000
  82. #define IOC_SUPCTL_FC_5 0x00200000
  83. #define IOC_SUPCTL_FC_4 0x00100000
  84. #define IOC_SUPCTL_FC_3 0x00080000
  85. #define IOC_SUPCTL_FC_2 0x00040000
  86. #define IOC_SUPCTL_FC_1 0x00020000
  87. #define IOC_SUPCTL_FC_0 0x00010000
  88. #define IOC_SUPCTL_GBERR_TRAP 0x00008000 /* 1 = error occurred     */
  89. #define IOC_SUPCTL_WATCHDOG_TRAP 0x00004000 /* 1 = watchdog occurred  */
  90. #define IOC_SUPCTL_POWERUP_MASK 0x00002000 /* 0 = powerup occurred   */
  91. #define IOC_SUPCTL_tacho_mask 0x000000ff
  92. /* IOC_TBASE */
  93. #define IOC_TBASE_MASK 0xffffffff /* 1 tic per us      */
  94. /* IOC_TIMER */
  95. #define IOC_TIMER__MASK 0xffffffff
  96. /* IOC_CSRNG */
  97. #define IOC_CSRNG_ADDR_MASK 0xffffffc0
  98. #define IOC_CSRNG_CMP 0x00000020
  99. #define IOC_CSRNG_FLXI 0x00000010 /* 0 = local      */
  100. #define IOC_CSRNG_SELCODE_MASK 0x0000000c
  101. #define IOC_CSRNG_SELCODE_DISABLED 0x00000000
  102. #define IOC_CSRNG_SELCODE_SUPRONLY 0x00000004
  103. #define IOC_CSRNG_SELCODE_SUPANDUSR 0x00000008
  104. #define IOC_CSRNG_SELCODE_COPROCESS 0x0000000C
  105. #define IOC_CSRNG_READONLY 0x00000002
  106. #define IOC_CSRNG_CACHEINHIB 0x00000001
  107. /* IOC_CSCFG */
  108. #define IOC_CSCFG_LOCAL_CSDEV_MASK 0xc000
  109. #define IOC_CSCFG_LOCAL_CSDEV_4 0x0000
  110. #define IOC_CSCFG_LOCAL_CSDEV_3 0x4000
  111. #define IOC_CSCFG_LOCAL_CSDEV_2 0x8000
  112. #define IOC_CSCFG_LOCAL_CSDEV_1 0xC000
  113. #define IOC_CSCFG_LOCAL_RDWR_MASK 0x3000
  114. #define IOC_CSCFG_LOCAL_RDWR_4 0x0000
  115. #define IOC_CSCFG_LOCAL_RDWR_3 0x1000
  116. #define IOC_CSCFG_LOCAL_RDWR_2 0x2000
  117. #define IOC_CSCFG_LOCAL_RDWR_1 0x3000
  118. #define IOC_CSCFG_LOCAL_DTACK_MASK 0x0e00
  119. #define IOC_CSCFG_LOCAL_DTACK_12 0x0000
  120. #define IOC_CSCFG_LOCAL_DTACK_9 0x0200
  121. #define IOC_CSCFG_LOCAL_DTACK_6 0x0400
  122. #define IOC_CSCFG_LOCAL_DTACK_4 0x0600
  123. #define IOC_CSCFG_LOCAL_DTACK_3 0x0800
  124. #define IOC_CSCFG_LOCAL_DTACK_2 0x0a00
  125. #define IOC_CSCFG_LOCAL_DTACK_1 0x0c00
  126. #define IOC_CSCFG_LOCAL_DTACK_NEVER 0x0e00
  127. #define IOC_CSCFG_LOCAL_RDWRN_MASK 0x0180
  128. #define IOC_CSCFG_LOCAL_RDWRN_5 0x0000
  129. #define IOC_CSCFG_LOCAL_RDWRN_3 0x0080
  130. #define IOC_CSCFG_LOCAL_RDWRN_2 0x0100
  131. #define IOC_CSCFG_LOCAL_RDWRN_1 0x0180
  132. #define IOC_CSCFG_LOCAL_CSDEVN_MASK 0x0060
  133. #define IOC_CSCFG_LOCAL_CSDEVN_4 0x0000
  134. #define IOC_CSCFG_LOCAL_CSDEVN_2 0x0020
  135. #define IOC_CSCFG_LOCAL_CSDEVN_1 0x0040
  136. #define IOC_CSCFG_LOCAL_CSDEVN_0 0x0060
  137. #define IOC_CSCFG_LOCAL_CYLHOLD_MASK 0x0018
  138. #define IOC_CSCFG_LOCAL_CYLHOLD_3 0x0000
  139. #define IOC_CSCFG_LOCAL_CYLHOLD_2 0x0008
  140. #define IOC_CSCFG_LOCAL_CYLHOLD_1 0x0010
  141. #define IOC_CSCFG_LOCAL_CYLHOLD_0 0x0018
  142. #define IOC_CSCFG_LOCAL_DEVDESEL_MASK 0x0006
  143. #define IOC_CSCFG_LOCAL_DEVDESEL_12 0x0000
  144. #define IOC_CSCFG_LOCAL_DEVDESEL_5 0x0002
  145. #define IOC_CSCFG_LOCAL_DEVDESEL_3 0x0004
  146. #define IOC_CSCFG_LOCAL_DEVDESEL_1 0x0006
  147. #define IOC_CSCFG_LOCAL_FASTCONT 0x0001
  148. #define IOC_CSCFG_FLXI_ASYNCCSDEV 0x8000
  149. #define IOC_CSCFG_FLXI_ASYNCBYTE 0x4000
  150. #define IOC_CSCFG_FLXI_ENADSACK 0x2000
  151. #define IOC_CSCFG_FLXI_SCS 0x1000
  152. #define IOC_CSCFG_FLXI_SBS 0x0800
  153. #define IOC_CSCFG_FLXI_BRDA 0x0400
  154. #define IOC_CSCFG_FLXI_BRDE 0x0200
  155. #define IOC_CSCFG_FLXI_CSRD 0x0100
  156. #define IOC_CSCFG_FLXI_WAITS_MASK 0x00f0
  157. #define IOC_CSCFG_FLXI_WAITS_0 0x0000    /*  35 ns      */
  158. #define IOC_CSCFG_FLXI_WAITS_1 0x0010    /*  70 ns      */
  159. #define IOC_CSCFG_FLXI_WAITS_2 0x0020    /* 100 ns      */
  160. #define IOC_CSCFG_FLXI_WAITS_3 0x0030    /* 135 ns      */
  161. #define IOC_CSCFG_FLXI_WAITS_4 0x0040    /* 170 ns      */
  162. #define IOC_CSCFG_FLXI_WAITS_5 0x0050    /* 200 ns      */
  163. #define IOC_CSCFG_FLXI_WAITS_6 0x0060    /* 235 ns      */
  164. #define IOC_CSCFG_FLXI_WAITS_7 0x0070    /* 270 ns      */
  165. #define IOC_CSCFG_FLXI_WAITS_8 0x0080    /* 300 ns      */
  166. #define IOC_CSCFG_FLXI_WAITS_9 0x0090    /* 335 ns      */
  167. #define IOC_CSCFG_FLXI_WAITS_10 0x00a0    /* 370 ns      */
  168. #define IOC_CSCFG_FLXI_WAITS_11 0x00b0    /* 400 ns      */
  169. #define IOC_CSCFG_FLXI_WAITS_12 0x00c0    /* 435 ns      */
  170. #define IOC_CSCFG_FLXI_WAITS_13 0x00d0    /* 470 ns      */
  171. #define IOC_CSCFG_FLXI_WAITS_14 0x00e0    /* 500 ns      */
  172. #define IOC_CSCFG_FLXI_WAITS_15 0x00f0    /* 535 ns      */
  173. #define IOC_CSCFG_FLXI_STROBE_MASK 0x000c
  174. #define IOC_CSCFG_FLXI_STROBE_NONE 0x0000
  175. #define IOC_CSCFG_FLXI_STROBE_BYTE 0x0004
  176. #define IOC_CSCFG_FLXI_STROBE_WORD 0x0008
  177. #define IOC_CSCFG_FLXI_STROBE_LONG 0x000c
  178. #define IOC_CSCFG_FLXI_DSACK_MASK 0x0003
  179. #define IOC_CSCFG_FLXI_DSACK_LONG 0x0000
  180. #define IOC_CSCFG_FLXI_DSACK_WORD 0x0001
  181. #define IOC_CSCFG_FLXI_DSACK_BYTE 0x0002
  182. #define IOC_CSCFG_FLXI_DSACK_NONE 0x0003
  183. /* IOC_INTIRQ */
  184. #define IOC_INTIRQ_IRQENABLE 0x08000000
  185. #define IOC_INTIRQ_IRQLEVEL_MASK 0x07000000
  186. #define IOC_INTIRQ_IRQLEVEL_0 0x00000000
  187. #define IOC_INTIRQ_IRQLEVEL_1 0x01000000
  188. #define IOC_INTIRQ_IRQLEVEL_2 0x02000000
  189. #define IOC_INTIRQ_IRQLEVEL_3 0x03000000
  190. #define IOC_INTIRQ_IRQLEVEL_4 0x04000000
  191. #define IOC_INTIRQ_IRQLEVEL_5 0x05000000
  192. #define IOC_INTIRQ_IRQLEVEL_6 0x06000000
  193. #define IOC_INTIRQ_IRQLEVEL_7 0x07000000
  194. #define IOC_INTIRQ_IRQSTAT 0x00800000
  195. #define IOC_INTIRQ_IRQMAIL 0x00400000
  196. #define IOC_INTIRQ_TDENABLE 0x00000200
  197. #define IOC_INTIRQ_NOAUTOCLEAR 0x00000100
  198. /* IOC_EXTIRQ */
  199. #define IOC_EXTIRQ_IRQENABLE 0x08000000
  200. #define IOC_EXTIRQ_IRQLEVEL_MASK 0x07000000
  201. #define IOC_EXTIRQ_IRQLEVEL_0 0x00000000
  202. #define IOC_EXTIRQ_IRQLEVEL_1 0x01000000
  203. #define IOC_EXTIRQ_IRQLEVEL_2 0x02000000
  204. #define IOC_EXTIRQ_IRQLEVEL_3 0x03000000
  205. #define IOC_EXTIRQ_IRQLEVEL_4 0x04000000
  206. #define IOC_EXTIRQ_IRQLEVEL_5 0x05000000
  207. #define IOC_EXTIRQ_IRQLEVEL_6 0x06000000
  208. #define IOC_EXTIRQ_IRQLEVEL_7 0x07000000
  209. #define IOC_EXTIRQ_IRQSTAT 0x00800000
  210. #define IOC_EXTIRQ_EXTVECTOR 0x00000800
  211. #define IOC_EXTIRQ_EDGE 0x00000400
  212. #define IOC_EXTIRQ_ACTHIGH 0x00000200
  213. #define IOC_EXTIRQ_AUTOCLEAR 0x00000100
  214. #define IOC_EXTIRQ_DISABLEIACK 0x00000008
  215. #define IOC_EXTIRQ_CSTIMING_MASK 0x00000007
  216. #define IOC_EXTIRQ_CSTIMING_0 0x00000000
  217. #define IOC_EXTIRQ_CSTIMING_1 0x00000001
  218. #define IOC_EXTIRQ_CSTIMING_2 0x00000002
  219. #define IOC_EXTIRQ_CSTIMING_3 0x00000003
  220. #define IOC_EXTIRQ_CSTIMING_4 0x00000004
  221. #define IOC_EXTIRQ_CSTIMING_5 0x00000005
  222. #define IOC_EXTIRQ_CSTIMING_6 0x00000006
  223. #define IOC_EXTIRQ_CSTIMING_7 0x00000007
  224. /* IOC_DMATTR */
  225. #define IOC_DMATTR_LCLSIZE_MASK 0xc0000000
  226. #define IOC_DMATTR_LCLSIZE_LONG 0x00000000
  227. #define IOC_DMATTR_LCLSIZE_BYTE 0x40000000
  228. #define IOC_DMATTR_LCLSIZE_WORD 0x80000000
  229. #define IOC_DMATTR_LCLSIZE_BAD 0xc0000000
  230. #define IOC_DMATTR_LCLADDR_MASK 0x3f000000
  231. #define IOC_DMATTR_DSTFLXI 0x00800000 /* otherwise dst is local */
  232. #define IOC_DMATTR_FC_MASK 0x00700000
  233. #define IOC_DMATTR_FC_SUP_BT 0x00700000
  234. #define IOC_DMATTR_FC_SUP_PGM 0x00600000
  235. #define IOC_DMATTR_FC_SUP_DATA 0x00500000
  236. #define IOC_DMATTR_FC_USR_BT 0x00300000
  237. #define IOC_DMATTR_FC_USR_PGM 0x00200000
  238. #define IOC_DMATTR_FC_USR_DATA 0x00100000
  239. #define IOC_DMATTR_XFERCNT_MASK 0x000fffff /* 1 - 1 megabyte         */
  240. /* IOC_DMACTRL */
  241. #define IOC_DMACTRL_NT 0x80000000 /* normal termination     */
  242. #define IOC_DMACTRL_ET 0x40000000 /* error termination      */
  243. #define IOC_DMACTRL_ENABLE 0x00010000 /* enables DMA controller */
  244. #define IOC_DMACTRL_RQ_MASK 0x00000e00
  245. #define IOC_DMACTRL_RQ_DISABLED 0x00000000
  246. #define IOC_DMACTRL_IFACTENABLED 0x00000800 /* if DMAREQ only         */
  247. #define IOC_DMACTRL_AUTOENABLED 0x00000a00 /* DMAREQ always active   */
  248. #define IOC_DMACTRL_1SHOTAUTOENABLED 0x00000c00 /* first AUTO, then IFACT */
  249. #define IOC_DMACTRL_EDGE 0x00000100 /* else LEVEL sensitive   */
  250. #define IOC_DMACTRL_RQIGNORETIME_MASK 0x000000f0
  251. #define IOC_DMACTRL_RQIGNORETIME_465 0x00000000 /* 465 ns                 */
  252. #define IOC_DMACTRL_RQIGNORETIME_434 0x00000010
  253. #define IOC_DMACTRL_RQIGNORETIME_403 0x00000020
  254. #define IOC_DMACTRL_RQIGNORETIME_372 0x00000030
  255. #define IOC_DMACTRL_RQIGNORETIME_341 0x00000040
  256. #define IOC_DMACTRL_RQIGNORETIME_310 0x00000050
  257. #define IOC_DMACTRL_RQIGNORETIME_279 0x00000060
  258. #define IOC_DMACTRL_RQIGNORETIME_248 0x00000070
  259. #define IOC_DMACTRL_RQIGNORETIME_217 0x00000080
  260. #define IOC_DMACTRL_RQIGNORETIME_186 0x00000090
  261. #define IOC_DMACTRL_RQIGNORETIME_155 0x000000a0
  262. #define IOC_DMACTRL_RQIGNORETIME_124 0x000000b0
  263. #define IOC_DMACTRL_RQIGNORETIME_93 0x000000c0
  264. #define IOC_DMACTRL_RQIGNORETIME_62 0x000000d0
  265. #define IOC_DMACTRL_RQIGNORETIME_31 0x000000e0
  266. #define IOC_DMACTRL_RQIGNORETIME_0 0x000000f0 /* 0 ns                   */
  267. #define IOC_DMACTRL_HRQ 0x00000008 /* high active request    */
  268. #define IOC_DMACTRL_LOCALPORT_MASK 0x00000007 /* CSDEV of DMA           */
  269. #define IOC_DMACTRL_LOCALPROT_0 0x00000000
  270. #define IOC_DMACTRL_LOCALPROT_1 0x00000001
  271. #define IOC_DMACTRL_LOCALPROT_2 0x00000002
  272. #define IOC_DMACTRL_LOCALPROT_3 0x00000003
  273. #define IOC_DMACTRL_LOCALPROT_4 0x00000004
  274. #define IOC_DMACTRL_LOCALPROT_5 0x00000005
  275. #define IOC_DMACTRL_LOCALPROT_6 0x00000006
  276. #define IOC_DMACTRL_LOCALPROT_7 0x00000007
  277. #ifdef __cplusplus
  278. }
  279. #endif
  280. #endif /* __INCfc68165h */