Go to the documentation of this file.
13 #define CLEAR_BIT(x, bit) x =bit
20 #define SOFTWARE_RESET 0x8000
21 #define CMD_OPCODE 0x0f00
22 #define CMD_CHANNEL 0x00f0
23 #define CMD_FLAG 0x0001
26 #define INIT_RXTX_PARAMS 0x0000
27 #define INIT_RX_PARAMS 0x0100
28 #define INIT_TX_PARAMS 0x0200
29 #define ENTER_HUNT_MODE 0x0300
30 #define STOP_TX 0x0400
31 #define GR_STOP_TX 0x0500
32 #define RESTART_TX 0x0600
33 #define CLOSE_RX_BD 0x0700
34 #define SET_ENET_GROUP 0x0800
35 #define RESET_ENET_GROUP 0x0900
38 #define STOP_TX_32 0x0e00
39 #define ENTER_HUNT_MODE_32 0x1e00
49 #define SET_TIMER 0x0800
52 #define INTR_VALID 0x8000
53 #define INTR_WRAP 0x4000
54 #define INTR_CH_NU 0x07c0
55 #define INTR_MASK_BITS 0x383f
62 #define MODE_APPLE_TALK 0x2
65 #define MODE_PROFIBUS 0x5
66 #define MODE_ASYNC_HDLC 0x6
68 #define MODE_BISYNC 0x8
69 #define MODE_DDCMP 0x9
70 #define MODE_MULTI_CHANNEL 0xa
71 #define MODE_ETHERNET 0xc
73 #define DIAG_NORMAL 0x0
74 #define DIAG_LOCAL_LPB 0x1
75 #define DIAG_AUTO_ECHO 0x2
76 #define DIAG_LBP_ECHO 0x3
83 #define ENC_DIFF_MANC 0x6
86 #define CLOCK_RATE_1 0x0
87 #define CLOCK_RATE_8 0x1
88 #define CLOCK_RATE_16 0x2
89 #define CLOCK_RATE_32 0x3
104 #define TSNC_INFINITE 0x0
105 #define TSNC_14_65 0x1
106 #define TSNC_4_15 0x2
109 #define EDGE_BOTH 0x0
119 #define TCRC_CCITT16 0x0
120 #define TCRC_CRC16 0x1
121 #define TCRC_CCITT32 0x2
127 #define TODR_TOD 0x8000
136 #define CICR_SCA_SCC1 ((uint)0x00000000)
137 #define CICR_SCB_SCC2 ((uint)0x00040000)
138 #define CICR_SCC_SCC3 ((uint)0x00200000)
139 #define CICR_SCD_SCC4 ((uint)0x00c00000)
141 #define CICR_IRL_MASK ((uint)0x0000e000)
142 #define CICR_HP_MASK ((uint)0x00001f00)
143 #define CICR_VBA_MASK ((uint)0x000000e0)
144 #define CICR_SPS ((uint)0x00000001)
151 #define INTR_PIO_PC0 0x80000000
152 #define INTR_SCC1 0x40000000
153 #define INTR_SCC2 0x20000000
154 #define INTR_SCC3 0x10000000
155 #define INTR_SCC4 0x08000000
156 #define INTR_PIO_PC1 0x04000000
157 #define INTR_TIMER1 0x02000000
158 #define INTR_PIO_PC2 0x01000000
159 #define INTR_PIO_PC3 0x00800000
160 #define INTR_SDMA_BERR 0x00400000
161 #define INTR_DMA1 0x00200000
162 #define INTR_DMA2 0x00100000
163 #define INTR_TIMER2 0x00040000
164 #define INTR_CP_TIMER 0x00020000
165 #define INTR_PIP_STATUS 0x00010000
166 #define INTR_PIO_PC4 0x00008000
167 #define INTR_PIO_PC5 0x00004000
168 #define INTR_TIMER3 0x00001000
169 #define INTR_PIO_PC6 0x00000800
170 #define INTR_PIO_PC7 0x00000400
171 #define INTR_PIO_PC8 0x00000200
172 #define INTR_TIMER4 0x00000080
173 #define INTR_PIO_PC9 0x00000040
174 #define INTR_SCP 0x00000020
175 #define INTR_SMC1 0x00000010
176 #define INTR_SMC2 0x00000008
177 #define INTR_PIO_PC10 0x00000004
178 #define INTR_PIO_PC11 0x00000002
179 #define INTR_ERR 0x00000001
187 #define CPMVEC_PIO_PC0 0x1f
188 #define CPMVEC_SCC1 0x1e
189 #define CPMVEC_SCC2 0x1d
190 #define CPMVEC_SCC3 0x1c
191 #define CPMVEC_SCC4 0x1b
192 #define CPMVEC_PIO_PC1 0x1a
193 #define CPMVEC_TIMER1 0x19
194 #define CPMVEC_PIO_PC2 0x18
195 #define CPMVEC_PIO_PC3 0x17
196 #define CPMVEC_SDMA_CB_ERR 0x16
197 #define CPMVEC_IDMA1 0x15
198 #define CPMVEC_IDMA2 0x14
199 #define CPMVEC_RESERVED3 0x13
200 #define CPMVEC_TIMER2 0x12
201 #define CPMVEC_RISCTIMER 0x11
202 #define CPMVEC_RESERVED2 0x10
203 #define CPMVEC_PIO_PC4 0x0f
204 #define CPMVEC_PIO_PC5 0x0e
205 #define CPMVEC_TIMER3 0x0c
206 #define CPMVEC_PIO_PC6 0x0b
207 #define CPMVEC_PIO_PC7 0x0a
208 #define CPMVEC_PIO_PC8 0x09
209 #define CPMVEC_RESERVED1 0x08
210 #define CPMVEC_TIMER4 0x07
211 #define CPMVEC_PIO_PC9 0x06
212 #define CPMVEC_SPI 0x05
213 #define CPMVEC_SMC1 0x04
214 #define CPMVEC_SMC2 0x03
215 #define CPMVEC_PIO_PC10 0x02
216 #define CPMVEC_PIO_PC11 0x01
217 #define CPMVEC_ERROR 0x00
267 #define PA_RXD1 ((ushort)0x0001)
268 #define PA_TXD1 ((ushort)0x0002)
269 #define PA_RXD2 ((ushort)0x0004)
270 #define PA_TXD2 ((ushort)0x0008)
271 #define PA_RXD3 ((ushort)0x0010)
272 #define PA_TXD3 ((ushort)0x0020)
273 #define PA_RXD4 ((ushort)0x0040)
274 #define PA_TXD4 ((ushort)0x0080)
276 #define PA_CLK1 ((ushort)0x0100)
277 #define PA_CLK2 ((ushort)0x0200)
278 #define PA_CLK3 ((ushort)0x0400)
279 #define PA_CLK4 ((ushort)0x0800)
280 #define PA_CLK5 ((ushort)0x1000)
281 #define PA_CLK6 ((ushort)0x2000)
282 #define PA_CLK7 ((ushort)0x4000)
283 #define PA_CLK8 ((ushort)0x8000)
293 #define PC_RTS1 ((ushort)0x0001)
294 #define PC_RTS2 ((ushort)0x0002)
295 #define PC__RTS3 ((ushort)0x0004)
296 #define PC__RTS4 ((ushort)0x0008)
298 #define PC_CTS1 ((ushort)0x0010)
299 #define PC_CD1 ((ushort)0x0020)
300 #define PC_CTS2 ((ushort)0x0040)
301 #define PC_CD2 ((ushort)0x0080)
302 #define PC_CTS3 ((ushort)0x0100)
303 #define PC_CD3 ((ushort)0x0200)
304 #define PC_CTS4 ((ushort)0x0400)
305 #define PC_CD4 ((ushort)0x0800)
313 #define ADR_MASK 0x1ffc
314 #define RDWR_MASK 0x0002
315 #define FC_MASK 0x0001
320 #define TBD_ADDR(quicc,pram) ((struct quicc_bd *) \
321 (quicc->ch_or_u.u.udata_bd_ucode + pram->tbase))
322 #define RBD_ADDR(quicc,pram) ((struct quicc_bd *) \
323 (quicc->ch_or_u.u.udata_bd_ucode + pram->rbase))
324 #define TBD_CUR_ADDR(quicc,pram) ((struct quicc_bd *) \
325 (quicc->ch_or_u.u.udata_bd_ucode + pram->tbptr))
326 #define RBD_CUR_ADDR(quicc,pram) ((struct quicc_bd *) \
327 (quicc->ch_or_u.u.udata_bd_ucode + pram->rbptr))
328 #define TBD_SET_CUR_ADDR(bd,quicc,pram) pram->tbptr = \
329 ((unsigned short)((char *)(bd) - (char *)(quicc->ch_or_u.u.udata_bd_ucode)))
330 #define RBD_SET_CUR_ADDR(bd,quicc,pram) pram->rbptr = \
331 ((unsigned short)((char *)(bd) - (char *)(quicc->ch_or_u.u.udata_bd_ucode)))
332 #define INCREASE_TBD(bd,quicc,pram) { \
333 if((bd)->status & T_W) \
334 (bd) = TBD_ADDR(quicc,pram); \
338 #define DECREASE_TBD(bd,quicc,pram) { \
339 if ((bd) == TBD_ADDR(quicc, pram)) \
340 while (!((bd)->status & T_W)) \
345 #define INCREASE_RBD(bd,quicc,pram) { \
346 if((bd)->status & R_W) \
347 (bd) = RBD_ADDR(quicc,pram); \
351 #define DECREASE_RBD(bd,quicc,pram) { \
352 if ((bd) == RBD_ADDR(quicc, pram)) \
353 while (!((bd)->status & T_W)) \
362 #define QMC_BASE(quicc,page) (struct global_multi_pram *)(&quicc->pram[page])
363 #define MCBASE(quicc,page) (unsigned long)(quicc->pram[page].m.mcbase)
364 #define CHANNEL_PRAM_BASE(quicc,channel) ((struct quicc32_pram *) \
365 (&(quicc->ch_or_u.ch_pram_tbl[channel])))
366 #define TBD_32_ADDR(quicc,page,channel) ((struct quicc_bd *) \
367 (MCBASE(quicc,page) + (CHANNEL_PRAM_BASE(quicc,channel)->tbase)))
368 #define RBD_32_ADDR(quicc,page,channel) ((struct quicc_bd *) \
369 (MCBASE(quicc,page) + (CHANNEL_PRAM_BASE(quicc,channel)->rbase)))
370 #define TBD_32_CUR_ADDR(quicc,page,channel) ((struct quicc_bd *) \
371 (MCBASE(quicc,page) + (CHANNEL_PRAM_BASE(quicc,channel)->tbptr)))
372 #define RBD_32_CUR_ADDR(quicc,page,channel) ((struct quicc_bd *) \
373 (MCBASE(quicc,page) + (CHANNEL_PRAM_BASE(quicc,channel)->rbptr)))
374 #define TBD_32_SET_CUR_ADDR(bd,quicc,page,channel) \
375 CHANNEL_PRAM_BASE(quicc,channel)->tbptr = \
376 ((unsigned short)((char *)(bd) - (char *)(MCBASE(quicc,page))))
377 #define RBD_32_SET_CUR_ADDR(bd,quicc,page,channel) \
378 CHANNEL_PRAM_BASE(quicc,channel)->rbptr = \
379 ((unsigned short)((char *)(bd) - (char *)(MCBASE(quicc,page))))
381 #define INCREASE_TBD_32(bd,quicc,page,channel) { \
382 if((bd)->status & T_W) \
383 (bd) = TBD_32_ADDR(quicc,page,channel); \
387 #define DECREASE_TBD_32(bd,quicc,page,channel) { \
388 if ((bd) == TBD_32_ADDR(quicc, page,channel)) \
389 while (!((bd)->status & T_W)) \
394 #define INCREASE_RBD_32(bd,quicc,page,channel) { \
395 if((bd)->status & R_W) \
396 (bd) = RBD_32_ADDR(quicc,page,channel); \
400 #define DECREASE_RBD_32(bd,quicc,page,channel) { \
401 if ((bd) == RBD_32_ADDR(quicc, page,channel)) \
402 while (!((bd)->status & T_W)) \