Go to the documentation of this file.
25 #include <linux/types.h>
27 #define VINT8 volatile u_int8_t
28 #define VINT32 volatile u_int32_t
38 #define PCI_VENDOR_ID_CONEXANT 0x14f1
39 #define PCI_DEVICE_ID_CN8471 0x8471
40 #define PCI_DEVICE_ID_CN8472 0x8472
41 #define PCI_DEVICE_ID_CN8474 0x8474
42 #define PCI_DEVICE_ID_CN8478 0x8478
43 #define PCI_DEVICE_ID_CN8500 0x8500
44 #define PCI_DEVICE_ID_CN8501 0x8501
45 #define PCI_DEVICE_ID_CN8502 0x8502
46 #define PCI_DEVICE_ID_CN8503 0x8503
48 #define INT_QUEUE_SIZE MUSYCC_NIQD
106 #define MUSYCC_GCD_ECLK_ENABLE 0x00000800
107 #define MUSYCC_GCD_INTEL_SELECT 0x00000400
108 #define MUSYCC_GCD_INTA_DISABLE 0x00000008
109 #define MUSYCC_GCD_INTB_DISABLE 0x00000004
110 #define MUSYCC_GCD_BLAPSE 12
112 #define MUSYCC_GCD_ALAPSE 8
114 #define MUSYCC_GCD_ELAPSE 4
116 #define MUSYCC_GCD_PORTMAP_3 3
117 #define MUSYCC_GCD_PORTMAP_2 2
119 #define MUSYCC_GCD_PORTMAP_1 1
121 #define MUSYCC_GCD_PORTMAP_0 0
125 #ifdef SBE_WAN256T3_ENABLE
129 #define PORTMAP_VAL MUSYCC_GCD_PORTMAP_2
132 #ifdef SBE_PMCC4_ENABLE
136 #define PORTMAP_VAL MUSYCC_GCD_PORTMAP_0
139 #define GCD_MAGIC (((BLAPSE_VAL)<<(MUSYCC_GCD_BLAPSE)) | \
140 ((ALAPSE_VAL)<<(MUSYCC_GCD_ALAPSE)) | \
141 ((ELAPSE_VAL)<<(MUSYCC_GCD_ELAPSE)) | \
142 (MUSYCC_GCD_ECLK_ENABLE) | PORTMAP_VAL)
145 #define MUSYCC_GRCD_RX_ENABLE 0x00000001
146 #define MUSYCC_GRCD_TX_ENABLE 0x00000002
147 #define MUSYCC_GRCD_SUBCHAN_DISABLE 0x00000004
149 #define MUSYCC_GRCD_OOFMP_DISABLE 0x00000008
152 #define MUSYCC_GRCD_OOFIRQ_DISABLE 0x00000010
154 #define MUSYCC_GRCD_COFAIRQ_DISABLE 0x00000020
156 #define MUSYCC_GRCD_INHRBSD 0x00000100
158 #define MUSYCC_GRCD_INHTBSD 0x00000200
160 #define MUSYCC_GRCD_SF_ALIGN 0x00008000
161 #define MUSYCC_GRCD_MC_ENABLE 0x00000040
164 #define MUSYCC_GRCD_POLLTH_16 0x00000001
165 #define MUSYCC_GRCD_POLLTH_32 0x00000002
166 #define MUSYCC_GRCD_POLLTH_64 0x00000003
167 #define MUSYCC_GRCD_POLLTH_SHIFT 10
169 #define MUSYCC_GRCD_SUERM_THRESH_SHIFT 16
173 #define MUSYCC_PCD_E1X2_MODE 2
174 #define MUSYCC_PCD_E1X4_MODE 3
175 #define MUSYCC_PCD_NX64_MODE 4
176 #define MUSYCC_PCD_TXDATA_RISING 0x00000010
178 #define MUSYCC_PCD_TXSYNC_RISING 0x00000020
180 #define MUSYCC_PCD_RXDATA_RISING 0x00000040
182 #define MUSYCC_PCD_RXSYNC_RISING 0x00000080
184 #define MUSYCC_PCD_ROOF_RISING 0x00000100
186 #define MUSYCC_PCD_TX_DRIVEN 0x00000200
189 #define MUSYCC_PCD_PORTMODE_MASK 0xfffffff8
193 #define MUSYCC_TSD_MODE_64KBPS 4
194 #define MUSYCC_TSD_MODE_56KBPS 5
195 #define MUSYCC_TSD_SUBCHANNEL_WO_FIRST 6
196 #define MUSYCC_TSD_SUBCHANNEL_WITH_FIRST 7
199 #define MUSYCC_MDT_BASE03_ADDR 0x00006000
202 #define MUSYCC_CCD_BUFIRQ_DISABLE 0x00000002
203 #define MUSYCC_CCD_EOMIRQ_DISABLE 0x00000004
204 #define MUSYCC_CCD_MSGIRQ_DISABLE 0x00000008
206 #define MUSYCC_CCD_IDLEIRQ_DISABLE 0x00000010
208 #define MUSYCC_CCD_FILTIRQ_DISABLE 0x00000020
209 #define MUSYCC_CCD_SDECIRQ_DISABLE 0x00000040
210 #define MUSYCC_CCD_SINCIRQ_DISABLE 0x00000080
211 #define MUSYCC_CCD_SUERIRQ_DISABLE 0x00000100
212 #define MUSYCC_CCD_FCS_XFER 0x00000200
214 #define MUSYCC_CCD_PROTO_SHIFT 12
216 #define MUSYCC_CCD_TRANS 0
217 #define MUSYCC_CCD_SS7 1
218 #define MUSYCC_CCD_HDLC_FCS16 2
219 #define MUSYCC_CCD_HDLC_FCS32 3
220 #define MUSYCC_CCD_EOPIRQ_DISABLE 0x00008000
221 #define MUSYCC_CCD_INVERT_DATA 0x00800000
222 #define MUSYCC_CCD_MAX_LENGTH 10
224 #define MUSYCC_CCD_BUFFER_LENGTH 16
226 #define MUSYCC_CCD_BUFFER_LOC 24
232 #define INT_EMPTY_ENTRY 0xfeedface
233 #define INT_EMPTY_ENTRY2 0xdeadface
243 #define INTRPTS_NEXTINT_M 0x7FFF0000
244 #define INTRPTS_NEXTINT_S 16
245 #define INTRPTS_NEXTINT(x) ((x & INTRPTS_NEXTINT_M) >> INTRPTS_NEXTINT_S)
247 #define INTRPTS_INTFULL_M 0x00008000
248 #define INTRPTS_INTFULL_S 15
249 #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)
260 #define INTRPT_DIR_M 0x80000000
261 #define INTRPT_DIR_S 31
262 #define INTRPT_DIR(x) ((x & INTRPT_DIR_M) >> INTRPT_DIR_S)
264 #define INTRPT_GRP_M 0x60000000
265 #define INTRPT_GRP_MSB_M 0x00004000
266 #define INTRPT_GRP_S 29
267 #define INTRPT_GRP_MSB_S 12
268 #define INTRPT_GRP(x) (((x & INTRPT_GRP_M) >> INTRPT_GRP_S) | \
269 ((x & INTRPT_GRP_MSB_M) >> INTRPT_GRP_MSB_S))
271 #define INTRPT_CH_M 0x1F000000
272 #define INTRPT_CH_S 24
273 #define INTRPT_CH(x) ((x & INTRPT_CH_M) >> INTRPT_CH_S)
275 #define INTRPT_EVENT_M 0x00F00000
276 #define INTRPT_EVENT_S 20
277 #define INTRPT_EVENT(x) ((x & INTRPT_EVENT_M) >> INTRPT_EVENT_S)
279 #define INTRPT_ERROR_M 0x000F0000
280 #define INTRPT_ERROR_S 16
281 #define INTRPT_ERROR(x) ((x & INTRPT_ERROR_M) >> INTRPT_ERROR_S)
283 #define INTRPT_ILOST_M 0x00008000
284 #define INTRPT_ILOST_S 15
285 #define INTRPT_ILOST(x) ((x & INTRPT_ILOST_M) >> INTRPT_ILOST_S)
287 #define INTRPT_PERR_M 0x00004000
288 #define INTRPT_PERR_S 14
289 #define INTRPT_PERR(x) ((x & INTRPT_PERR_M) >> INTRPT_PERR_S)
291 #define INTRPT_BLEN_M 0x00003FFF
292 #define INTRPT_BLEN_S 0
293 #define INTRPT_BLEN(x) ((x & INTRPT_BLEN_M) >> INTRPT_BLEN_S)
297 #define OWNER_BIT 0x80000000
299 #define HOST_TX_OWNED 0x00000000
300 #define MUSYCC_TX_OWNED 0x80000000
301 #define HOST_RX_OWNED 0x80000000
302 #define MUSYCC_RX_OWNED 0x00000000
304 #define POLL_DISABLED 0x40000000
306 #define EOMIRQ_ENABLE 0x20000000
308 #define EOBIRQ_ENABLE 0x10000000
309 #define PADFILL_ENABLE 0x01000000
310 #define REPEAT_BIT 0x00008000
311 #define LENGTH_MASK 0X3fff
315 #define EXTRA_FLAGS 16
317 #define IDLE_CODE_MASK 0x03
319 #define EXTRA_FLAGS_MASK 0xff
321 #define PCI_PERMUTED_OWNER_BIT 0x00000080
327 #define SR_NOOP (0<<(SREQ))
328 #define SR_CHIP_RESET (1<<(SREQ))
329 #define SR_GROUP_RESET (2<<(SREQ))
330 #define SR_GLOBAL_INIT (4<<(SREQ))
333 #define SR_GROUP_INIT (5<<(SREQ))
340 #define SR_CHANNEL_ACTIVATE (8<<(SREQ))
343 #define SR_GCHANNEL_MASK 0x001F
344 #define SR_CHANNEL_DEACTIVATE (9<<(SREQ))
345 #define SR_JUMP (10<<(SREQ))
347 #define SR_CHANNEL_CONFIG (11<<(SREQ))
349 #define SR_GLOBAL_CONFIG (16<<(SREQ))
351 #define SR_INTERRUPT_Q (17<<(SREQ))
353 #define SR_GROUP_CONFIG (18<<(SREQ))
355 #define SR_MEMORY_PROTECT (19<<(SREQ))
357 #define SR_MESSAGE_LENGTH (20<<(SREQ))
359 #define SR_PORT_CONFIG (21<<(SREQ))
361 #define SR_TIMESLOT_MAP (24<<(SREQ))
362 #define SR_SUBCHANNEL_MAP (25<<(SREQ))
363 #define SR_CHAN_CONFIG_TABLE (26<<(SREQ))
366 #define SR_TX_DIRECTION 0x00000020
369 #define SR_RX_DIRECTION 0x00000000
375 #define INT_IQD_TX 0x80000000
376 #define INT_IQD_GRP 0x60000000
377 #define INT_IQD_CHAN 0x1f000000
378 #define INT_IQD_EVENT 0x00f00000
379 #define INT_IQD_ERROR 0x000f0000
380 #define INT_IQD_ILOST 0x00008000
381 #define INT_IQD_PERR 0x00004000
382 #define INT_IQD_BLEN 0x00003fff
399 #define ERR_ERRORS 16
413 #define TRANSMIT_DIRECTION 0x80000000
415 #define ILOST 0x00008000
416 #define GROUPMSB 0x00004000
417 #define SACK_IMAGE 0x00100000
418 #define INITIAL_STATUS 0x10000
422 #define SUERM_THRESHOLD 0x1f