musycc.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. /*
  2. * $Id: musycc.h,v 1.3 2005/09/28 00:10:08 rickd PMCC4_3_1B $
  3. */
  4. #ifndef _INC_MUSYCC_H_
  5. #define _INC_MUSYCC_H_
  6. /*-----------------------------------------------------------------------------
  7. * musycc.h - Multichannel Synchronous Communications Controller
  8. * CN8778/8474A/8472A/8471A
  9. *
  10. * Copyright (C) 2002-2005 SBE, Inc.
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * For further information, contact via email: support@sbei.com
  23. * SBE, Inc. San Ramon, California U.S.A.
  24. *-----------------------------------------------------------------------------
  25. * RCS info:
  26. * RCS revision: $Revision: 1.3 $
  27. * Last changed on $Date: 2005/09/28 00:10:08 $
  28. * Changed by $Author: rickd $
  29. *-----------------------------------------------------------------------------
  30. * $Log: musycc.h,v $
  31. * Revision 1.3 2005/09/28 00:10:08 rickd
  32. * Add GNU license info. Add PMCC4 PCI/DevIDs. Implement new
  33. * musycc reg&bits namings. Use PORTMAP_0 GCD grouping.
  34. *
  35. * Revision 1.2 2005/04/28 23:43:04 rickd
  36. * Add RCS tracking heading.
  37. *
  38. *-----------------------------------------------------------------------------
  39. */
  40. #if defined (__FreeBSD__) || defined (__NetBSD__)
  41. #include <sys/types.h>
  42. #else
  43. #include <linux/types.h>
  44. #endif
  45. #define VINT8 volatile u_int8_t
  46. #define VINT32 volatile u_int32_t
  47. #ifdef __cplusplus
  48. extern "C"
  49. {
  50. #endif
  51. #include "pmcc4_defs.h"
  52. /*------------------------------------------------------------------------
  53. // Vendor, Board Identification definitions
  54. //------------------------------------------------------------------------
  55. */
  56. #define PCI_VENDOR_ID_CONEXANT 0x14f1
  57. #define PCI_DEVICE_ID_CN8471 0x8471
  58. #define PCI_DEVICE_ID_CN8472 0x8472
  59. #define PCI_DEVICE_ID_CN8474 0x8474
  60. #define PCI_DEVICE_ID_CN8478 0x8478
  61. #define PCI_DEVICE_ID_CN8500 0x8500
  62. #define PCI_DEVICE_ID_CN8501 0x8501
  63. #define PCI_DEVICE_ID_CN8502 0x8502
  64. #define PCI_DEVICE_ID_CN8503 0x8503
  65. #define INT_QUEUE_SIZE MUSYCC_NIQD
  66. /* RAM image of MUSYCC registers laid out as a C structure */
  67. struct musycc_groupr
  68. {
  69. VINT32 thp[32]; /* Transmit Head Pointer [5-29] */
  70. VINT32 tmp[32]; /* Transmit Message Pointer [5-30] */
  71. VINT32 rhp[32]; /* Receive Head Pointer [5-29] */
  72. VINT32 rmp[32]; /* Receive Message Pointer [5-30] */
  73. VINT8 ttsm[128]; /* Time Slot Map [5-22] */
  74. VINT8 tscm[256]; /* Subchannel Map [5-24] */
  75. VINT32 tcct[32]; /* Channel Configuration [5-26] */
  76. VINT8 rtsm[128]; /* Time Slot Map [5-22] */
  77. VINT8 rscm[256]; /* Subchannel Map [5-24] */
  78. VINT32 rcct[32]; /* Channel Configuration [5-26] */
  79. VINT32 __glcd; /* Global Configuration Descriptor [5-10] */
  80. VINT32 __iqp; /* Interrupt Queue Pointer [5-36] */
  81. VINT32 __iql; /* Interrupt Queue Length [5-36] */
  82. VINT32 grcd; /* Group Configuration Descriptor [5-16] */
  83. VINT32 mpd; /* Memory Protection Descriptor [5-18] */
  84. VINT32 mld; /* Message Length Descriptor [5-20] */
  85. VINT32 pcd; /* Port Configuration Descriptor [5-19] */
  86. };
  87. /* hardware MUSYCC registers laid out as a C structure */
  88. struct musycc_globalr
  89. {
  90. VINT32 gbp; /* Group Base Pointer */
  91. VINT32 dacbp; /* Dual Address Cycle Base Pointer */
  92. VINT32 srd; /* Service Request Descriptor */
  93. VINT32 isd; /* Interrupt Service Descriptor */
  94. /*
  95. * adjust __thp due to above 4 registers, which are not contained
  96. * within musycc_groupr[]. All __XXX[] are just place holders,
  97. * anyhow.
  98. */
  99. VINT32 __thp[32 - 4]; /* Transmit Head Pointer [5-29] */
  100. VINT32 __tmp[32]; /* Transmit Message Pointer [5-30] */
  101. VINT32 __rhp[32]; /* Receive Head Pointer [5-29] */
  102. VINT32 __rmp[32]; /* Receive Message Pointer [5-30] */
  103. VINT8 ttsm[128]; /* Time Slot Map [5-22] */
  104. VINT8 tscm[256]; /* Subchannel Map [5-24] */
  105. VINT32 tcct[32]; /* Channel Configuration [5-26] */
  106. VINT8 rtsm[128]; /* Time Slot Map [5-22] */
  107. VINT8 rscm[256]; /* Subchannel Map [5-24] */
  108. VINT32 rcct[32]; /* Channel Configuration [5-26] */
  109. VINT32 glcd; /* Global Configuration Descriptor [5-10] */
  110. VINT32 iqp; /* Interrupt Queue Pointer [5-36] */
  111. VINT32 iql; /* Interrupt Queue Length [5-36] */
  112. VINT32 grcd; /* Group Configuration Descriptor [5-16] */
  113. VINT32 mpd; /* Memory Protection Descriptor [5-18] */
  114. VINT32 mld; /* Message Length Descriptor [5-20] */
  115. VINT32 pcd; /* Port Configuration Descriptor [5-19] */
  116. VINT32 rbist; /* Receive BIST status [5-4] */
  117. VINT32 tbist; /* Receive BIST status [5-4] */
  118. };
  119. /* Global Config Descriptor bit macros */
  120. #define MUSYCC_GCD_ECLK_ENABLE 0x00000800 /* EBUS clock enable */
  121. #define MUSYCC_GCD_INTEL_SELECT 0x00000400 /* MPU type select */
  122. #define MUSYCC_GCD_INTA_DISABLE 0x00000008 /* PCI INTA disable */
  123. #define MUSYCC_GCD_INTB_DISABLE 0x00000004 /* PCI INTB disable */
  124. #define MUSYCC_GCD_BLAPSE 12 /* Position index for BLAPSE bit
  125. * field */
  126. #define MUSYCC_GCD_ALAPSE 8 /* Position index for ALAPSE bit
  127. * field */
  128. #define MUSYCC_GCD_ELAPSE 4 /* Position index for ELAPSE bit
  129. * field */
  130. #define MUSYCC_GCD_PORTMAP_3 3 /* Reserved */
  131. #define MUSYCC_GCD_PORTMAP_2 2 /* Port 0=>Grp 0,1,2,3; Port 1=>Grp
  132. * 4,5,6,7 */
  133. #define MUSYCC_GCD_PORTMAP_1 1 /* Port 0=>Grp 0,1; Port 1=>Grp 2,3,
  134. * etc... */
  135. #define MUSYCC_GCD_PORTMAP_0 0 /* Port 0=>Grp 0; Port 1=>Grp 2,
  136. * etc... */
  137. /* and board specific assignments... */
  138. #ifdef SBE_WAN256T3_ENABLE
  139. #define BLAPSE_VAL 0
  140. #define ALAPSE_VAL 0
  141. #define ELAPSE_VAL 7
  142. #define PORTMAP_VAL MUSYCC_GCD_PORTMAP_2
  143. #endif
  144. #ifdef SBE_PMCC4_ENABLE
  145. #define BLAPSE_VAL 7
  146. #define ALAPSE_VAL 3
  147. #define ELAPSE_VAL 7
  148. #define PORTMAP_VAL MUSYCC_GCD_PORTMAP_0
  149. #endif
  150. #define GCD_MAGIC (((BLAPSE_VAL)<<(MUSYCC_GCD_BLAPSE)) | \
  151. ((ALAPSE_VAL)<<(MUSYCC_GCD_ALAPSE)) | \
  152. ((ELAPSE_VAL)<<(MUSYCC_GCD_ELAPSE)) | \
  153. (MUSYCC_GCD_ECLK_ENABLE) | PORTMAP_VAL)
  154. /* Group Config Descriptor bit macros */
  155. #define MUSYCC_GRCD_RX_ENABLE 0x00000001 /* Enable receive processing */
  156. #define MUSYCC_GRCD_TX_ENABLE 0x00000002 /* Enable transmit processing */
  157. #define MUSYCC_GRCD_SUBCHAN_DISABLE 0x00000004 /* Master disable for
  158. * subchanneling */
  159. #define MUSYCC_GRCD_OOFMP_DISABLE 0x00000008 /* Out of Frame message
  160. * processing disabled all
  161. * channels */
  162. #define MUSYCC_GRCD_OOFIRQ_DISABLE 0x00000010 /* Out of Frame/In Frame irqs
  163. * disabled */
  164. #define MUSYCC_GRCD_COFAIRQ_DISABLE 0x00000020 /* Change of Frame Alignment
  165. * irq disabled */
  166. #define MUSYCC_GRCD_INHRBSD 0x00000100 /* Receive Buffer Status
  167. * overwrite disabled */
  168. #define MUSYCC_GRCD_INHTBSD 0x00000200 /* Transmit Buffer Status
  169. * overwrite disabled */
  170. #define MUSYCC_GRCD_SF_ALIGN 0x00008000 /* External frame sync */
  171. #define MUSYCC_GRCD_MC_ENABLE 0x00000040 /* Message configuration bits
  172. * copy enable. Conexant sez
  173. * turn this on */
  174. #define MUSYCC_GRCD_POLLTH_16 0x00000001 /* Poll every 16th frame */
  175. #define MUSYCC_GRCD_POLLTH_32 0x00000002 /* Poll every 32nd frame */
  176. #define MUSYCC_GRCD_POLLTH_64 0x00000003 /* Poll every 64th frame */
  177. #define MUSYCC_GRCD_POLLTH_SHIFT 10 /* Position index for poll throttle
  178. * bit field */
  179. #define MUSYCC_GRCD_SUERM_THRESH_SHIFT 16 /* Position index for SUERM
  180. * count threshold */
  181. /* Port Config Descriptor bit macros */
  182. #define MUSYCC_PCD_E1X2_MODE 2 /* Port mode in bits 0-2. T1 and E1 */
  183. #define MUSYCC_PCD_E1X4_MODE 3 /* are defined in cn847x.h */
  184. #define MUSYCC_PCD_NX64_MODE 4
  185. #define MUSYCC_PCD_TXDATA_RISING 0x00000010 /* Sample Tx data on TCLK
  186. * rising edge */
  187. #define MUSYCC_PCD_TXSYNC_RISING 0x00000020 /* Sample Tx frame sync on
  188. * TCLK rising edge */
  189. #define MUSYCC_PCD_RXDATA_RISING 0x00000040 /* Sample Rx data on RCLK
  190. * rising edge */
  191. #define MUSYCC_PCD_RXSYNC_RISING 0x00000080 /* Sample Rx frame sync on
  192. * RCLK rising edge */
  193. #define MUSYCC_PCD_ROOF_RISING 0x00000100 /* Sample Rx Out Of Frame
  194. * signal on RCLK rising edge */
  195. #define MUSYCC_PCD_TX_DRIVEN 0x00000200 /* No mapped timeslots causes
  196. * logic 1 on output, else
  197. * tristate */
  198. #define MUSYCC_PCD_PORTMODE_MASK 0xfffffff8 /* For changing the port mode
  199. * between E1 and T1 */
  200. /* Time Slot Descriptor bit macros */
  201. #define MUSYCC_TSD_MODE_64KBPS 4
  202. #define MUSYCC_TSD_MODE_56KBPS 5
  203. #define MUSYCC_TSD_SUBCHANNEL_WO_FIRST 6
  204. #define MUSYCC_TSD_SUBCHANNEL_WITH_FIRST 7
  205. /* Message Descriptor bit macros */
  206. #define MUSYCC_MDT_BASE03_ADDR 0x00006000
  207. /* Channel Config Descriptor bit macros */
  208. #define MUSYCC_CCD_BUFIRQ_DISABLE 0x00000002 /* BUFF and ONR irqs disabled */
  209. #define MUSYCC_CCD_EOMIRQ_DISABLE 0x00000004 /* EOM irq disabled */
  210. #define MUSYCC_CCD_MSGIRQ_DISABLE 0x00000008 /* LNG, FCS, ALIGN, and ABT
  211. * irqs disabled */
  212. #define MUSYCC_CCD_IDLEIRQ_DISABLE 0x00000010 /* CHABT, CHIC, and SHT irqs
  213. * disabled */
  214. #define MUSYCC_CCD_FILTIRQ_DISABLE 0x00000020 /* SFILT irq disabled */
  215. #define MUSYCC_CCD_SDECIRQ_DISABLE 0x00000040 /* SDEC irq disabled */
  216. #define MUSYCC_CCD_SINCIRQ_DISABLE 0x00000080 /* SINC irq disabled */
  217. #define MUSYCC_CCD_SUERIRQ_DISABLE 0x00000100 /* SUERR irq disabled */
  218. #define MUSYCC_CCD_FCS_XFER 0x00000200 /* Propagate FCS along with
  219. * received data */
  220. #define MUSYCC_CCD_PROTO_SHIFT 12 /* Position index for protocol bit
  221. * field */
  222. #define MUSYCC_CCD_TRANS 0 /* Protocol mode in bits 12-14 */
  223. #define MUSYCC_CCD_SS7 1
  224. #define MUSYCC_CCD_HDLC_FCS16 2
  225. #define MUSYCC_CCD_HDLC_FCS32 3
  226. #define MUSYCC_CCD_EOPIRQ_DISABLE 0x00008000 /* EOP irq disabled */
  227. #define MUSYCC_CCD_INVERT_DATA 0x00800000 /* Invert data */
  228. #define MUSYCC_CCD_MAX_LENGTH 10 /* Position index for max length bit
  229. * field */
  230. #define MUSYCC_CCD_BUFFER_LENGTH 16 /* Position index for internal data
  231. * buffer length */
  232. #define MUSYCC_CCD_BUFFER_LOC 24 /* Position index for internal data
  233. * buffer starting location */
  234. /****************************************************************************
  235. * Interrupt Descriptor Information */
  236. #define INT_EMPTY_ENTRY 0xfeedface
  237. #define INT_EMPTY_ENTRY2 0xdeadface
  238. /****************************************************************************
  239. * Interrupt Status Descriptor
  240. *
  241. * NOTE: One must first fetch the value of the interrupt status descriptor
  242. * into a local variable, then pass that value into the read macros. This
  243. * is required to avoid race conditions.
  244. ***/
  245. #define INTRPTS_NEXTINT_M 0x7FFF0000
  246. #define INTRPTS_NEXTINT_S 16
  247. #define INTRPTS_NEXTINT(x) ((x & INTRPTS_NEXTINT_M) >> INTRPTS_NEXTINT_S)
  248. #define INTRPTS_INTFULL_M 0x00008000
  249. #define INTRPTS_INTFULL_S 15
  250. #define INTRPTS_INTFULL(x) ((x & INTRPTS_INTFULL_M) >> INTRPTS_INTFULL_S)
  251. #define INTRPTS_INTCNT_M 0x00007FFF
  252. #define INTRPTS_INTCNT_S 0
  253. #define INTRPTS_INTCNT(x) ((x & INTRPTS_INTCNT_M) >> INTRPTS_INTCNT_S)
  254. /****************************************************************************
  255. * Interrupt Descriptor
  256. ***/
  257. #define INTRPT_DIR_M 0x80000000
  258. #define INTRPT_DIR_S 31
  259. #define INTRPT_DIR(x) ((x & INTRPT_DIR_M) >> INTRPT_DIR_S)
  260. #define INTRPT_GRP_M 0x60000000
  261. #define INTRPT_GRP_MSB_M 0x00004000
  262. #define INTRPT_GRP_S 29
  263. #define INTRPT_GRP_MSB_S 12
  264. #define INTRPT_GRP(x) (((x & INTRPT_GRP_M) >> INTRPT_GRP_S) | \
  265. ((x & INTRPT_GRP_MSB_M) >> INTRPT_GRP_MSB_S))
  266. #define INTRPT_CH_M 0x1F000000
  267. #define INTRPT_CH_S 24
  268. #define INTRPT_CH(x) ((x & INTRPT_CH_M) >> INTRPT_CH_S)
  269. #define INTRPT_EVENT_M 0x00F00000
  270. #define INTRPT_EVENT_S 20
  271. #define INTRPT_EVENT(x) ((x & INTRPT_EVENT_M) >> INTRPT_EVENT_S)
  272. #define INTRPT_ERROR_M 0x000F0000
  273. #define INTRPT_ERROR_S 16
  274. #define INTRPT_ERROR(x) ((x & INTRPT_ERROR_M) >> INTRPT_ERROR_S)
  275. #define INTRPT_ILOST_M 0x00008000
  276. #define INTRPT_ILOST_S 15
  277. #define INTRPT_ILOST(x) ((x & INTRPT_ILOST_M) >> INTRPT_ILOST_S)
  278. #define INTRPT_PERR_M 0x00004000
  279. #define INTRPT_PERR_S 14
  280. #define INTRPT_PERR(x) ((x & INTRPT_PERR_M) >> INTRPT_PERR_S)
  281. #define INTRPT_BLEN_M 0x00003FFF
  282. #define INTRPT_BLEN_S 0
  283. #define INTRPT_BLEN(x) ((x & INTRPT_BLEN_M) >> INTRPT_BLEN_S)
  284. /* Buffer Descriptor bit macros */
  285. #define OWNER_BIT 0x80000000 /* Set for MUSYCC owner on xmit, host
  286. * owner on receive */
  287. #define HOST_TX_OWNED 0x00000000 /* Host owns descriptor */
  288. #define MUSYCC_TX_OWNED 0x80000000 /* MUSYCC owns descriptor */
  289. #define HOST_RX_OWNED 0x80000000 /* Host owns descriptor */
  290. #define MUSYCC_RX_OWNED 0x00000000 /* MUSYCC owns descriptor */
  291. #define POLL_DISABLED 0x40000000 /* MUSYCC not allowed to poll buffer
  292. * for ownership */
  293. #define EOMIRQ_ENABLE 0x20000000 /* This buffer contains the end of
  294. * the message */
  295. #define EOBIRQ_ENABLE 0x10000000 /* EOB irq enabled */
  296. #define PADFILL_ENABLE 0x01000000 /* Enable padfill */
  297. #define REPEAT_BIT 0x00008000 /* Bit on for FISU descriptor */
  298. #define LENGTH_MASK 0X3fff /* This part of status descriptor is
  299. * length */
  300. #define IDLE_CODE 25 /* Position index for idle code (2
  301. * bits) */
  302. #define EXTRA_FLAGS 16 /* Position index for minimum flags
  303. * between messages (8 bits) */
  304. #define IDLE_CODE_MASK 0x03 /* Gets rid of garbage before the
  305. * pattern is OR'd in */
  306. #define EXTRA_FLAGS_MASK 0xff /* Gets rid of garbage before the
  307. * pattern is OR'd in */
  308. #define PCI_PERMUTED_OWNER_BIT 0x00000080 /* For flipping the bit on
  309. * the polled mode descriptor */
  310. /* Service Request Descriptor bit macros */
  311. #define SREQ 8 /* Position index for service request bit
  312. * field */
  313. #define SR_NOOP (0<<(SREQ)) /* No Operation. Generates SACK */
  314. #define SR_CHIP_RESET (1<<(SREQ)) /* Soft chip reset */
  315. #define SR_GROUP_RESET (2<<(SREQ)) /* Group reset */
  316. #define SR_GLOBAL_INIT (4<<(SREQ)) /* Global init: read global
  317. * config deswc and interrupt
  318. * queue desc */
  319. #define SR_GROUP_INIT (5<<(SREQ)) /* Group init: read Timeslot
  320. * and Subchannel maps,
  321. * Channel Config, */
  322. /*
  323. * Group Config, Memory Protect, Message Length, and Port Config
  324. * Descriptors
  325. */
  326. #define SR_CHANNEL_ACTIVATE (8<<(SREQ)) /* Init channel, read Head
  327. * Pointer, process first
  328. * Message Descriptor */
  329. #define SR_GCHANNEL_MASK 0x001F /* channel portion (gchan) */
  330. #define SR_CHANNEL_DEACTIVATE (9<<(SREQ)) /* Stop channel processing */
  331. #define SR_JUMP (10<<(SREQ)) /* a: Process new Message
  332. * List */
  333. #define SR_CHANNEL_CONFIG (11<<(SREQ)) /* b: Read channel
  334. * Configuration Descriptor */
  335. #define SR_GLOBAL_CONFIG (16<<(SREQ)) /* 10: Read Global
  336. * Configuration Descriptor */
  337. #define SR_INTERRUPT_Q (17<<(SREQ)) /* 11: Read Interrupt Queue
  338. * Descriptor */
  339. #define SR_GROUP_CONFIG (18<<(SREQ)) /* 12: Read Group
  340. * Configuration Descriptor */
  341. #define SR_MEMORY_PROTECT (19<<(SREQ)) /* 13: Read Memory Protection
  342. * Descriptor */
  343. #define SR_MESSAGE_LENGTH (20<<(SREQ)) /* 14: Read Message Length
  344. * Descriptor */
  345. #define SR_PORT_CONFIG (21<<(SREQ)) /* 15: Read Port
  346. * Configuration Descriptor */
  347. #define SR_TIMESLOT_MAP (24<<(SREQ)) /* 18: Read Timeslot Map */
  348. #define SR_SUBCHANNEL_MAP (25<<(SREQ)) /* 19: Read Subchannel Map */
  349. #define SR_CHAN_CONFIG_TABLE (26<<(SREQ)) /* 20: Read Channel
  350. * Configuration Table for
  351. * the group */
  352. #define SR_TX_DIRECTION 0x00000020 /* Transmit direction bit.
  353. * Bit off indicates receive
  354. * direction */
  355. #define SR_RX_DIRECTION 0x00000000
  356. /* Interrupt Descriptor bit macros */
  357. #define GROUP10 29 /* Position index for the 2 LS group
  358. * bits */
  359. #define CHANNEL 24 /* Position index for channel bits */
  360. #define INT_IQD_TX 0x80000000
  361. #define INT_IQD_GRP 0x60000000
  362. #define INT_IQD_CHAN 0x1f000000
  363. #define INT_IQD_EVENT 0x00f00000
  364. #define INT_IQD_ERROR 0x000f0000
  365. #define INT_IQD_ILOST 0x00008000
  366. #define INT_IQD_PERR 0x00004000
  367. #define INT_IQD_BLEN 0x00003fff
  368. /* Interrupt Descriptor Events */
  369. #define EVE_EVENT 20 /* Position index for event bits */
  370. #define EVE_NONE 0 /* No event to report in this
  371. * interrupt */
  372. #define EVE_SACK 1 /* Service Request acknowledge */
  373. #define EVE_EOB 2 /* End of Buffer */
  374. #define EVE_EOM 3 /* End of Message */
  375. #define EVE_EOP 4 /* End of Padfill */
  376. #define EVE_CHABT 5 /* Change to Abort Code */
  377. #define EVE_CHIC 6 /* Change to Idle Code */
  378. #define EVE_FREC 7 /* Frame Recovery */
  379. #define EVE_SINC 8 /* MTP2 SUERM Increment */
  380. #define EVE_SDEC 9 /* MTP2 SUERM Decrement */
  381. #define EVE_SFILT 10 /* MTP2 SUERM Filtered Message */
  382. /* Interrupt Descriptor Errors */
  383. #define ERR_ERRORS 16 /* Position index for error bits */
  384. #define ERR_BUF 1 /* Buffer Error */
  385. #define ERR_COFA 2 /* Change of Frame Alignment Error */
  386. #define ERR_ONR 3 /* Owner Bit Error */
  387. #define ERR_PROT 4 /* Memory Protection Error */
  388. #define ERR_OOF 8 /* Out of Frame Error */
  389. #define ERR_FCS 9 /* FCS Error */
  390. #define ERR_ALIGN 10 /* Octet Alignment Error */
  391. #define ERR_ABT 11 /* Abort Termination */
  392. #define ERR_LNG 12 /* Long Message Error */
  393. #define ERR_SHT 13 /* Short Message Error */
  394. #define ERR_SUERR 14 /* SUERM threshold exceeded */
  395. #define ERR_PERR 15 /* PCI Parity Error */
  396. /* Other Stuff */
  397. #define TRANSMIT_DIRECTION 0x80000000 /* Transmit direction bit. Bit off
  398. * indicates receive direction */
  399. #define ILOST 0x00008000 /* Interrupt Lost */
  400. #define GROUPMSB 0x00004000 /* Group number MSB */
  401. #define SACK_IMAGE 0x00100000 /* Used in IRQ for semaphore test */
  402. #define INITIAL_STATUS 0x10000 /* IRQ status should be this after
  403. * reset */
  404. /* This must be defined on an entire channel group (Port) basis */
  405. #define SUERM_THRESHOLD 0x1f
  406. #ifdef __cplusplus
  407. }
  408. #endif
  409. #undef VINT32
  410. #undef VINT8
  411. #endif /*** _INC_MUSYCC_H_ ***/
  412. /*** End-of-File ***/