aic7xxx_reg.h_shipped 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913
  1. /*
  2. * DO NOT EDIT - This file is automatically generated
  3. * from the following source files:
  4. *
  5. * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#58 $
  6. * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#40 $
  7. */
  8. typedef int (ahc_reg_print_t)(u_int, u_int *, u_int);
  9. typedef struct ahc_reg_parse_entry {
  10. char *name;
  11. uint8_t value;
  12. uint8_t mask;
  13. } ahc_reg_parse_entry_t;
  14. #if AIC_DEBUG_REGISTERS
  15. ahc_reg_print_t ahc_scsiseq_print;
  16. #else
  17. #define ahc_scsiseq_print(regvalue, cur_col, wrap) \
  18. ahc_print_register(NULL, 0, "SCSISEQ", 0x00, regvalue, cur_col, wrap)
  19. #endif
  20. #if AIC_DEBUG_REGISTERS
  21. ahc_reg_print_t ahc_sxfrctl0_print;
  22. #else
  23. #define ahc_sxfrctl0_print(regvalue, cur_col, wrap) \
  24. ahc_print_register(NULL, 0, "SXFRCTL0", 0x01, regvalue, cur_col, wrap)
  25. #endif
  26. #if AIC_DEBUG_REGISTERS
  27. ahc_reg_print_t ahc_scsisigi_print;
  28. #else
  29. #define ahc_scsisigi_print(regvalue, cur_col, wrap) \
  30. ahc_print_register(NULL, 0, "SCSISIGI", 0x03, regvalue, cur_col, wrap)
  31. #endif
  32. #if AIC_DEBUG_REGISTERS
  33. ahc_reg_print_t ahc_scsirate_print;
  34. #else
  35. #define ahc_scsirate_print(regvalue, cur_col, wrap) \
  36. ahc_print_register(NULL, 0, "SCSIRATE", 0x04, regvalue, cur_col, wrap)
  37. #endif
  38. #if AIC_DEBUG_REGISTERS
  39. ahc_reg_print_t ahc_sstat0_print;
  40. #else
  41. #define ahc_sstat0_print(regvalue, cur_col, wrap) \
  42. ahc_print_register(NULL, 0, "SSTAT0", 0x0b, regvalue, cur_col, wrap)
  43. #endif
  44. #if AIC_DEBUG_REGISTERS
  45. ahc_reg_print_t ahc_sstat1_print;
  46. #else
  47. #define ahc_sstat1_print(regvalue, cur_col, wrap) \
  48. ahc_print_register(NULL, 0, "SSTAT1", 0x0c, regvalue, cur_col, wrap)
  49. #endif
  50. #if AIC_DEBUG_REGISTERS
  51. ahc_reg_print_t ahc_sstat2_print;
  52. #else
  53. #define ahc_sstat2_print(regvalue, cur_col, wrap) \
  54. ahc_print_register(NULL, 0, "SSTAT2", 0x0d, regvalue, cur_col, wrap)
  55. #endif
  56. #if AIC_DEBUG_REGISTERS
  57. ahc_reg_print_t ahc_sstat3_print;
  58. #else
  59. #define ahc_sstat3_print(regvalue, cur_col, wrap) \
  60. ahc_print_register(NULL, 0, "SSTAT3", 0x0e, regvalue, cur_col, wrap)
  61. #endif
  62. #if AIC_DEBUG_REGISTERS
  63. ahc_reg_print_t ahc_simode0_print;
  64. #else
  65. #define ahc_simode0_print(regvalue, cur_col, wrap) \
  66. ahc_print_register(NULL, 0, "SIMODE0", 0x10, regvalue, cur_col, wrap)
  67. #endif
  68. #if AIC_DEBUG_REGISTERS
  69. ahc_reg_print_t ahc_simode1_print;
  70. #else
  71. #define ahc_simode1_print(regvalue, cur_col, wrap) \
  72. ahc_print_register(NULL, 0, "SIMODE1", 0x11, regvalue, cur_col, wrap)
  73. #endif
  74. #if AIC_DEBUG_REGISTERS
  75. ahc_reg_print_t ahc_scsibusl_print;
  76. #else
  77. #define ahc_scsibusl_print(regvalue, cur_col, wrap) \
  78. ahc_print_register(NULL, 0, "SCSIBUSL", 0x12, regvalue, cur_col, wrap)
  79. #endif
  80. #if AIC_DEBUG_REGISTERS
  81. ahc_reg_print_t ahc_sblkctl_print;
  82. #else
  83. #define ahc_sblkctl_print(regvalue, cur_col, wrap) \
  84. ahc_print_register(NULL, 0, "SBLKCTL", 0x1f, regvalue, cur_col, wrap)
  85. #endif
  86. #if AIC_DEBUG_REGISTERS
  87. ahc_reg_print_t ahc_seq_flags_print;
  88. #else
  89. #define ahc_seq_flags_print(regvalue, cur_col, wrap) \
  90. ahc_print_register(NULL, 0, "SEQ_FLAGS", 0x3c, regvalue, cur_col, wrap)
  91. #endif
  92. #if AIC_DEBUG_REGISTERS
  93. ahc_reg_print_t ahc_lastphase_print;
  94. #else
  95. #define ahc_lastphase_print(regvalue, cur_col, wrap) \
  96. ahc_print_register(NULL, 0, "LASTPHASE", 0x3f, regvalue, cur_col, wrap)
  97. #endif
  98. #if AIC_DEBUG_REGISTERS
  99. ahc_reg_print_t ahc_seqctl_print;
  100. #else
  101. #define ahc_seqctl_print(regvalue, cur_col, wrap) \
  102. ahc_print_register(NULL, 0, "SEQCTL", 0x60, regvalue, cur_col, wrap)
  103. #endif
  104. #if AIC_DEBUG_REGISTERS
  105. ahc_reg_print_t ahc_sram_base_print;
  106. #else
  107. #define ahc_sram_base_print(regvalue, cur_col, wrap) \
  108. ahc_print_register(NULL, 0, "SRAM_BASE", 0x70, regvalue, cur_col, wrap)
  109. #endif
  110. #if AIC_DEBUG_REGISTERS
  111. ahc_reg_print_t ahc_error_print;
  112. #else
  113. #define ahc_error_print(regvalue, cur_col, wrap) \
  114. ahc_print_register(NULL, 0, "ERROR", 0x92, regvalue, cur_col, wrap)
  115. #endif
  116. #if AIC_DEBUG_REGISTERS
  117. ahc_reg_print_t ahc_dfcntrl_print;
  118. #else
  119. #define ahc_dfcntrl_print(regvalue, cur_col, wrap) \
  120. ahc_print_register(NULL, 0, "DFCNTRL", 0x93, regvalue, cur_col, wrap)
  121. #endif
  122. #if AIC_DEBUG_REGISTERS
  123. ahc_reg_print_t ahc_dfstatus_print;
  124. #else
  125. #define ahc_dfstatus_print(regvalue, cur_col, wrap) \
  126. ahc_print_register(NULL, 0, "DFSTATUS", 0x94, regvalue, cur_col, wrap)
  127. #endif
  128. #if AIC_DEBUG_REGISTERS
  129. ahc_reg_print_t ahc_scsiphase_print;
  130. #else
  131. #define ahc_scsiphase_print(regvalue, cur_col, wrap) \
  132. ahc_print_register(NULL, 0, "SCSIPHASE", 0x9e, regvalue, cur_col, wrap)
  133. #endif
  134. #if AIC_DEBUG_REGISTERS
  135. ahc_reg_print_t ahc_scb_base_print;
  136. #else
  137. #define ahc_scb_base_print(regvalue, cur_col, wrap) \
  138. ahc_print_register(NULL, 0, "SCB_BASE", 0xa0, regvalue, cur_col, wrap)
  139. #endif
  140. #if AIC_DEBUG_REGISTERS
  141. ahc_reg_print_t ahc_scb_control_print;
  142. #else
  143. #define ahc_scb_control_print(regvalue, cur_col, wrap) \
  144. ahc_print_register(NULL, 0, "SCB_CONTROL", 0xb8, regvalue, cur_col, wrap)
  145. #endif
  146. #if AIC_DEBUG_REGISTERS
  147. ahc_reg_print_t ahc_scb_scsiid_print;
  148. #else
  149. #define ahc_scb_scsiid_print(regvalue, cur_col, wrap) \
  150. ahc_print_register(NULL, 0, "SCB_SCSIID", 0xb9, regvalue, cur_col, wrap)
  151. #endif
  152. #if AIC_DEBUG_REGISTERS
  153. ahc_reg_print_t ahc_scb_lun_print;
  154. #else
  155. #define ahc_scb_lun_print(regvalue, cur_col, wrap) \
  156. ahc_print_register(NULL, 0, "SCB_LUN", 0xba, regvalue, cur_col, wrap)
  157. #endif
  158. #if AIC_DEBUG_REGISTERS
  159. ahc_reg_print_t ahc_scb_tag_print;
  160. #else
  161. #define ahc_scb_tag_print(regvalue, cur_col, wrap) \
  162. ahc_print_register(NULL, 0, "SCB_TAG", 0xbb, regvalue, cur_col, wrap)
  163. #endif
  164. #define SCSISEQ 0x00
  165. #define TEMODE 0x80
  166. #define SCSIRSTO 0x01
  167. #define SXFRCTL0 0x01
  168. #define DFON 0x80
  169. #define DFPEXP 0x40
  170. #define FAST20 0x20
  171. #define CLRSTCNT 0x10
  172. #define SPIOEN 0x08
  173. #define SCAMEN 0x04
  174. #define CLRCHN 0x02
  175. #define SXFRCTL1 0x02
  176. #define STIMESEL 0x18
  177. #define BITBUCKET 0x80
  178. #define SWRAPEN 0x40
  179. #define ENSTIMER 0x04
  180. #define ACTNEGEN 0x02
  181. #define STPWEN 0x01
  182. #define SCSISIGO 0x03
  183. #define CDO 0x80
  184. #define IOO 0x40
  185. #define MSGO 0x20
  186. #define ATNO 0x10
  187. #define SELO 0x08
  188. #define BSYO 0x04
  189. #define REQO 0x02
  190. #define ACKO 0x01
  191. #define SCSISIGI 0x03
  192. #define P_DATAIN_DT 0x60
  193. #define P_DATAOUT_DT 0x20
  194. #define ATNI 0x10
  195. #define SELI 0x08
  196. #define BSYI 0x04
  197. #define REQI 0x02
  198. #define ACKI 0x01
  199. #define SCSIRATE 0x04
  200. #define SXFR 0x70
  201. #define SOFS 0x0f
  202. #define SXFR_ULTRA2 0x0f
  203. #define WIDEXFER 0x80
  204. #define ENABLE_CRC 0x40
  205. #define SINGLE_EDGE 0x10
  206. #define SCSIID 0x05
  207. #define SCSIOFFSET 0x05
  208. #define SOFS_ULTRA2 0x7f
  209. #define SCSIDATL 0x06
  210. #define SCSIDATH 0x07
  211. #define STCNT 0x08
  212. #define OPTIONMODE 0x08
  213. #define OPTIONMODE_DEFAULTS 0x03
  214. #define AUTORATEEN 0x80
  215. #define AUTOACKEN 0x40
  216. #define ATNMGMNTEN 0x20
  217. #define BUSFREEREV 0x10
  218. #define EXPPHASEDIS 0x08
  219. #define SCSIDATL_IMGEN 0x04
  220. #define AUTO_MSGOUT_DE 0x02
  221. #define DIS_MSGIN_DUALEDGE 0x01
  222. #define TARGCRCCNT 0x0a
  223. #define CLRSINT0 0x0b
  224. #define CLRSELDO 0x40
  225. #define CLRSELDI 0x20
  226. #define CLRSELINGO 0x10
  227. #define CLRIOERR 0x08
  228. #define CLRSWRAP 0x08
  229. #define CLRSPIORDY 0x02
  230. #define SSTAT0 0x0b
  231. #define TARGET 0x80
  232. #define SELDO 0x40
  233. #define SELDI 0x20
  234. #define SELINGO 0x10
  235. #define SWRAP 0x08
  236. #define IOERR 0x08
  237. #define SDONE 0x04
  238. #define SPIORDY 0x02
  239. #define DMADONE 0x01
  240. #define CLRSINT1 0x0c
  241. #define CLRSELTIMEO 0x80
  242. #define CLRATNO 0x40
  243. #define CLRSCSIRSTI 0x20
  244. #define CLRBUSFREE 0x08
  245. #define CLRSCSIPERR 0x04
  246. #define CLRPHASECHG 0x02
  247. #define CLRREQINIT 0x01
  248. #define SSTAT1 0x0c
  249. #define SELTO 0x80
  250. #define ATNTARG 0x40
  251. #define SCSIRSTI 0x20
  252. #define PHASEMIS 0x10
  253. #define BUSFREE 0x08
  254. #define SCSIPERR 0x04
  255. #define PHASECHG 0x02
  256. #define REQINIT 0x01
  257. #define SSTAT2 0x0d
  258. #define SFCNT 0x1f
  259. #define OVERRUN 0x80
  260. #define SHVALID 0x40
  261. #define EXP_ACTIVE 0x10
  262. #define CRCVALERR 0x08
  263. #define CRCENDERR 0x04
  264. #define CRCREQERR 0x02
  265. #define DUAL_EDGE_ERR 0x01
  266. #define SSTAT3 0x0e
  267. #define SCSICNT 0xf0
  268. #define U2OFFCNT 0x7f
  269. #define OFFCNT 0x0f
  270. #define SCSIID_ULTRA2 0x0f
  271. #define SIMODE0 0x10
  272. #define ENSELDO 0x40
  273. #define ENSELDI 0x20
  274. #define ENSELINGO 0x10
  275. #define ENIOERR 0x08
  276. #define ENSWRAP 0x08
  277. #define ENSDONE 0x04
  278. #define ENSPIORDY 0x02
  279. #define ENDMADONE 0x01
  280. #define SIMODE1 0x11
  281. #define ENSELTIMO 0x80
  282. #define ENATNTARG 0x40
  283. #define ENSCSIRST 0x20
  284. #define ENPHASEMIS 0x10
  285. #define ENBUSFREE 0x08
  286. #define ENSCSIPERR 0x04
  287. #define ENPHASECHG 0x02
  288. #define ENREQINIT 0x01
  289. #define SCSIBUSL 0x12
  290. #define SCSIBUSH 0x13
  291. #define SXFRCTL2 0x13
  292. #define ASYNC_SETUP 0x07
  293. #define AUTORSTDIS 0x10
  294. #define CMDDMAEN 0x08
  295. #define SHADDR 0x14
  296. #define SELTIMER 0x18
  297. #define TARGIDIN 0x18
  298. #define STAGE6 0x20
  299. #define STAGE5 0x10
  300. #define STAGE4 0x08
  301. #define STAGE3 0x04
  302. #define STAGE2 0x02
  303. #define STAGE1 0x01
  304. #define SELID 0x19
  305. #define SELID_MASK 0xf0
  306. #define ONEBIT 0x08
  307. #define SCAMCTL 0x1a
  308. #define SCAMLVL 0x03
  309. #define ENSCAMSELO 0x80
  310. #define CLRSCAMSELID 0x40
  311. #define ALTSTIM 0x20
  312. #define DFLTTID 0x10
  313. #define TARGID 0x1b
  314. #define SPIOCAP 0x1b
  315. #define SOFT1 0x80
  316. #define SOFT0 0x40
  317. #define SOFTCMDEN 0x20
  318. #define EXT_BRDCTL 0x10
  319. #define SEEPROM 0x08
  320. #define EEPROM 0x04
  321. #define ROM 0x02
  322. #define SSPIOCPS 0x01
  323. #define BRDCTL 0x1d
  324. #define BRDDAT7 0x80
  325. #define BRDDAT6 0x40
  326. #define BRDDAT5 0x20
  327. #define BRDDAT4 0x10
  328. #define BRDSTB 0x10
  329. #define BRDDAT3 0x08
  330. #define BRDCS 0x08
  331. #define BRDDAT2 0x04
  332. #define BRDRW 0x04
  333. #define BRDRW_ULTRA2 0x02
  334. #define BRDCTL1 0x02
  335. #define BRDCTL0 0x01
  336. #define BRDSTB_ULTRA2 0x01
  337. #define SEECTL 0x1e
  338. #define EXTARBACK 0x80
  339. #define EXTARBREQ 0x40
  340. #define SEEMS 0x20
  341. #define SEERDY 0x10
  342. #define SEECS 0x08
  343. #define SEECK 0x04
  344. #define SEEDO 0x02
  345. #define SEEDI 0x01
  346. #define SBLKCTL 0x1f
  347. #define DIAGLEDEN 0x80
  348. #define DIAGLEDON 0x40
  349. #define AUTOFLUSHDIS 0x20
  350. #define ENAB40 0x08
  351. #define SELBUSB 0x08
  352. #define ENAB20 0x04
  353. #define SELWIDE 0x02
  354. #define XCVR 0x01
  355. #define BUSY_TARGETS 0x20
  356. #define TARG_SCSIRATE 0x20
  357. #define ULTRA_ENB 0x30
  358. #define CMDSIZE_TABLE 0x30
  359. #define DISC_DSB 0x32
  360. #define CMDSIZE_TABLE_TAIL 0x34
  361. #define MWI_RESIDUAL 0x38
  362. #define NEXT_QUEUED_SCB 0x39
  363. #define MSG_OUT 0x3a
  364. #define DMAPARAMS 0x3b
  365. #define PRELOADEN 0x80
  366. #define WIDEODD 0x40
  367. #define SCSIEN 0x20
  368. #define SDMAEN 0x10
  369. #define SDMAENACK 0x10
  370. #define HDMAEN 0x08
  371. #define HDMAENACK 0x08
  372. #define DIRECTION 0x04
  373. #define FIFOFLUSH 0x02
  374. #define FIFORESET 0x01
  375. #define SEQ_FLAGS 0x3c
  376. #define NOT_IDENTIFIED 0x80
  377. #define NO_CDB_SENT 0x40
  378. #define TARGET_CMD_IS_TAGGED 0x40
  379. #define DPHASE 0x20
  380. #define TARG_CMD_PENDING 0x10
  381. #define CMDPHASE_PENDING 0x08
  382. #define DPHASE_PENDING 0x04
  383. #define SPHASE_PENDING 0x02
  384. #define NO_DISCONNECT 0x01
  385. #define SAVED_SCSIID 0x3d
  386. #define SAVED_LUN 0x3e
  387. #define LASTPHASE 0x3f
  388. #define P_MESGIN 0xe0
  389. #define PHASE_MASK 0xe0
  390. #define P_STATUS 0xc0
  391. #define P_MESGOUT 0xa0
  392. #define P_COMMAND 0x80
  393. #define P_DATAIN 0x40
  394. #define P_BUSFREE 0x01
  395. #define P_DATAOUT 0x00
  396. #define CDI 0x80
  397. #define IOI 0x40
  398. #define MSGI 0x20
  399. #define WAITING_SCBH 0x40
  400. #define DISCONNECTED_SCBH 0x41
  401. #define FREE_SCBH 0x42
  402. #define COMPLETE_SCBH 0x43
  403. #define HSCB_ADDR 0x44
  404. #define SHARED_DATA_ADDR 0x48
  405. #define KERNEL_QINPOS 0x4c
  406. #define QINPOS 0x4d
  407. #define QOUTPOS 0x4e
  408. #define KERNEL_TQINPOS 0x4f
  409. #define TQINPOS 0x50
  410. #define ARG_1 0x51
  411. #define RETURN_1 0x51
  412. #define SEND_MSG 0x80
  413. #define SEND_SENSE 0x40
  414. #define SEND_REJ 0x20
  415. #define MSGOUT_PHASEMIS 0x10
  416. #define EXIT_MSG_LOOP 0x08
  417. #define CONT_MSG_LOOP 0x04
  418. #define CONT_TARG_SESSION 0x02
  419. #define ARG_2 0x52
  420. #define RETURN_2 0x52
  421. #define LAST_MSG 0x53
  422. #define TARG_IMMEDIATE_SCB 0x53
  423. #define SCSISEQ_TEMPLATE 0x54
  424. #define ENSELO 0x40
  425. #define ENSELI 0x20
  426. #define ENRSELI 0x10
  427. #define ENAUTOATNO 0x08
  428. #define ENAUTOATNI 0x04
  429. #define ENAUTOATNP 0x02
  430. #define HA_274_BIOSGLOBAL 0x56
  431. #define INITIATOR_TAG 0x56
  432. #define HA_274_EXTENDED_TRANS 0x01
  433. #define SEQ_FLAGS2 0x57
  434. #define TARGET_MSG_PENDING 0x02
  435. #define SCB_DMA 0x01
  436. #define SCSICONF 0x5a
  437. #define HWSCSIID 0x0f
  438. #define HSCSIID 0x07
  439. #define TERM_ENB 0x80
  440. #define RESET_SCSI 0x40
  441. #define ENSPCHK 0x20
  442. #define INTDEF 0x5c
  443. #define VECTOR 0x0f
  444. #define EDGE_TRIG 0x80
  445. #define HOSTCONF 0x5d
  446. #define HA_274_BIOSCTRL 0x5f
  447. #define BIOSDISABLED 0x30
  448. #define BIOSMODE 0x30
  449. #define CHANNEL_B_PRIMARY 0x08
  450. #define SEQCTL 0x60
  451. #define PERRORDIS 0x80
  452. #define PAUSEDIS 0x40
  453. #define FAILDIS 0x20
  454. #define FASTMODE 0x10
  455. #define BRKADRINTEN 0x08
  456. #define STEP 0x04
  457. #define SEQRESET 0x02
  458. #define LOADRAM 0x01
  459. #define SEQRAM 0x61
  460. #define SEQADDR0 0x62
  461. #define SEQADDR1 0x63
  462. #define SEQADDR1_MASK 0x01
  463. #define ACCUM 0x64
  464. #define SINDEX 0x65
  465. #define DINDEX 0x66
  466. #define ALLONES 0x69
  467. #define ALLZEROS 0x6a
  468. #define NONE 0x6a
  469. #define FLAGS 0x6b
  470. #define ZERO 0x02
  471. #define CARRY 0x01
  472. #define SINDIR 0x6c
  473. #define DINDIR 0x6d
  474. #define FUNCTION1 0x6e
  475. #define STACK 0x6f
  476. #define TARG_OFFSET 0x70
  477. #define SRAM_BASE 0x70
  478. #define BCTL 0x84
  479. #define ACE 0x08
  480. #define ENABLE 0x01
  481. #define DSCOMMAND0 0x84
  482. #define CACHETHEN 0x80
  483. #define DPARCKEN 0x40
  484. #define MPARCKEN 0x20
  485. #define EXTREQLCK 0x10
  486. #define INTSCBRAMSEL 0x08
  487. #define RAMPS 0x04
  488. #define USCBSIZE32 0x02
  489. #define CIOPARCKEN 0x01
  490. #define BUSTIME 0x85
  491. #define BOFF 0xf0
  492. #define BON 0x0f
  493. #define DSCOMMAND1 0x85
  494. #define DSLATT 0xfc
  495. #define HADDLDSEL1 0x02
  496. #define HADDLDSEL0 0x01
  497. #define BUSSPD 0x86
  498. #define DFTHRSH 0xc0
  499. #define DFTHRSH_75 0x80
  500. #define STBOFF 0x38
  501. #define STBON 0x07
  502. #define HS_MAILBOX 0x86
  503. #define HOST_MAILBOX 0xf0
  504. #define HOST_TQINPOS 0x80
  505. #define SEQ_MAILBOX 0x0f
  506. #define DSPCISTATUS 0x86
  507. #define DFTHRSH_100 0xc0
  508. #define HCNTRL 0x87
  509. #define POWRDN 0x40
  510. #define SWINT 0x10
  511. #define IRQMS 0x08
  512. #define PAUSE 0x04
  513. #define INTEN 0x02
  514. #define CHIPRST 0x01
  515. #define CHIPRSTACK 0x01
  516. #define HADDR 0x88
  517. #define HCNT 0x8c
  518. #define SCBPTR 0x90
  519. #define INTSTAT 0x91
  520. #define SEQINT_MASK 0xf1
  521. #define OUT_OF_RANGE 0xe1
  522. #define NO_FREE_SCB 0xd1
  523. #define SCB_MISMATCH 0xc1
  524. #define MISSED_BUSFREE 0xb1
  525. #define MKMSG_FAILED 0xa1
  526. #define DATA_OVERRUN 0x91
  527. #define PERR_DETECTED 0x81
  528. #define BAD_STATUS 0x71
  529. #define HOST_MSG_LOOP 0x61
  530. #define PDATA_REINIT 0x51
  531. #define IGN_WIDE_RES 0x41
  532. #define NO_MATCH 0x31
  533. #define PROTO_VIOLATION 0x21
  534. #define SEND_REJECT 0x11
  535. #define INT_PEND 0x0f
  536. #define BAD_PHASE 0x01
  537. #define BRKADRINT 0x08
  538. #define SCSIINT 0x04
  539. #define CMDCMPLT 0x02
  540. #define SEQINT 0x01
  541. #define CLRINT 0x92
  542. #define CLRPARERR 0x10
  543. #define CLRBRKADRINT 0x08
  544. #define CLRSCSIINT 0x04
  545. #define CLRCMDINT 0x02
  546. #define CLRSEQINT 0x01
  547. #define ERROR 0x92
  548. #define CIOPARERR 0x80
  549. #define PCIERRSTAT 0x40
  550. #define MPARERR 0x20
  551. #define DPARERR 0x10
  552. #define SQPARERR 0x08
  553. #define ILLOPCODE 0x04
  554. #define ILLSADDR 0x02
  555. #define ILLHADDR 0x01
  556. #define DFCNTRL 0x93
  557. #define DFSTATUS 0x94
  558. #define PRELOAD_AVAIL 0x80
  559. #define DFCACHETH 0x40
  560. #define FIFOQWDEMP 0x20
  561. #define MREQPEND 0x10
  562. #define HDONE 0x08
  563. #define DFTHRESH 0x04
  564. #define FIFOFULL 0x02
  565. #define FIFOEMP 0x01
  566. #define DFWADDR 0x95
  567. #define DFRADDR 0x97
  568. #define DFDAT 0x99
  569. #define SCBCNT 0x9a
  570. #define SCBCNT_MASK 0x1f
  571. #define SCBAUTO 0x80
  572. #define QINFIFO 0x9b
  573. #define QINCNT 0x9c
  574. #define QOUTFIFO 0x9d
  575. #define CRCCONTROL1 0x9d
  576. #define CRCONSEEN 0x80
  577. #define CRCVALCHKEN 0x40
  578. #define CRCENDCHKEN 0x20
  579. #define CRCREQCHKEN 0x10
  580. #define TARGCRCENDEN 0x08
  581. #define TARGCRCCNTEN 0x04
  582. #define QOUTCNT 0x9e
  583. #define SCSIPHASE 0x9e
  584. #define DATA_PHASE_MASK 0x03
  585. #define STATUS_PHASE 0x20
  586. #define COMMAND_PHASE 0x10
  587. #define MSG_IN_PHASE 0x08
  588. #define MSG_OUT_PHASE 0x04
  589. #define DATA_IN_PHASE 0x02
  590. #define DATA_OUT_PHASE 0x01
  591. #define SFUNCT 0x9f
  592. #define ALT_MODE 0x80
  593. #define SCB_BASE 0xa0
  594. #define SCB_CDB_PTR 0xa0
  595. #define SCB_RESIDUAL_DATACNT 0xa0
  596. #define SCB_CDB_STORE 0xa0
  597. #define SCB_RESIDUAL_SGPTR 0xa4
  598. #define SCB_SCSI_STATUS 0xa8
  599. #define SCB_TARGET_PHASES 0xa9
  600. #define SCB_TARGET_DATA_DIR 0xaa
  601. #define SCB_TARGET_ITAG 0xab
  602. #define SCB_DATAPTR 0xac
  603. #define SCB_DATACNT 0xb0
  604. #define SG_HIGH_ADDR_BITS 0x7f
  605. #define SG_LAST_SEG 0x80
  606. #define SCB_SGPTR 0xb4
  607. #define SG_RESID_VALID 0x04
  608. #define SG_FULL_RESID 0x02
  609. #define SG_LIST_NULL 0x01
  610. #define SCB_CONTROL 0xb8
  611. #define SCB_TAG_TYPE 0x03
  612. #define STATUS_RCVD 0x80
  613. #define TARGET_SCB 0x80
  614. #define DISCENB 0x40
  615. #define TAG_ENB 0x20
  616. #define MK_MESSAGE 0x10
  617. #define ULTRAENB 0x08
  618. #define DISCONNECTED 0x04
  619. #define SCB_SCSIID 0xb9
  620. #define TID 0xf0
  621. #define TWIN_TID 0x70
  622. #define OID 0x0f
  623. #define TWIN_CHNLB 0x80
  624. #define SCB_LUN 0xba
  625. #define LID 0x3f
  626. #define SCB_XFERLEN_ODD 0x80
  627. #define SCB_TAG 0xbb
  628. #define SCB_CDB_LEN 0xbc
  629. #define SCB_SCSIRATE 0xbd
  630. #define SCB_SCSIOFFSET 0xbe
  631. #define SCB_NEXT 0xbf
  632. #define SCB_64_SPARE 0xc0
  633. #define SEECTL_2840 0xc0
  634. #define CS_2840 0x04
  635. #define CK_2840 0x02
  636. #define DO_2840 0x01
  637. #define STATUS_2840 0xc1
  638. #define BIOS_SEL 0x60
  639. #define ADSEL 0x1e
  640. #define EEPROM_TF 0x80
  641. #define DI_2840 0x01
  642. #define SCB_64_BTT 0xd0
  643. #define CCHADDR 0xe0
  644. #define CCHCNT 0xe8
  645. #define CCSGRAM 0xe9
  646. #define CCSGADDR 0xea
  647. #define CCSGCTL 0xeb
  648. #define CCSGDONE 0x80
  649. #define CCSGEN 0x08
  650. #define SG_FETCH_NEEDED 0x02
  651. #define CCSGRESET 0x01
  652. #define CCSCBRAM 0xec
  653. #define CCSCBADDR 0xed
  654. #define CCSCBCTL 0xee
  655. #define CCSCBDONE 0x80
  656. #define ARRDONE 0x40
  657. #define CCARREN 0x10
  658. #define CCSCBEN 0x08
  659. #define CCSCBDIR 0x04
  660. #define CCSCBRESET 0x01
  661. #define CCSCBCNT 0xef
  662. #define SCBBADDR 0xf0
  663. #define CCSCBPTR 0xf1
  664. #define HNSCB_QOFF 0xf4
  665. #define SNSCB_QOFF 0xf6
  666. #define SDSCB_QOFF 0xf8
  667. #define QOFF_CTLSTA 0xfa
  668. #define SCB_QSIZE 0x07
  669. #define SCB_QSIZE_256 0x06
  670. #define SCB_AVAIL 0x40
  671. #define SNSCB_ROLLOVER 0x20
  672. #define SDSCB_ROLLOVER 0x10
  673. #define DFF_THRSH 0xfb
  674. #define WR_DFTHRSH 0x70
  675. #define WR_DFTHRSH_MAX 0x70
  676. #define WR_DFTHRSH_90 0x60
  677. #define WR_DFTHRSH_85 0x50
  678. #define WR_DFTHRSH_75 0x40
  679. #define WR_DFTHRSH_63 0x30
  680. #define WR_DFTHRSH_50 0x20
  681. #define WR_DFTHRSH_25 0x10
  682. #define RD_DFTHRSH 0x07
  683. #define RD_DFTHRSH_MAX 0x07
  684. #define RD_DFTHRSH_90 0x06
  685. #define RD_DFTHRSH_85 0x05
  686. #define RD_DFTHRSH_75 0x04
  687. #define RD_DFTHRSH_63 0x03
  688. #define RD_DFTHRSH_50 0x02
  689. #define RD_DFTHRSH_25 0x01
  690. #define RD_DFTHRSH_MIN 0x00
  691. #define WR_DFTHRSH_MIN 0x00
  692. #define SG_CACHE_SHADOW 0xfc
  693. #define SG_ADDR_MASK 0xf8
  694. #define LAST_SEG 0x02
  695. #define LAST_SEG_DONE 0x01
  696. #define SG_CACHE_PRE 0xfc
  697. #define MAX_OFFSET_ULTRA2 0x7f
  698. #define MAX_OFFSET_16BIT 0x08
  699. #define BUS_8_BIT 0x00
  700. #define TARGET_CMD_CMPLT 0xfe
  701. #define STATUS_QUEUE_FULL 0x28
  702. #define STATUS_BUSY 0x08
  703. #define MAX_OFFSET_8BIT 0x0f
  704. #define BUS_32_BIT 0x02
  705. #define CCSGADDR_MAX 0x80
  706. #define TID_SHIFT 0x04
  707. #define SCB_DOWNLOAD_SIZE_64 0x30
  708. #define HOST_MAILBOX_SHIFT 0x04
  709. #define CMD_GROUP_CODE_SHIFT 0x05
  710. #define CCSGRAM_MAXSEGS 0x10
  711. #define SCB_LIST_NULL 0xff
  712. #define SG_SIZEOF 0x08
  713. #define SCB_DOWNLOAD_SIZE 0x20
  714. #define SEQ_MAILBOX_SHIFT 0x00
  715. #define TARGET_DATA_IN 0x01
  716. #define HOST_MSG 0xff
  717. #define MAX_OFFSET 0x7f
  718. #define BUS_16_BIT 0x01
  719. #define SCB_UPLOAD_SIZE 0x20
  720. #define STACK_SIZE 0x04
  721. /* Downloaded Constant Definitions */
  722. #define INVERTED_CACHESIZE_MASK 0x03
  723. #define SG_PREFETCH_ADDR_MASK 0x06
  724. #define SG_PREFETCH_ALIGN_MASK 0x05
  725. #define QOUTFIFO_OFFSET 0x00
  726. #define SG_PREFETCH_CNT 0x04
  727. #define CACHESIZE_MASK 0x02
  728. #define QINFIFO_OFFSET 0x01
  729. #define DOWNLOAD_CONST_COUNT 0x07
  730. /* Exported Labels */