blob: 8bab5225c24e78c10aa17e74d7cc43b32a345ea2 [file] [log] [blame]
wdenkfe8c2802002-11-03 00:38:21 +00001/*
2 * MPC8xx Communication Processor Module.
3 * Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
4 *
wdenkd4ca31c2004-01-02 14:00:00 +00005 * (C) Copyright 2000-2004
6 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
7 *
wdenkfe8c2802002-11-03 00:38:21 +00008 * This file contains structures and information for the communication
9 * processor channels. Some CPM control and status is available
10 * throught the MPC8xx internal memory map. See immap.h for details.
11 * This file only contains what I need for the moment, not the total
12 * CPM capabilities. I (or someone else) will add definitions as they
13 * are needed. -- Dan
14 *
15 * On the MBX board, EPPC-Bug loads CPM microcode into the first 512
16 * bytes of the DP RAM and relocates the I2C parameter area to the
17 * IDMA1 space. The remaining DP RAM is available for buffer descriptors
18 * or other use.
19 */
20#ifndef __CPM_8XX__
21#define __CPM_8XX__
22
23#include <linux/config.h>
24#include <asm/8xx_immap.h>
25
26/* CPM Command register.
27*/
wdenk7c7a23b2002-12-07 00:20:59 +000028#define CPM_CR_RST ((ushort)0x8000)
29#define CPM_CR_OPCODE ((ushort)0x0f00)
30#define CPM_CR_CHAN ((ushort)0x00f0)
31#define CPM_CR_FLG ((ushort)0x0001)
wdenkfe8c2802002-11-03 00:38:21 +000032
33/* Some commands (there are more...later)
34*/
35#define CPM_CR_INIT_TRX ((ushort)0x0000)
36#define CPM_CR_INIT_RX ((ushort)0x0001)
37#define CPM_CR_INIT_TX ((ushort)0x0002)
38#define CPM_CR_HUNT_MODE ((ushort)0x0003)
39#define CPM_CR_STOP_TX ((ushort)0x0004)
40#define CPM_CR_RESTART_TX ((ushort)0x0006)
41#define CPM_CR_SET_GADDR ((ushort)0x0008)
42
43/* Channel numbers.
44*/
wdenk7c7a23b2002-12-07 00:20:59 +000045#define CPM_CR_CH_SCC1 ((ushort)0x0000)
46#define CPM_CR_CH_I2C ((ushort)0x0001) /* I2C and IDMA1 */
47#define CPM_CR_CH_SCC2 ((ushort)0x0004)
48#define CPM_CR_CH_SPI ((ushort)0x0005) /* SPI/IDMA2/Timers */
49#define CPM_CR_CH_SCC3 ((ushort)0x0008)
50#define CPM_CR_CH_SMC1 ((ushort)0x0009) /* SMC1 / DSP1 */
51#define CPM_CR_CH_SCC4 ((ushort)0x000c)
52#define CPM_CR_CH_SMC2 ((ushort)0x000d) /* SMC2 / DSP2 */
wdenkfe8c2802002-11-03 00:38:21 +000053
54#define mk_cr_cmd(CH, CMD) ((CMD << 8) | (CH << 4))
55
56/*
57 * DPRAM defines and allocation functions
58 */
59
60/* The dual ported RAM is multi-functional. Some areas can be (and are
61 * being) used for microcode. There is an area that can only be used
62 * as data ram for buffer descriptors, which is all we use right now.
63 * Currently the first 512 and last 256 bytes are used for microcode.
64 */
65#ifdef CFG_ALLOC_DPRAM
66
67#define CPM_DATAONLY_BASE ((uint)0x0800)
68#define CPM_DATAONLY_SIZE ((uint)0x0700)
69#define CPM_DP_NOSPACE ((uint)0x7fffffff)
70
71#else
72
73#define CPM_SERIAL_BASE 0x0800
74#define CPM_I2C_BASE 0x0820
75#define CPM_SPI_BASE 0x0840
76#define CPM_FEC_BASE 0x0860
77#define CPM_WLKBD_BASE 0x0880
78#define CPM_SCC_BASE 0x0900
79#define CPM_POST_BASE 0x0980
80
81#endif
82
wdenkea909b72002-11-21 23:11:29 +000083#ifndef CFG_CPM_POST_WORD_ADDR
wdenkfe8c2802002-11-03 00:38:21 +000084#define CPM_POST_WORD_ADDR 0x07FC
wdenkea909b72002-11-21 23:11:29 +000085#else
86#define CPM_POST_WORD_ADDR CFG_CPM_POST_WORD_ADDR
87#endif
wdenkfe8c2802002-11-03 00:38:21 +000088
wdenkbdccc4f2003-08-05 17:43:17 +000089#ifndef CFG_CPM_BOOTCOUNT_ADDR
90#define CPM_BOOTCOUNT_ADDR (CPM_POST_WORD_ADDR - 2*sizeof(ulong))
91#else
92#define CPM_BOOTCOUNT_ADDR CFG_CPM_BOOTCOUNT_ADDR
93#endif
94
wdenkfe8c2802002-11-03 00:38:21 +000095#define BD_IIC_START ((uint) 0x0400) /* <- please use CPM_I2C_BASE !! */
96
97/* Export the base address of the communication processor registers
98 * and dual port ram.
99 */
100extern cpm8xx_t *cpmp; /* Pointer to comm processor */
101
102/* Buffer descriptors used by many of the CPM protocols.
103*/
104typedef struct cpm_buf_desc {
105 ushort cbd_sc; /* Status and Control */
106 ushort cbd_datlen; /* Data length in buffer */
107 uint cbd_bufaddr; /* Buffer address in host memory */
108} cbd_t;
109
110#define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */
111#define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */
112#define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
113#define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */
114#define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame */
115#define BD_SC_TC ((ushort)0x0400) /* Transmit CRC */
116#define BD_SC_CM ((ushort)0x0200) /* Continous mode */
117#define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */
118#define BD_SC_P ((ushort)0x0100) /* xmt preamble */
119#define BD_SC_BR ((ushort)0x0020) /* Break received */
120#define BD_SC_FR ((ushort)0x0010) /* Framing error */
121#define BD_SC_PR ((ushort)0x0008) /* Parity error */
122#define BD_SC_OV ((ushort)0x0002) /* Overrun */
123#define BD_SC_CD ((ushort)0x0001) /* Carrier Detect lost */
124
125/* Parameter RAM offsets.
126*/
127#define PROFF_SCC1 ((uint)0x0000)
128#define PROFF_IIC ((uint)0x0080)
129#define PROFF_SCC2 ((uint)0x0100)
130#define PROFF_SPI ((uint)0x0180)
131#define PROFF_SCC3 ((uint)0x0200)
132#define PROFF_SMC1 ((uint)0x0280)
133#define PROFF_SCC4 ((uint)0x0300)
134#define PROFF_SMC2 ((uint)0x0380)
135
136/* Define enough so I can at least use the serial port as a UART.
137 * The MBX uses SMC1 as the host serial port.
138 */
139typedef struct smc_uart {
140 ushort smc_rbase; /* Rx Buffer descriptor base address */
141 ushort smc_tbase; /* Tx Buffer descriptor base address */
142 u_char smc_rfcr; /* Rx function code */
143 u_char smc_tfcr; /* Tx function code */
144 ushort smc_mrblr; /* Max receive buffer length */
145 uint smc_rstate; /* Internal */
146 uint smc_idp; /* Internal */
147 ushort smc_rbptr; /* Internal */
148 ushort smc_ibc; /* Internal */
149 uint smc_rxtmp; /* Internal */
150 uint smc_tstate; /* Internal */
151 uint smc_tdp; /* Internal */
152 ushort smc_tbptr; /* Internal */
153 ushort smc_tbc; /* Internal */
154 uint smc_txtmp; /* Internal */
155 ushort smc_maxidl; /* Maximum idle characters */
156 ushort smc_tmpidl; /* Temporary idle counter */
157 ushort smc_brklen; /* Last received break length */
158 ushort smc_brkec; /* rcv'd break condition counter */
159 ushort smc_brkcr; /* xmt break count register */
160 ushort smc_rmask; /* Temporary bit mask */
161} smc_uart_t;
162
163/* Function code bits.
164*/
165#define SMC_EB ((u_char)0x10) /* Set big endian byte order */
166
167/* SMC uart mode register.
168*/
169#define SMCMR_REN ((ushort)0x0001)
170#define SMCMR_TEN ((ushort)0x0002)
171#define SMCMR_DM ((ushort)0x000c)
172#define SMCMR_SM_GCI ((ushort)0x0000)
173#define SMCMR_SM_UART ((ushort)0x0020)
174#define SMCMR_SM_TRANS ((ushort)0x0030)
175#define SMCMR_SM_MASK ((ushort)0x0030)
176#define SMCMR_PM_EVEN ((ushort)0x0100) /* Even parity, else odd */
177#define SMCMR_REVD SMCMR_PM_EVEN
178#define SMCMR_PEN ((ushort)0x0200) /* Parity enable */
179#define SMCMR_BS SMCMR_PEN
180#define SMCMR_SL ((ushort)0x0400) /* Two stops, else one */
181#define SMCR_CLEN_MASK ((ushort)0x7800) /* Character length */
182#define smcr_mk_clen(C) (((C) << 11) & SMCR_CLEN_MASK)
183
184/* SMC2 as Centronics parallel printer. It is half duplex, in that
185 * it can only receive or transmit. The parameter ram values for
186 * each direction are either unique or properly overlap, so we can
187 * include them in one structure.
188 */
189typedef struct smc_centronics {
190 ushort scent_rbase;
191 ushort scent_tbase;
192 u_char scent_cfcr;
193 u_char scent_smask;
194 ushort scent_mrblr;
195 uint scent_rstate;
196 uint scent_r_ptr;
197 ushort scent_rbptr;
198 ushort scent_r_cnt;
199 uint scent_rtemp;
200 uint scent_tstate;
201 uint scent_t_ptr;
202 ushort scent_tbptr;
203 ushort scent_t_cnt;
204 uint scent_ttemp;
205 ushort scent_max_sl;
206 ushort scent_sl_cnt;
207 ushort scent_character1;
208 ushort scent_character2;
209 ushort scent_character3;
210 ushort scent_character4;
211 ushort scent_character5;
212 ushort scent_character6;
213 ushort scent_character7;
214 ushort scent_character8;
215 ushort scent_rccm;
216 ushort scent_rccr;
217} smc_cent_t;
218
219/* Centronics Status Mask Register.
220*/
221#define SMC_CENT_F ((u_char)0x08)
222#define SMC_CENT_PE ((u_char)0x04)
223#define SMC_CENT_S ((u_char)0x02)
224
225/* SMC Event and Mask register.
226*/
227#define SMCM_BRKE ((unsigned char)0x40) /* When in UART Mode */
228#define SMCM_BRK ((unsigned char)0x10) /* When in UART Mode */
229#define SMCM_TXE ((unsigned char)0x10) /* When in Transparent Mode */
230#define SMCM_BSY ((unsigned char)0x04)
231#define SMCM_TX ((unsigned char)0x02)
232#define SMCM_RX ((unsigned char)0x01)
233
234/* Baud rate generators.
235*/
236#define CPM_BRG_RST ((uint)0x00020000)
237#define CPM_BRG_EN ((uint)0x00010000)
238#define CPM_BRG_EXTC_INT ((uint)0x00000000)
239#define CPM_BRG_EXTC_CLK2 ((uint)0x00004000)
240#define CPM_BRG_EXTC_CLK6 ((uint)0x00008000)
241#define CPM_BRG_ATB ((uint)0x00002000)
242#define CPM_BRG_CD_MASK ((uint)0x00001ffe)
243#define CPM_BRG_DIV16 ((uint)0x00000001)
244
245/* SI Clock Route Register
246*/
247#define SICR_RCLK_SCC1_BRG1 ((uint)0x00000000)
248#define SICR_TCLK_SCC1_BRG1 ((uint)0x00000000)
249#define SICR_RCLK_SCC2_BRG2 ((uint)0x00000800)
250#define SICR_TCLK_SCC2_BRG2 ((uint)0x00000100)
251#define SICR_RCLK_SCC3_BRG3 ((uint)0x00100000)
252#define SICR_TCLK_SCC3_BRG3 ((uint)0x00020000)
253#define SICR_RCLK_SCC4_BRG4 ((uint)0x18000000)
254#define SICR_TCLK_SCC4_BRG4 ((uint)0x03000000)
255
256/* SCCs.
257*/
258#define SCC_GSMRH_IRP ((uint)0x00040000)
259#define SCC_GSMRH_GDE ((uint)0x00010000)
260#define SCC_GSMRH_TCRC_CCITT ((uint)0x00008000)
261#define SCC_GSMRH_TCRC_BISYNC ((uint)0x00004000)
262#define SCC_GSMRH_TCRC_HDLC ((uint)0x00000000)
263#define SCC_GSMRH_REVD ((uint)0x00002000)
264#define SCC_GSMRH_TRX ((uint)0x00001000)
265#define SCC_GSMRH_TTX ((uint)0x00000800)
266#define SCC_GSMRH_CDP ((uint)0x00000400)
267#define SCC_GSMRH_CTSP ((uint)0x00000200)
268#define SCC_GSMRH_CDS ((uint)0x00000100)
269#define SCC_GSMRH_CTSS ((uint)0x00000080)
270#define SCC_GSMRH_TFL ((uint)0x00000040)
271#define SCC_GSMRH_RFW ((uint)0x00000020)
272#define SCC_GSMRH_TXSY ((uint)0x00000010)
273#define SCC_GSMRH_SYNL16 ((uint)0x0000000c)
274#define SCC_GSMRH_SYNL8 ((uint)0x00000008)
275#define SCC_GSMRH_SYNL4 ((uint)0x00000004)
276#define SCC_GSMRH_RTSM ((uint)0x00000002)
277#define SCC_GSMRH_RSYN ((uint)0x00000001)
278
279#define SCC_GSMRL_SIR ((uint)0x80000000) /* SCC2 only */
280#define SCC_GSMRL_EDGE_NONE ((uint)0x60000000)
281#define SCC_GSMRL_EDGE_NEG ((uint)0x40000000)
282#define SCC_GSMRL_EDGE_POS ((uint)0x20000000)
283#define SCC_GSMRL_EDGE_BOTH ((uint)0x00000000)
284#define SCC_GSMRL_TCI ((uint)0x10000000)
285#define SCC_GSMRL_TSNC_3 ((uint)0x0c000000)
286#define SCC_GSMRL_TSNC_4 ((uint)0x08000000)
287#define SCC_GSMRL_TSNC_14 ((uint)0x04000000)
288#define SCC_GSMRL_TSNC_INF ((uint)0x00000000)
289#define SCC_GSMRL_RINV ((uint)0x02000000)
290#define SCC_GSMRL_TINV ((uint)0x01000000)
291#define SCC_GSMRL_TPL_128 ((uint)0x00c00000)
292#define SCC_GSMRL_TPL_64 ((uint)0x00a00000)
293#define SCC_GSMRL_TPL_48 ((uint)0x00800000)
294#define SCC_GSMRL_TPL_32 ((uint)0x00600000)
295#define SCC_GSMRL_TPL_16 ((uint)0x00400000)
296#define SCC_GSMRL_TPL_8 ((uint)0x00200000)
297#define SCC_GSMRL_TPL_NONE ((uint)0x00000000)
298#define SCC_GSMRL_TPP_ALL1 ((uint)0x00180000)
299#define SCC_GSMRL_TPP_01 ((uint)0x00100000)
300#define SCC_GSMRL_TPP_10 ((uint)0x00080000)
301#define SCC_GSMRL_TPP_ZEROS ((uint)0x00000000)
302#define SCC_GSMRL_TEND ((uint)0x00040000)
303#define SCC_GSMRL_TDCR_32 ((uint)0x00030000)
304#define SCC_GSMRL_TDCR_16 ((uint)0x00020000)
305#define SCC_GSMRL_TDCR_8 ((uint)0x00010000)
306#define SCC_GSMRL_TDCR_1 ((uint)0x00000000)
307#define SCC_GSMRL_RDCR_32 ((uint)0x0000c000)
308#define SCC_GSMRL_RDCR_16 ((uint)0x00008000)
309#define SCC_GSMRL_RDCR_8 ((uint)0x00004000)
310#define SCC_GSMRL_RDCR_1 ((uint)0x00000000)
311#define SCC_GSMRL_RENC_DFMAN ((uint)0x00003000)
312#define SCC_GSMRL_RENC_MANCH ((uint)0x00002000)
313#define SCC_GSMRL_RENC_FM0 ((uint)0x00001000)
314#define SCC_GSMRL_RENC_NRZI ((uint)0x00000800)
315#define SCC_GSMRL_RENC_NRZ ((uint)0x00000000)
316#define SCC_GSMRL_TENC_DFMAN ((uint)0x00000600)
317#define SCC_GSMRL_TENC_MANCH ((uint)0x00000400)
318#define SCC_GSMRL_TENC_FM0 ((uint)0x00000200)
319#define SCC_GSMRL_TENC_NRZI ((uint)0x00000100)
320#define SCC_GSMRL_TENC_NRZ ((uint)0x00000000)
321#define SCC_GSMRL_DIAG_LE ((uint)0x000000c0) /* Loop and echo */
322#define SCC_GSMRL_DIAG_ECHO ((uint)0x00000080)
323#define SCC_GSMRL_DIAG_LOOP ((uint)0x00000040)
324#define SCC_GSMRL_DIAG_NORM ((uint)0x00000000)
325#define SCC_GSMRL_ENR ((uint)0x00000020)
326#define SCC_GSMRL_ENT ((uint)0x00000010)
327#define SCC_GSMRL_MODE_ENET ((uint)0x0000000c)
328#define SCC_GSMRL_MODE_DDCMP ((uint)0x00000009)
329#define SCC_GSMRL_MODE_BISYNC ((uint)0x00000008)
330#define SCC_GSMRL_MODE_V14 ((uint)0x00000007)
331#define SCC_GSMRL_MODE_AHDLC ((uint)0x00000006)
332#define SCC_GSMRL_MODE_PROFIBUS ((uint)0x00000005)
333#define SCC_GSMRL_MODE_UART ((uint)0x00000004)
334#define SCC_GSMRL_MODE_SS7 ((uint)0x00000003)
335#define SCC_GSMRL_MODE_ATALK ((uint)0x00000002)
336#define SCC_GSMRL_MODE_HDLC ((uint)0x00000000)
337
338#define SCC_TODR_TOD ((ushort)0x8000)
339
340/* SCC Event and Mask register.
341*/
342#define SCCM_TXE ((unsigned char)0x10)
343#define SCCM_BSY ((unsigned char)0x04)
344#define SCCM_TX ((unsigned char)0x02)
345#define SCCM_RX ((unsigned char)0x01)
346
347typedef struct scc_param {
348 ushort scc_rbase; /* Rx Buffer descriptor base address */
349 ushort scc_tbase; /* Tx Buffer descriptor base address */
350 u_char scc_rfcr; /* Rx function code */
351 u_char scc_tfcr; /* Tx function code */
352 ushort scc_mrblr; /* Max receive buffer length */
353 uint scc_rstate; /* Internal */
354 uint scc_idp; /* Internal */
355 ushort scc_rbptr; /* Internal */
356 ushort scc_ibc; /* Internal */
357 uint scc_rxtmp; /* Internal */
358 uint scc_tstate; /* Internal */
359 uint scc_tdp; /* Internal */
360 ushort scc_tbptr; /* Internal */
361 ushort scc_tbc; /* Internal */
362 uint scc_txtmp; /* Internal */
363 uint scc_rcrc; /* Internal */
364 uint scc_tcrc; /* Internal */
365} sccp_t;
366
367/* Function code bits.
368*/
369#define SCC_EB ((u_char)0x10) /* Set big endian byte order */
370
371/* CPM Ethernet through SCCx.
372 */
373typedef struct scc_enet {
374 sccp_t sen_genscc;
375 uint sen_cpres; /* Preset CRC */
376 uint sen_cmask; /* Constant mask for CRC */
377 uint sen_crcec; /* CRC Error counter */
378 uint sen_alec; /* alignment error counter */
379 uint sen_disfc; /* discard frame counter */
380 ushort sen_pads; /* Tx short frame pad character */
381 ushort sen_retlim; /* Retry limit threshold */
382 ushort sen_retcnt; /* Retry limit counter */
383 ushort sen_maxflr; /* maximum frame length register */
384 ushort sen_minflr; /* minimum frame length register */
385 ushort sen_maxd1; /* maximum DMA1 length */
386 ushort sen_maxd2; /* maximum DMA2 length */
387 ushort sen_maxd; /* Rx max DMA */
388 ushort sen_dmacnt; /* Rx DMA counter */
389 ushort sen_maxb; /* Max BD byte count */
390 ushort sen_gaddr1; /* Group address filter */
391 ushort sen_gaddr2;
392 ushort sen_gaddr3;
393 ushort sen_gaddr4;
394 uint sen_tbuf0data0; /* Save area 0 - current frame */
395 uint sen_tbuf0data1; /* Save area 1 - current frame */
396 uint sen_tbuf0rba; /* Internal */
397 uint sen_tbuf0crc; /* Internal */
398 ushort sen_tbuf0bcnt; /* Internal */
399 ushort sen_paddrh; /* physical address (MSB) */
400 ushort sen_paddrm;
401 ushort sen_paddrl; /* physical address (LSB) */
402 ushort sen_pper; /* persistence */
403 ushort sen_rfbdptr; /* Rx first BD pointer */
404 ushort sen_tfbdptr; /* Tx first BD pointer */
405 ushort sen_tlbdptr; /* Tx last BD pointer */
406 uint sen_tbuf1data0; /* Save area 0 - current frame */
407 uint sen_tbuf1data1; /* Save area 1 - current frame */
408 uint sen_tbuf1rba; /* Internal */
409 uint sen_tbuf1crc; /* Internal */
410 ushort sen_tbuf1bcnt; /* Internal */
411 ushort sen_txlen; /* Tx Frame length counter */
412 ushort sen_iaddr1; /* Individual address filter */
413 ushort sen_iaddr2;
414 ushort sen_iaddr3;
415 ushort sen_iaddr4;
416 ushort sen_boffcnt; /* Backoff counter */
417
418 /* NOTE: Some versions of the manual have the following items
419 * incorrectly documented. Below is the proper order.
420 */
421 ushort sen_taddrh; /* temp address (MSB) */
422 ushort sen_taddrm;
423 ushort sen_taddrl; /* temp address (LSB) */
424} scc_enet_t;
425
426/**********************************************************************
427 *
428 * Board specific configuration settings.
429 *
430 * Please note that we use the presence of a #define SCC_ENET and/or
431 * #define FEC_ENET to enable the SCC resp. FEC ethernet drivers.
432 **********************************************************************/
433
434
435/*** ADS *************************************************************/
436
437#if defined(CONFIG_MPC860) && defined(CONFIG_ADS)
438/* This ENET stuff is for the MPC860ADS with ethernet on SCC1.
439 */
440
441#define PROFF_ENET PROFF_SCC1
442#define CPM_CR_ENET CPM_CR_CH_SCC1
443#define SCC_ENET 0
444
445#define PA_ENET_RXD ((ushort)0x0001)
446#define PA_ENET_TXD ((ushort)0x0002)
447#define PA_ENET_TCLK ((ushort)0x0100)
448#define PA_ENET_RCLK ((ushort)0x0200)
449
450#define PB_ENET_TENA ((uint)0x00001000)
451
452#define PC_ENET_CLSN ((ushort)0x0010)
453#define PC_ENET_RENA ((ushort)0x0020)
454
455#define SICR_ENET_MASK ((uint)0x000000ff)
456#define SICR_ENET_CLKRT ((uint)0x0000002c)
457
458/* 68160 PHY control */
459
460#define PC_ENET_ETHLOOP ((ushort)0x0800)
461#define PC_ENET_TPFLDL ((ushort)0x0400)
462#define PC_ENET_TPSQEL ((ushort)0x0200)
463
464#endif /* MPC860ADS */
465
466/*** AMX860 **********************************************/
467
468#if defined(CONFIG_AMX860)
469
470/* This ENET stuff is for the AMX860 with ethernet on SCC1.
471 */
472
473#define PROFF_ENET PROFF_SCC1
474#define CPM_CR_ENET CPM_CR_CH_SCC1
475#define SCC_ENET 0
476
477#define PA_ENET_RXD ((ushort)0x0001)
478#define PA_ENET_TXD ((ushort)0x0002)
479#define PA_ENET_TCLK ((ushort)0x0400)
480#define PA_ENET_RCLK ((ushort)0x0800)
481
482#define PB_ENET_TENA ((uint)0x00001000)
483
484#define PC_ENET_CLSN ((ushort)0x0010)
485#define PC_ENET_RENA ((ushort)0x0020)
486
487#define SICR_ENET_MASK ((uint)0x000000ff)
488#define SICR_ENET_CLKRT ((uint)0x0000003e)
489
490/* 68160 PHY control */
491
492#define PB_ENET_ETHLOOP ((uint)0x00020000)
493#define PB_ENET_TPFLDL ((uint)0x00010000)
494#define PB_ENET_TPSQEL ((uint)0x00008000)
495#define PD_ENET_ETH_EN ((ushort)0x0004)
496
497#endif /* CONFIG_AMX860 */
498
499/*** BSEIP **********************************************************/
500
501#ifdef CONFIG_BSEIP
502/* This ENET stuff is for the MPC823 with ethernet on SCC2.
503 * This is unique to the BSE ip-Engine board.
504 */
505#define PROFF_ENET PROFF_SCC2
506#define CPM_CR_ENET CPM_CR_CH_SCC2
507#define SCC_ENET 1
508#define PA_ENET_RXD ((ushort)0x0004)
509#define PA_ENET_TXD ((ushort)0x0008)
510#define PA_ENET_TCLK ((ushort)0x0100)
511#define PA_ENET_RCLK ((ushort)0x0200)
512#define PB_ENET_TENA ((uint)0x00002000)
513#define PC_ENET_CLSN ((ushort)0x0040)
514#define PC_ENET_RENA ((ushort)0x0080)
515
516/* BSE uses port B and C bits for PHY control also.
517*/
518#define PB_BSE_POWERUP ((uint)0x00000004)
519#define PB_BSE_FDXDIS ((uint)0x00008000)
520#define PC_BSE_LOOPBACK ((ushort)0x0800)
521
522#define SICR_ENET_MASK ((uint)0x0000ff00)
523#define SICR_ENET_CLKRT ((uint)0x00002c00)
524#endif /* CONFIG_BSEIP */
525
526/*** BSEIP **********************************************************/
527
528#ifdef CONFIG_FLAGADM
529/* Enet configuration for the FLAGADM */
530/* Enet on SCC2 */
531
532#define PROFF_ENET PROFF_SCC2
533#define CPM_CR_ENET CPM_CR_CH_SCC2
534#define SCC_ENET 1
wdenk7c7a23b2002-12-07 00:20:59 +0000535#define PA_ENET_RXD ((ushort)0x0004)
536#define PA_ENET_TXD ((ushort)0x0008)
wdenkfe8c2802002-11-03 00:38:21 +0000537#define PA_ENET_TCLK ((ushort)0x0100)
538#define PA_ENET_RCLK ((ushort)0x0400)
539#define PB_ENET_TENA ((uint)0x00002000)
540#define PC_ENET_CLSN ((ushort)0x0040)
541#define PC_ENET_RENA ((ushort)0x0080)
542
543#define SICR_ENET_MASK ((uint)0x0000ff00)
544#define SICR_ENET_CLKRT ((uint)0x00003400)
545#endif /* CONFIG_FLAGADM */
546
547/*** C2MON **********************************************************/
548
549#ifdef CONFIG_C2MON
550
551# ifndef CONFIG_FEC_ENET /* use SCC for 10Mbps Ethernet */
552# error "Ethernet on SCC not supported on C2MON Board!"
553# else /* Use FEC for Fast Ethernet */
554
555#undef SCC_ENET
556#define FEC_ENET
557
558#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
559#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
560#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
561#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
562#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
563#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
564#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
565#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
566#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
567#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
568#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
569#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
570#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
571
572#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
573
574# endif /* CONFIG_FEC_ENET */
575#endif /* CONFIG_C2MON */
576
577/*********************************************************************/
578
579
580/*** CCM and PCU E ***********************************************/
581
582/* The PCU E and CCM use the FEC on a MPC860T for Ethernet */
583
584#if defined (CONFIG_PCU_E) || defined(CONFIG_CCM)
585
586#define FEC_ENET /* use FEC for EThernet */
587#undef SCC_ENET
588
589#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
590#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
591#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
592#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
593#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
594#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
595#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
596#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
597#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
598#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
599#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
600#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
601#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
602
603#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
604
605#endif /* CONFIG_PCU_E, CONFIG_CCM */
606
wdenk3bac3512003-03-12 10:41:04 +0000607/*** ELPT860 *********************************************************/
608
609#ifdef CONFIG_ELPT860
610/* Bits in parallel I/O port registers that have to be set/cleared
611 * to configure the pins for SCC1 use.
612 */
613# define PROFF_ENET PROFF_SCC1
614# define CPM_CR_ENET CPM_CR_CH_SCC1
615# define SCC_ENET 0
616
617# define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
618# define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
619# define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
620# define PA_ENET_TCLK ((ushort)0x0200) /* PA 6 */
621
622# define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
623# define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
624# define PC_ENET_RENA ((ushort)0x0020) /* PC 10 */
625
626/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK1) to
627 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
628 */
629# define SICR_ENET_MASK ((uint)0x000000FF)
630# define SICR_ENET_CLKRT ((uint)0x00000025)
631#endif /* CONFIG_ELPT860 */
632
wdenkfe8c2802002-11-03 00:38:21 +0000633/*** ESTEEM 192E **************************************************/
634#ifdef CONFIG_ESTEEM192E
635/* ESTEEM192E
636 * This ENET stuff is for the MPC850 with ethernet on SCC2. This
637 * is very similar to the RPX-Lite configuration.
638 * Note TENA , LOOPBACK , FDPLEX_DIS on Port B.
639 */
640
641#define PROFF_ENET PROFF_SCC2
642#define CPM_CR_ENET CPM_CR_CH_SCC2
643#define SCC_ENET 1
644
645#define PA_ENET_RXD ((ushort)0x0004)
646#define PA_ENET_TXD ((ushort)0x0008)
647#define PA_ENET_TCLK ((ushort)0x0200)
648#define PA_ENET_RCLK ((ushort)0x0800)
649#define PB_ENET_TENA ((uint)0x00002000)
650#define PC_ENET_CLSN ((ushort)0x0040)
651#define PC_ENET_RENA ((ushort)0x0080)
652
653#define SICR_ENET_MASK ((uint)0x0000ff00)
654#define SICR_ENET_CLKRT ((uint)0x00003d00)
655
656#define PB_ENET_LOOPBACK ((uint)0x00004000)
657#define PB_ENET_FDPLEX_DIS ((uint)0x00008000)
658
659#endif
660
661/*** FADS823 ********************************************************/
662
663#if defined(CONFIG_MPC823FADS) && defined(CONFIG_FADS)
664/* This ENET stuff is for the MPC823FADS with ethernet on SCC2.
665 */
666#ifdef CONFIG_SCC2_ENET
667#define PROFF_ENET PROFF_SCC2
668#define CPM_CR_ENET CPM_CR_CH_SCC2
669#define SCC_ENET 1
670#define CPMVEC_ENET CPMVEC_SCC2
671#endif
672
673#ifdef CONFIG_SCC1_ENET
674#define PROFF_ENET PROFF_SCC1
675#define CPM_CR_ENET CPM_CR_CH_SCC1
676#define SCC_ENET 0
677#define CPMVEC_ENET CPMVEC_SCC1
678#endif
679
680#define PA_ENET_RXD ((ushort)0x0004)
681#define PA_ENET_TXD ((ushort)0x0008)
682#define PA_ENET_TCLK ((ushort)0x0400)
683#define PA_ENET_RCLK ((ushort)0x0200)
684
685#define PB_ENET_TENA ((uint)0x00002000)
686
687#define PC_ENET_CLSN ((ushort)0x0040)
688#define PC_ENET_RENA ((ushort)0x0080)
689
690#define SICR_ENET_MASK ((uint)0x0000ff00)
691#define SICR_ENET_CLKRT ((uint)0x00002e00)
692
693#endif /* CONFIG_FADS823FADS */
694
695/*** FADS850SAR ********************************************************/
696
697#if defined(CONFIG_MPC850SAR) && defined(CONFIG_FADS)
698/* This ENET stuff is for the MPC850SAR with ethernet on SCC2. Some of
699 * this may be unique to the FADS850SAR configuration.
700 * Note TENA is on Port B.
701 */
702#define PROFF_ENET PROFF_SCC2
703#define CPM_CR_ENET CPM_CR_CH_SCC2
704#define SCC_ENET 1
705#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
706#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
707#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
708#define PA_ENET_TCLK ((ushort)0x0800) /* PA 4 */
709#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
710#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
711#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
712
713#define SICR_ENET_MASK ((uint)0x0000ff00)
714#define SICR_ENET_CLKRT ((uint)0x00002f00) /* RCLK-CLK2, TCLK-CLK4 */
715#endif /* CONFIG_FADS850SAR */
716
717/*** FADS860T********************************************************/
718
wdenk2535d602003-07-17 23:16:40 +0000719#if (defined(CONFIG_MPC860T) || defined(CONFIG_MPC866_et_al)) \
720 && defined(CONFIG_FADS)
721/* This ENET stuff is for the MPC860TFADS/MPC8xxADS with ethernet on SCC1.
wdenkfe8c2802002-11-03 00:38:21 +0000722 */
wdenkfe8c2802002-11-03 00:38:21 +0000723#ifdef CONFIG_SCC1_ENET
724#define SCC_ENET 0
725#endif /* CONFIG_SCC1_ETHERNET */
726#define PROFF_ENET PROFF_SCC1
727#define CPM_CR_ENET CPM_CR_CH_SCC1
728
729#define PA_ENET_RXD ((ushort)0x0001)
730#define PA_ENET_TXD ((ushort)0x0002)
731#define PA_ENET_TCLK ((ushort)0x0100)
732#define PA_ENET_RCLK ((ushort)0x0200)
733
734#define PB_ENET_TENA ((uint)0x00001000)
735
736#define PC_ENET_CLSN ((ushort)0x0010)
737#define PC_ENET_RENA ((ushort)0x0020)
738
739#define SICR_ENET_MASK ((uint)0x000000ff)
740#define SICR_ENET_CLKRT ((uint)0x0000002c)
741
742/* This ENET stuff is for the MPC860TFADS with ethernet on FEC.
743 */
744
745#ifdef CONFIG_FEC_ENET
746#define FEC_ENET /* use FEC for EThernet */
747#endif /* CONFIG_FEC_ETHERNET */
748
749#endif /* CONFIG_FADS860T */
750
wdenk384ae022002-11-05 00:17:55 +0000751/*** FPS850L, FPS860L ************************************************/
wdenkfe8c2802002-11-03 00:38:21 +0000752
wdenk384ae022002-11-05 00:17:55 +0000753#if defined(CONFIG_FPS850L) || defined(CONFIG_FPS860L)
wdenkfe8c2802002-11-03 00:38:21 +0000754/* Bits in parallel I/O port registers that have to be set/cleared
wdenk384ae022002-11-05 00:17:55 +0000755 * to configure the pins for SCC2 use.
wdenkfe8c2802002-11-03 00:38:21 +0000756 */
757#define PROFF_ENET PROFF_SCC2
758#define CPM_CR_ENET CPM_CR_CH_SCC2
759#define SCC_ENET 1
760#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
761#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
762#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
763#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
764
765#define PC_ENET_TENA ((ushort)0x0002) /* PC 14 */
766#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
767#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
768
769/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
770 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
771 */
772#define SICR_ENET_MASK ((uint)0x0000ff00)
773#define SICR_ENET_CLKRT ((uint)0x00002600)
wdenk384ae022002-11-05 00:17:55 +0000774#endif /* CONFIG_FPS850L, CONFIG_FPS860L */
wdenkfe8c2802002-11-03 00:38:21 +0000775
776/*** GEN860T **********************************************************/
777#if defined(CONFIG_GEN860T)
778#undef SCC_ENET
779#define FEC_ENET
780
781#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
782#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
783#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
784#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
785#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
786#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
787#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
788#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
789#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
790#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
791#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
792#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
793#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
794#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3-15 */
795#endif /* CONFIG_GEN860T */
796
797/*** GENIETV ********************************************************/
798
799#if defined(CONFIG_GENIETV)
800/* Ethernet is only on SCC2 */
801
802#define CONFIG_SCC2_ENET
803#define PROFF_ENET PROFF_SCC2
804#define CPM_CR_ENET CPM_CR_CH_SCC2
805#define SCC_ENET 1
806#define CPMVEC_ENET CPMVEC_SCC2
807
808#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
809#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
810#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
811#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
812
813#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
814
815#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
816#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
817
818#define SICR_ENET_MASK ((uint)0x0000ff00)
819#define SICR_ENET_CLKRT ((uint)0x00002e00)
820
821#endif /* CONFIG_GENIETV */
822
823/*** GTH ******************************************************/
824
825#ifdef CONFIG_GTH
826#ifdef CONFIG_FEC_ENET
827#define FEC_ENET /* use FEC for EThernet */
828#endif /* CONFIG_FEC_ETHERNET */
829
830/* This ENET stuff is for GTH 10 Mbit ( SCC ) */
831#define PROFF_ENET PROFF_SCC1
832#define CPM_CR_ENET CPM_CR_CH_SCC1
833#define SCC_ENET 0
834
835#define PA_ENET_RXD ((ushort)0x0001) /* PA15 */
836#define PA_ENET_TXD ((ushort)0x0002) /* PA14 */
837#define PA_ENET_TCLK ((ushort)0x0800) /* PA4 */
838#define PA_ENET_RCLK ((ushort)0x0400) /* PA5 */
839
840#define PB_ENET_TENA ((uint)0x00001000) /* PB19 */
841
842#define PC_ENET_CLSN ((ushort)0x0010) /* PC11 */
843#define PC_ENET_RENA ((ushort)0x0020) /* PC10 */
844
845/* NOTE. This is reset for 10Mbit port only */
846#define PC_ENET_RESET ((ushort)0x0100) /* PC 7 */
847
848#define SICR_ENET_MASK ((uint)0x000000ff)
849
850/* TCLK PA4 -->CLK4, RCLK PA5 -->CLK3 */
851#define SICR_ENET_CLKRT ((uint)0x00000037)
852
853#endif /* CONFIG_GTH */
854
855/*** HERMES-PRO ******************************************************/
856
857/* The HERMES-PRO uses the FEC on a MPC860T for Ethernet */
858
859#ifdef CONFIG_HERMES
860
861#define FEC_ENET /* use FEC for EThernet */
862#undef SCC_ENET
863
864
865#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
866#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
867#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
868#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
869#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
870#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
871#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
872#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
873#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
874#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
875#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
876#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
877#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
878
879#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
880
881#endif /* CONFIG_HERMES */
882
883/*** IAD210 **********************************************************/
884
885/* The IAD210 uses the FEC on a MPC860P for Ethernet */
886
887#if defined(CONFIG_IAD210)
888
889# define FEC_ENET /* use FEC for Ethernet */
890# undef SCC_ENET
891
892# define PD_MII_TXD1 ((ushort) 0x1000 ) /* PD 3 */
893# define PD_MII_TXD2 ((ushort) 0x0800 ) /* PD 4 */
894# define PD_MII_TXD3 ((ushort) 0x0400 ) /* PD 5 */
895# define PD_MII_RX_DV ((ushort) 0x0200 ) /* PD 6 */
896# define PD_MII_RX_ERR ((ushort) 0x0100 ) /* PD 7 */
897# define PD_MII_RX_CLK ((ushort) 0x0080 ) /* PD 8 */
898# define PD_MII_TXD0 ((ushort) 0x0040 ) /* PD 9 */
899# define PD_MII_RXD0 ((ushort) 0x0020 ) /* PD 10 */
900# define PD_MII_TX_ERR ((ushort) 0x0010 ) /* PD 11 */
901# define PD_MII_MDC ((ushort) 0x0008 ) /* PD 12 */
902# define PD_MII_RXD1 ((ushort) 0x0004 ) /* PD 13 */
903# define PD_MII_RXD2 ((ushort) 0x0002 ) /* PD 14 */
904# define PD_MII_RXD3 ((ushort) 0x0001 ) /* PD 15 */
905
906# define PD_MII_MASK ((ushort) 0x1FFF ) /* PD 3...15 */
907
908#endif /* CONFIG_IAD210 */
909
910/*** ICU862 **********************************************************/
911
912#if defined(CONFIG_ICU862)
913
914#ifdef CONFIG_FEC_ENET
915#define FEC_ENET /* use FEC for EThernet */
916#endif /* CONFIG_FEC_ETHERNET */
917
918#endif /* CONFIG_ICU862 */
919
920/*** IP860 **********************************************************/
921
922#if defined(CONFIG_IP860)
923/* Bits in parallel I/O port registers that have to be set/cleared
924 * to configure the pins for SCC1 use.
925 */
926#define PROFF_ENET PROFF_SCC1
927#define CPM_CR_ENET CPM_CR_CH_SCC1
928#define SCC_ENET 0
929#define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
930#define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
931#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
932#define PA_ENET_TCLK ((ushort)0x0100) /* PA 7 */
933
934#define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
935#define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
936#define PC_ENET_RENA ((ushort)0x0020) /* PC 10 */
937
938#define PB_ENET_RESET (uint)0x00000008 /* PB 28 */
939#define PB_ENET_JABD (uint)0x00000004 /* PB 29 */
940
941/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
942 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
943 */
944#define SICR_ENET_MASK ((uint)0x000000ff)
945#define SICR_ENET_CLKRT ((uint)0x0000002C)
946#endif /* CONFIG_IP860 */
947
948/*** IVMS8 **********************************************************/
949
950/* The IVMS8 uses the FEC on a MPC860T for Ethernet */
951
952#if defined(CONFIG_IVMS8) || defined(CONFIG_IVML24)
953
954#define FEC_ENET /* use FEC for EThernet */
955#undef SCC_ENET
956
957#define PB_ENET_POWER ((uint)0x00010000) /* PB 15 */
958
959#define PC_ENET_RESET ((ushort)0x0010) /* PC 11 */
960
961#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
962#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
963#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
964#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
965#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
966#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
967#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
968#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
969#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
970#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
971#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
972#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
973#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
974
975#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
976
977#endif /* CONFIG_IVMS8, CONFIG_IVML24 */
978
wdenk56f94be2002-11-05 16:35:14 +0000979/*** KUP4K *********************************************************/
980/* The KUP4K uses the FEC on a MPC855T for Ethernet */
981
982#if defined(CONFIG_KUP4K)
983
984#define FEC_ENET /* use FEC for EThernet */
985#undef SCC_ENET
986
987#define PB_ENET_POWER ((uint)0x00010000) /* PB 15 */
988
989#define PC_ENET_RESET ((ushort)0x0010) /* PC 11 */
990
991#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
992#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
993#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
994#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
995#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
996#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
997#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
998#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
999#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
1000#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
1001#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
1002#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
1003#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
1004
1005#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
1006
1007#endif /* CONFIG_KUP4K */
1008
1009
wdenkfe8c2802002-11-03 00:38:21 +00001010/*** LANTEC *********************************************************/
1011
1012#if defined(CONFIG_LANTEC) && CONFIG_LANTEC >= 2
1013/* Bits in parallel I/O port registers that have to be set/cleared
1014 * to configure the pins for SCC2 use.
1015 */
1016#define PROFF_ENET PROFF_SCC2
1017#define CPM_CR_ENET CPM_CR_CH_SCC2
1018#define SCC_ENET 1
1019#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1020#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1021#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
1022#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1023
1024#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
1025
1026#define PC_ENET_LBK ((ushort)0x0010) /* PC 11 */
1027#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1028#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1029
1030/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK2) to
1031 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1032 */
1033#define SICR_ENET_MASK ((uint)0x0000FF00)
1034#define SICR_ENET_CLKRT ((uint)0x00002E00)
1035#endif /* CONFIG_LANTEC v2 */
1036
1037/*** LWMON **********************************************************/
1038
1039#if defined(CONFIG_LWMON) && !defined(CONFIG_8xx_CONS_SCC2)
1040/* Bits in parallel I/O port registers that have to be set/cleared
1041 * to configure the pins for SCC2 use.
1042 */
1043#define PROFF_ENET PROFF_SCC2
1044#define CPM_CR_ENET CPM_CR_CH_SCC2
1045#define SCC_ENET 1
1046#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1047#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1048#define PA_ENET_RCLK ((ushort)0x0800) /* PA 4 */
1049#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1050
1051#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
1052
1053#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1054#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1055
1056/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK4) to
1057 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1058 */
1059#define SICR_ENET_MASK ((uint)0x0000ff00)
1060#define SICR_ENET_CLKRT ((uint)0x00003E00)
1061#endif /* CONFIG_LWMON */
1062
1063/*** NX823 ***********************************************/
1064
1065#if defined(CONFIG_NX823)
1066/* Bits in parallel I/O port registers that have to be set/cleared
1067 * to configure the pins for SCC1 use.
1068 */
1069#define PROFF_ENET PROFF_SCC2
1070#define CPM_CR_ENET CPM_CR_CH_SCC2
1071#define SCC_ENET 1
wdenk7c7a23b2002-12-07 00:20:59 +00001072#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1073#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1074#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
1075#define PA_ENET_TCLK ((ushort)0x0800) /* PA 4 */
wdenkfe8c2802002-11-03 00:38:21 +00001076
wdenk7c7a23b2002-12-07 00:20:59 +00001077#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
wdenkfe8c2802002-11-03 00:38:21 +00001078
wdenk7c7a23b2002-12-07 00:20:59 +00001079#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1080#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
wdenkfe8c2802002-11-03 00:38:21 +00001081
1082/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
1083 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1084 */
wdenk7c7a23b2002-12-07 00:20:59 +00001085#define SICR_ENET_MASK ((uint)0x0000ff00)
1086#define SICR_ENET_CLKRT ((uint)0x00002f00)
wdenkfe8c2802002-11-03 00:38:21 +00001087
1088#endif /* CONFIG_NX823 */
1089
1090/*** MBX ************************************************************/
1091
1092#ifdef CONFIG_MBX
1093/* Bits in parallel I/O port registers that have to be set/cleared
1094 * to configure the pins for SCC1 use. The TCLK and RCLK seem unique
1095 * to the MBX860 board. Any two of the four available clocks could be
1096 * used, and the MPC860 cookbook manual has an example using different
1097 * clock pins.
1098 */
1099#define PROFF_ENET PROFF_SCC1
1100#define CPM_CR_ENET CPM_CR_CH_SCC1
1101#define SCC_ENET 0
1102#define PA_ENET_RXD ((ushort)0x0001)
1103#define PA_ENET_TXD ((ushort)0x0002)
1104#define PA_ENET_TCLK ((ushort)0x0200)
1105#define PA_ENET_RCLK ((ushort)0x0800)
1106#define PC_ENET_TENA ((ushort)0x0001)
1107#define PC_ENET_CLSN ((ushort)0x0010)
1108#define PC_ENET_RENA ((ushort)0x0020)
1109
1110/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
1111 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
1112 */
1113#define SICR_ENET_MASK ((uint)0x000000ff)
1114#define SICR_ENET_CLKRT ((uint)0x0000003d)
1115#endif /* CONFIG_MBX */
1116
1117/*** MHPC ********************************************************/
1118
1119#if defined(CONFIG_MHPC)
1120/* This ENET stuff is for the MHPC with ethernet on SCC2.
1121 * Note TENA is on Port B.
1122 */
1123#define PROFF_ENET PROFF_SCC2
1124#define CPM_CR_ENET CPM_CR_CH_SCC2
1125#define SCC_ENET 1
1126#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1127#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1128#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
1129#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1130#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
1131#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1132#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1133
1134#define SICR_ENET_MASK ((uint)0x0000ff00)
1135#define SICR_ENET_CLKRT ((uint)0x00002e00) /* RCLK-CLK2, TCLK-CLK3 */
1136#endif /* CONFIG_MHPC */
1137
wdenk608c9142003-01-13 23:54:46 +00001138/*** NETVIA *******************************************************/
1139
wdenkdc7c9a12003-03-26 06:55:25 +00001140/* SinoVee Microsystems SC8xx series FEL8xx-AT,SC823,SC850,SC855T,SC860T */
1141#if ( defined CONFIG_SVM_SC8xx )
1142# ifndef CONFIG_FEC_ENET
1143
1144#define PROFF_ENET PROFF_SCC2
1145#define CPM_CR_ENET CPM_CR_CH_SCC2
1146#define SCC_ENET 1
1147
1148 /* Bits in parallel I/O port registers that have to be set/cleared
1149 * * * * to configure the pins for SCC2 use.
1150 * * * */
1151#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1152#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1153#define PA_ENET_RCLK ((ushort)0x0400) /* PA 5 */
1154#define PA_ENET_TCLK ((ushort)0x0800) /* PA 4 */
1155
1156#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
1157
1158#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1159#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1160/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
1161 * * * * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1162 * * * */
1163#define SICR_ENET_MASK ((uint)0x0000ff00)
1164#define SICR_ENET_CLKRT ((uint)0x00003700)
1165
1166# else /* Use FEC for Fast Ethernet */
1167
1168#undef SCC_ENET
1169#define FEC_ENET
1170
1171#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
1172#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
1173#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
1174#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
1175#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
1176#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
1177#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
1178#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
1179#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
1180#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
1181#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
1182#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
1183#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
1184
1185#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
1186
1187# endif /* CONFIG_FEC_ENET */
1188#endif /* CONFIG_SVM_SC8xx */
wdenk8bde7f72003-06-27 21:31:46 +00001189
1190
wdenk608c9142003-01-13 23:54:46 +00001191#if defined(CONFIG_NETVIA)
1192/* Bits in parallel I/O port registers that have to be set/cleared
1193 * to configure the pins for SCC2 use.
1194 */
1195#define PROFF_ENET PROFF_SCC2
1196#define CPM_CR_ENET CPM_CR_CH_SCC2
1197#define SCC_ENET 1
1198#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1199#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1200#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
1201#define PA_ENET_TCLK ((ushort)0x0800) /* PA 4 */
1202
wdenk993cad92003-06-26 22:04:09 +00001203#if !defined(CONFIG_NETVIA_VERSION) || CONFIG_NETVIA_VERSION == 1
1204# define PB_ENET_PDN ((ushort)0x4000) /* PB 17 */
1205#elif CONFIG_NETVIA_VERSION >= 2
1206# define PC_ENET_PDN ((ushort)0x0008) /* PC 12 */
1207#endif
1208
wdenk608c9142003-01-13 23:54:46 +00001209#define PB_ENET_TENA ((ushort)0x2000) /* PB 18 */
1210
1211#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1212#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1213
1214/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
1215 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1216 */
1217#define SICR_ENET_MASK ((uint)0x0000ff00)
1218#define SICR_ENET_CLKRT ((uint)0x00002f00)
1219
1220#endif /* CONFIG_NETVIA */
1221
wdenk3bbc8992003-12-07 22:27:15 +00001222/*** QS850/QS823 ***************************************************/
1223
1224#if defined(CONFIG_QS850) || defined(CONFIG_QS823)
1225#undef FEC_ENET /* Don't use FEC for EThernet */
1226
1227#define PROFF_ENET PROFF_SCC2
1228#define CPM_CR_ENET CPM_CR_CH_SCC2
1229#define SCC_ENET 1
1230
1231#define PA_ENET_RXD ((ushort)0x0004) /* RXD on PA13 (Pin D9) */
1232#define PA_ENET_TXD ((ushort)0x0008) /* TXD on PA12 (Pin D7) */
1233#define PC_ENET_RENA ((ushort)0x0080) /* RENA on PC8 (Pin D12) */
1234#define PC_ENET_CLSN ((ushort)0x0040) /* CLSN on PC9 (Pin C12) */
1235#define PA_ENET_TCLK ((ushort)0x0200) /* TCLK on PA6 (Pin D8) */
1236#define PA_ENET_RCLK ((ushort)0x0800) /* RCLK on PA4 (Pin D10) */
1237#define PB_ENET_TENA ((uint)0x00002000) /* TENA on PB18 (Pin D11) */
1238#define PC_ENET_LBK ((ushort)0x0010) /* Loopback control on PC11 (Pin B14) */
1239#define PC_ENET_LI ((ushort)0x0020) /* Link Integrity control PC10 (A15) */
1240#define PC_ENET_SQE ((ushort)0x0100) /* SQE Disable control PC7 (B15) */
1241
1242/* SCC2 TXCLK from CLK2
1243 * SCC2 RXCLK from CLK4
1244 * SCC2 Connected to NMSI */
1245#define SICR_ENET_MASK ((uint)0x00007F00)
1246#define SICR_ENET_CLKRT ((uint)0x00003D00)
1247
1248#endif /* CONFIG_QS850/QS823 */
1249
1250/*** QS860T ***************************************************/
1251
1252#ifdef CONFIG_QS860T
1253#ifdef CONFIG_FEC_ENET
1254#define FEC_ENET /* use FEC for EThernet */
1255#endif /* CONFIG_FEC_ETHERNET */
1256
1257/* This ENET stuff is for GTH 10 Mbit ( SCC ) */
1258#define PROFF_ENET PROFF_SCC1
1259#define CPM_CR_ENET CPM_CR_CH_SCC1
1260#define SCC_ENET 0
1261
1262#define PA_ENET_RXD ((ushort)0x0001) /* PA15 */
1263#define PA_ENET_TXD ((ushort)0x0002) /* PA14 */
1264#define PA_ENET_TCLK ((ushort)0x0800) /* PA4 */
1265#define PA_ENET_RCLK ((ushort)0x0200) /* PA6 */
1266#define PB_ENET_TENA ((uint)0x00001000) /* PB19 */
1267#define PC_ENET_CLSN ((ushort)0x0010) /* PC11 */
1268#define PC_ENET_RENA ((ushort)0x0020) /* PC10 */
1269
1270#define SICR_ENET_MASK ((uint)0x000000ff)
1271/* RCLK PA4 -->CLK4, TCLK PA6 -->CLK2 */
1272#define SICR_ENET_CLKRT ((uint)0x0000003D)
1273
1274#endif /* CONFIG_QS860T */
1275
wdenkfe8c2802002-11-03 00:38:21 +00001276/*** RPXCLASSIC *****************************************************/
1277
1278#ifdef CONFIG_RPXCLASSIC
1279
1280#ifdef CONFIG_FEC_ENET
1281
1282# define FEC_ENET /* use FEC for EThernet */
1283# undef SCC_ENET
1284
1285#else /* ! CONFIG_FEC_ENET */
1286
1287/* Bits in parallel I/O port registers that have to be set/cleared
1288 * to configure the pins for SCC1 use.
1289 */
1290#define PROFF_ENET PROFF_SCC1
1291#define CPM_CR_ENET CPM_CR_CH_SCC1
1292#define SCC_ENET 0
1293#define PA_ENET_RXD ((ushort)0x0001)
1294#define PA_ENET_TXD ((ushort)0x0002)
1295#define PA_ENET_TCLK ((ushort)0x0200)
1296#define PA_ENET_RCLK ((ushort)0x0800)
1297#define PB_ENET_TENA ((uint)0x00001000)
1298#define PC_ENET_CLSN ((ushort)0x0010)
1299#define PC_ENET_RENA ((ushort)0x0020)
1300
1301/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
1302 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
1303 */
1304#define SICR_ENET_MASK ((uint)0x000000ff)
1305#define SICR_ENET_CLKRT ((uint)0x0000003d)
1306
1307#endif /* CONFIG_FEC_ENET */
1308
1309#endif /* CONFIG_RPXCLASSIC */
1310
1311/*** RPXLITE ********************************************************/
1312
1313#ifdef CONFIG_RPXLITE
1314/* This ENET stuff is for the MPC850 with ethernet on SCC2. Some of
1315 * this may be unique to the RPX-Lite configuration.
1316 * Note TENA is on Port B.
1317 */
1318#define PROFF_ENET PROFF_SCC2
1319#define CPM_CR_ENET CPM_CR_CH_SCC2
1320#define SCC_ENET 1
1321#define PA_ENET_RXD ((ushort)0x0004)
1322#define PA_ENET_TXD ((ushort)0x0008)
1323#define PA_ENET_TCLK ((ushort)0x0200)
1324#define PA_ENET_RCLK ((ushort)0x0800)
wdenk73a8b272003-06-05 19:27:42 +00001325#if defined(CONFIG_RMU)
1326#define PC_ENET_TENA ((uint)0x00000002) /* PC14 */
1327#else
wdenkfe8c2802002-11-03 00:38:21 +00001328#define PB_ENET_TENA ((uint)0x00002000)
wdenk73a8b272003-06-05 19:27:42 +00001329#endif
wdenkfe8c2802002-11-03 00:38:21 +00001330#define PC_ENET_CLSN ((ushort)0x0040)
1331#define PC_ENET_RENA ((ushort)0x0080)
1332
1333#define SICR_ENET_MASK ((uint)0x0000ff00)
1334#define SICR_ENET_CLKRT ((uint)0x00003d00)
1335#endif /* CONFIG_RPXLITE */
1336
1337/*** SM850 *********************************************************/
1338
1339/* The SM850 Service Module uses SCC2 for IrDA and SCC3 for Ethernet */
1340
1341#ifdef CONFIG_SM850
1342#define PROFF_ENET PROFF_SCC3 /* Ethernet on SCC3 */
1343#define CPM_CR_ENET CPM_CR_CH_SCC3
1344#define SCC_ENET 2
1345#define PB_ENET_RXD ((uint)0x00000004) /* PB 29 */
1346#define PB_ENET_TXD ((uint)0x00000002) /* PB 30 */
1347#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
1348#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1349
1350#define PC_ENET_LBK ((ushort)0x0008) /* PC 12 */
1351#define PC_ENET_TENA ((ushort)0x0004) /* PC 13 */
1352
1353#define PC_ENET_RENA ((ushort)0x0800) /* PC 4 */
1354#define PC_ENET_CLSN ((ushort)0x0400) /* PC 5 */
1355
1356/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
1357 * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero.
1358 */
1359#define SICR_ENET_MASK ((uint)0x00FF0000)
1360#define SICR_ENET_CLKRT ((uint)0x00260000)
1361#endif /* CONFIG_SM850 */
1362
1363/*** SPD823TS ******************************************************/
1364
1365#ifdef CONFIG_SPD823TS
1366/* Bits in parallel I/O port registers that have to be set/cleared
1367 * to configure the pins for SCC2 use.
1368 */
1369#define PROFF_ENET PROFF_SCC2 /* Ethernet on SCC2 */
1370#define CPM_CR_ENET CPM_CR_CH_SCC2
1371#define SCC_ENET 1
1372#define PA_ENET_MDC ((ushort)0x0001) /* PA 15 !!! */
1373#define PA_ENET_MDIO ((ushort)0x0002) /* PA 14 !!! */
1374#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1375#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1376#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
1377#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1378
1379#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
1380
1381#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1382#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1383#define PC_ENET_RESET ((ushort)0x0100) /* PC 7 !!! */
1384
1385/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK2) to
1386 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1387 */
1388#define SICR_ENET_MASK ((uint)0x0000ff00)
1389#define SICR_ENET_CLKRT ((uint)0x00002E00)
1390#endif /* CONFIG_SPD823TS */
1391
1392/*** SXNI855T ******************************************************/
1393
1394#if defined(CONFIG_SXNI855T)
1395
1396#ifdef CONFIG_FEC_ENET
1397#define FEC_ENET /* use FEC for Ethernet */
1398#endif /* CONFIG_FEC_ETHERNET */
1399
1400#endif /* CONFIG_SXNI855T */
1401
wdenk71f95112003-06-15 22:40:42 +00001402/*** MVS1, TQM823L/M, TQM850L/M, ETX094, R360MPI *******************/
wdenkfe8c2802002-11-03 00:38:21 +00001403
1404#if (defined(CONFIG_MVS) && CONFIG_MVS < 2) || \
wdenk71f95112003-06-15 22:40:42 +00001405 defined(CONFIG_R360MPI) || defined(CONFIG_RBC823) || \
1406 defined(CONFIG_TQM823L) || defined(CONFIG_TQM823M) || \
1407 defined(CONFIG_TQM850L) || defined(CONFIG_TQM850M) || \
1408 defined(CONFIG_ETX094) || defined(CONFIG_RRVISION)|| \
wdenkfe8c2802002-11-03 00:38:21 +00001409 (defined(CONFIG_LANTEC) && CONFIG_LANTEC < 2)
1410/* Bits in parallel I/O port registers that have to be set/cleared
1411 * to configure the pins for SCC2 use.
1412 */
1413#define PROFF_ENET PROFF_SCC2
1414#define CPM_CR_ENET CPM_CR_CH_SCC2
1415#define SCC_ENET 1
1416#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
1417#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
1418#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
1419#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1420
1421#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
1422
1423#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
1424#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
1425#if defined(CONFIG_R360MPI)
1426#define PC_ENET_LBK ((ushort)0x0008) /* PC 12 */
1427#endif /* CONFIG_R360MPI */
1428
1429/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
1430 * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
1431 */
1432#define SICR_ENET_MASK ((uint)0x0000ff00)
1433#define SICR_ENET_CLKRT ((uint)0x00002600)
wdenk71f95112003-06-15 22:40:42 +00001434#endif /* CONFIG_MVS v1, CONFIG_TQM823L/M, CONFIG_TQM850L/M, etc. */
wdenkfe8c2802002-11-03 00:38:21 +00001435
wdenkd4ca31c2004-01-02 14:00:00 +00001436/*** TQM855L/M, TQM860L/M, TQM862L/M, TQM866L/M *********************/
wdenkfe8c2802002-11-03 00:38:21 +00001437
wdenk71f95112003-06-15 22:40:42 +00001438#if defined(CONFIG_TQM855L) || defined(CONFIG_TQM855M) || \
1439 defined(CONFIG_TQM860L) || defined(CONFIG_TQM860M) || \
wdenkd4ca31c2004-01-02 14:00:00 +00001440 defined(CONFIG_TQM862L) || defined(CONFIG_TQM862M) || \
1441 defined(CONFIG_TQM866L) || defined(CONFIG_TQM866M)
wdenkfe8c2802002-11-03 00:38:21 +00001442
1443# ifdef CONFIG_SCC1_ENET /* use SCC for 10Mbps Ethernet */
1444
1445/* Bits in parallel I/O port registers that have to be set/cleared
1446 * to configure the pins for SCC1 use.
1447 */
1448#define PROFF_ENET PROFF_SCC1
1449#define CPM_CR_ENET CPM_CR_CH_SCC1
1450#define SCC_ENET 0
1451#define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
1452#define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
1453#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
1454#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
1455
1456#define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
1457#define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
1458#define PC_ENET_RENA ((ushort)0x0020) /* PC 10 */
1459
1460/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
1461 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
1462 */
1463#define SICR_ENET_MASK ((uint)0x000000ff)
1464#define SICR_ENET_CLKRT ((uint)0x00000026)
1465
1466# endif /* CONFIG_SCC1_ENET */
1467
1468# ifdef CONFIG_FEC_ENET /* Use FEC for Fast Ethernet */
1469
1470#define FEC_ENET
1471
1472#define PD_MII_TXD1 ((ushort)0x1000) /* PD 3 */
1473#define PD_MII_TXD2 ((ushort)0x0800) /* PD 4 */
1474#define PD_MII_TXD3 ((ushort)0x0400) /* PD 5 */
1475#define PD_MII_RX_DV ((ushort)0x0200) /* PD 6 */
1476#define PD_MII_RX_ERR ((ushort)0x0100) /* PD 7 */
1477#define PD_MII_RX_CLK ((ushort)0x0080) /* PD 8 */
1478#define PD_MII_TXD0 ((ushort)0x0040) /* PD 9 */
1479#define PD_MII_RXD0 ((ushort)0x0020) /* PD 10 */
1480#define PD_MII_TX_ERR ((ushort)0x0010) /* PD 11 */
1481#define PD_MII_MDC ((ushort)0x0008) /* PD 12 */
1482#define PD_MII_RXD1 ((ushort)0x0004) /* PD 13 */
1483#define PD_MII_RXD2 ((ushort)0x0002) /* PD 14 */
1484#define PD_MII_RXD3 ((ushort)0x0001) /* PD 15 */
1485
1486#define PD_MII_MASK ((ushort)0x1FFF) /* PD 3...15 */
1487
1488# endif /* CONFIG_FEC_ENET */
wdenk71f95112003-06-15 22:40:42 +00001489#endif /* CONFIG_TQM855L/M, TQM860L/M, TQM862L/M */
wdenkfe8c2802002-11-03 00:38:21 +00001490
wdenk608c9142003-01-13 23:54:46 +00001491/*** V37 **********************************************************/
1492
1493#ifdef CONFIG_V37
1494/* This ENET stuff is for the MPC823 with ethernet on SCC2. Some of
1495 * this may be unique to the Marel V37 configuration.
1496 * Note TENA is on Port B.
wdenkfe8c2802002-11-03 00:38:21 +00001497 */
1498#define PROFF_ENET PROFF_SCC2
1499#define CPM_CR_ENET CPM_CR_CH_SCC2
1500#define SCC_ENET 1
wdenk608c9142003-01-13 23:54:46 +00001501#define PA_ENET_RXD ((ushort)0x0004)
1502#define PA_ENET_TXD ((ushort)0x0008)
1503#define PA_ENET_TCLK ((ushort)0x0400)
1504#define PA_ENET_RCLK ((ushort)0x0200)
1505#define PB_ENET_TENA ((uint)0x00002000)
1506#define PC_ENET_CLSN ((ushort)0x0040)
1507#define PC_ENET_RENA ((ushort)0x0080)
wdenkfe8c2802002-11-03 00:38:21 +00001508
wdenkfe8c2802002-11-03 00:38:21 +00001509#define SICR_ENET_MASK ((uint)0x0000ff00)
wdenk608c9142003-01-13 23:54:46 +00001510#define SICR_ENET_CLKRT ((uint)0x00002e00)
1511#endif /* CONFIG_V37 */
wdenkfe8c2802002-11-03 00:38:21 +00001512
wdenk3bbc8992003-12-07 22:27:15 +00001513
wdenkfe8c2802002-11-03 00:38:21 +00001514/*********************************************************************/
1515
1516/* SCC Event register as used by Ethernet.
1517*/
1518#define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */
1519#define SCCE_ENET_TXE ((ushort)0x0010) /* Transmit Error */
1520#define SCCE_ENET_RXF ((ushort)0x0008) /* Full frame received */
1521#define SCCE_ENET_BSY ((ushort)0x0004) /* All incoming buffers full */
1522#define SCCE_ENET_TXB ((ushort)0x0002) /* A buffer was transmitted */
1523#define SCCE_ENET_RXB ((ushort)0x0001) /* A buffer was received */
1524
1525/* SCC Mode Register (PSMR) as used by Ethernet.
1526*/
1527#define SCC_PSMR_HBC ((ushort)0x8000) /* Enable heartbeat */
1528#define SCC_PSMR_FC ((ushort)0x4000) /* Force collision */
1529#define SCC_PSMR_RSH ((ushort)0x2000) /* Receive short frames */
1530#define SCC_PSMR_IAM ((ushort)0x1000) /* Check individual hash */
1531#define SCC_PSMR_ENCRC ((ushort)0x0800) /* Ethernet CRC mode */
1532#define SCC_PSMR_PRO ((ushort)0x0200) /* Promiscuous mode */
1533#define SCC_PSMR_BRO ((ushort)0x0100) /* Catch broadcast pkts */
1534#define SCC_PSMR_SBT ((ushort)0x0080) /* Special backoff timer */
1535#define SCC_PSMR_LPB ((ushort)0x0040) /* Set Loopback mode */
1536#define SCC_PSMR_SIP ((ushort)0x0020) /* Sample Input Pins */
1537#define SCC_PSMR_LCW ((ushort)0x0010) /* Late collision window */
1538#define SCC_PSMR_NIB22 ((ushort)0x000a) /* Start frame search */
1539#define SCC_PSMR_FDE ((ushort)0x0001) /* Full duplex enable */
1540
1541/* Buffer descriptor control/status used by Ethernet receive.
1542*/
1543#define BD_ENET_RX_EMPTY ((ushort)0x8000)
1544#define BD_ENET_RX_WRAP ((ushort)0x2000)
1545#define BD_ENET_RX_INTR ((ushort)0x1000)
1546#define BD_ENET_RX_LAST ((ushort)0x0800)
1547#define BD_ENET_RX_FIRST ((ushort)0x0400)
1548#define BD_ENET_RX_MISS ((ushort)0x0100)
1549#define BD_ENET_RX_LG ((ushort)0x0020)
1550#define BD_ENET_RX_NO ((ushort)0x0010)
1551#define BD_ENET_RX_SH ((ushort)0x0008)
1552#define BD_ENET_RX_CR ((ushort)0x0004)
1553#define BD_ENET_RX_OV ((ushort)0x0002)
1554#define BD_ENET_RX_CL ((ushort)0x0001)
1555#define BD_ENET_RX_STATS ((ushort)0x013f) /* All status bits */
1556
1557/* Buffer descriptor control/status used by Ethernet transmit.
1558*/
1559#define BD_ENET_TX_READY ((ushort)0x8000)
1560#define BD_ENET_TX_PAD ((ushort)0x4000)
1561#define BD_ENET_TX_WRAP ((ushort)0x2000)
1562#define BD_ENET_TX_INTR ((ushort)0x1000)
1563#define BD_ENET_TX_LAST ((ushort)0x0800)
1564#define BD_ENET_TX_TC ((ushort)0x0400)
1565#define BD_ENET_TX_DEF ((ushort)0x0200)
1566#define BD_ENET_TX_HB ((ushort)0x0100)
1567#define BD_ENET_TX_LC ((ushort)0x0080)
1568#define BD_ENET_TX_RL ((ushort)0x0040)
1569#define BD_ENET_TX_RCMASK ((ushort)0x003c)
1570#define BD_ENET_TX_UN ((ushort)0x0002)
1571#define BD_ENET_TX_CSL ((ushort)0x0001)
1572#define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */
1573
1574/* SCC as UART
1575*/
1576typedef struct scc_uart {
1577 sccp_t scc_genscc;
1578 uint scc_res1; /* Reserved */
1579 uint scc_res2; /* Reserved */
1580 ushort scc_maxidl; /* Maximum idle chars */
1581 ushort scc_idlc; /* temp idle counter */
1582 ushort scc_brkcr; /* Break count register */
1583 ushort scc_parec; /* receive parity error counter */
1584 ushort scc_frmec; /* receive framing error counter */
1585 ushort scc_nosec; /* receive noise counter */
1586 ushort scc_brkec; /* receive break condition counter */
1587 ushort scc_brkln; /* last received break length */
1588 ushort scc_uaddr1; /* UART address character 1 */
1589 ushort scc_uaddr2; /* UART address character 2 */
1590 ushort scc_rtemp; /* Temp storage */
1591 ushort scc_toseq; /* Transmit out of sequence char */
1592 ushort scc_char1; /* control character 1 */
1593 ushort scc_char2; /* control character 2 */
1594 ushort scc_char3; /* control character 3 */
1595 ushort scc_char4; /* control character 4 */
1596 ushort scc_char5; /* control character 5 */
1597 ushort scc_char6; /* control character 6 */
1598 ushort scc_char7; /* control character 7 */
1599 ushort scc_char8; /* control character 8 */
1600 ushort scc_rccm; /* receive control character mask */
1601 ushort scc_rccr; /* receive control character register */
1602 ushort scc_rlbc; /* receive last break character */
1603} scc_uart_t;
1604
1605/* SCC Event and Mask registers when it is used as a UART.
1606*/
1607#define UART_SCCM_GLR ((ushort)0x1000)
1608#define UART_SCCM_GLT ((ushort)0x0800)
1609#define UART_SCCM_AB ((ushort)0x0200)
1610#define UART_SCCM_IDL ((ushort)0x0100)
1611#define UART_SCCM_GRA ((ushort)0x0080)
1612#define UART_SCCM_BRKE ((ushort)0x0040)
1613#define UART_SCCM_BRKS ((ushort)0x0020)
1614#define UART_SCCM_CCR ((ushort)0x0008)
1615#define UART_SCCM_BSY ((ushort)0x0004)
1616#define UART_SCCM_TX ((ushort)0x0002)
1617#define UART_SCCM_RX ((ushort)0x0001)
1618
1619/* The SCC PSMR when used as a UART.
1620*/
1621#define SCU_PSMR_FLC ((ushort)0x8000)
1622#define SCU_PSMR_SL ((ushort)0x4000)
1623#define SCU_PSMR_CL ((ushort)0x3000)
1624#define SCU_PSMR_UM ((ushort)0x0c00)
1625#define SCU_PSMR_FRZ ((ushort)0x0200)
1626#define SCU_PSMR_RZS ((ushort)0x0100)
1627#define SCU_PSMR_SYN ((ushort)0x0080)
1628#define SCU_PSMR_DRT ((ushort)0x0040)
1629#define SCU_PSMR_PEN ((ushort)0x0010)
1630#define SCU_PSMR_RPM ((ushort)0x000c)
1631#define SCU_PSMR_REVP ((ushort)0x0008)
1632#define SCU_PSMR_TPM ((ushort)0x0003)
1633#define SCU_PSMR_TEVP ((ushort)0x0003)
1634
1635/* CPM Transparent mode SCC.
1636 */
1637typedef struct scc_trans {
1638 sccp_t st_genscc;
1639 uint st_cpres; /* Preset CRC */
1640 uint st_cmask; /* Constant mask for CRC */
1641} scc_trans_t;
1642
1643#define BD_SCC_TX_LAST ((ushort)0x0800)
1644
1645/* IIC parameter RAM.
1646*/
1647typedef struct iic {
1648 ushort iic_rbase; /* Rx Buffer descriptor base address */
1649 ushort iic_tbase; /* Tx Buffer descriptor base address */
1650 u_char iic_rfcr; /* Rx function code */
1651 u_char iic_tfcr; /* Tx function code */
1652 ushort iic_mrblr; /* Max receive buffer length */
1653 uint iic_rstate; /* Internal */
1654 uint iic_rdp; /* Internal */
1655 ushort iic_rbptr; /* Internal */
1656 ushort iic_rbc; /* Internal */
1657 uint iic_rxtmp; /* Internal */
1658 uint iic_tstate; /* Internal */
1659 uint iic_tdp; /* Internal */
1660 ushort iic_tbptr; /* Internal */
1661 ushort iic_tbc; /* Internal */
1662 uint iic_txtmp; /* Internal */
1663 uint iic_res; /* reserved */
1664 ushort iic_rpbase; /* Relocation pointer */
1665 ushort iic_res2; /* reserved */
1666} iic_t;
1667
1668/* SPI parameter RAM.
1669*/
1670typedef struct spi {
1671 ushort spi_rbase; /* Rx Buffer descriptor base address */
1672 ushort spi_tbase; /* Tx Buffer descriptor base address */
1673 u_char spi_rfcr; /* Rx function code */
1674 u_char spi_tfcr; /* Tx function code */
1675 ushort spi_mrblr; /* Max receive buffer length */
1676 uint spi_rstate; /* Internal */
1677 uint spi_rdp; /* Internal */
1678 ushort spi_rbptr; /* Internal */
1679 ushort spi_rbc; /* Internal */
1680 uint spi_rxtmp; /* Internal */
1681 uint spi_tstate; /* Internal */
1682 uint spi_tdp; /* Internal */
1683 ushort spi_tbptr; /* Internal */
1684 ushort spi_tbc; /* Internal */
1685 uint spi_txtmp; /* Internal */
1686 uint spi_res;
1687 ushort spi_rpbase; /* Relocation pointer */
1688 ushort spi_res2;
1689} spi_t;
1690
1691/* SPI Mode register.
1692*/
1693#define SPMODE_LOOP ((ushort)0x4000) /* Loopback */
1694#define SPMODE_CI ((ushort)0x2000) /* Clock Invert */
1695#define SPMODE_CP ((ushort)0x1000) /* Clock Phase */
1696#define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */
1697#define SPMODE_REV ((ushort)0x0400) /* Reversed Data */
1698#define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */
1699#define SPMODE_EN ((ushort)0x0100) /* Enable */
1700#define SPMODE_LENMSK ((ushort)0x00f0) /* character length */
1701#define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */
1702
1703#define SPMODE_LEN(x) ((((x)-1)&0xF)<<4)
1704#define SPMODE_PM(x) ((x) &0xF)
1705
1706/* HDLC parameter RAM.
1707*/
1708
1709typedef struct hdlc_pram_s {
1710 /*
1711 * SCC parameter RAM
1712 */
1713 ushort rbase; /* Rx Buffer descriptor base address */
1714 ushort tbase; /* Tx Buffer descriptor base address */
1715 uchar rfcr; /* Rx function code */
1716 uchar tfcr; /* Tx function code */
1717 ushort mrblr; /* Rx buffer length */
1718 ulong rstate; /* Rx internal state */
1719 ulong rptr; /* Rx internal data pointer */
1720 ushort rbptr; /* rb BD Pointer */
1721 ushort rcount; /* Rx internal byte count */
1722 ulong rtemp; /* Rx temp */
1723 ulong tstate; /* Tx internal state */
1724 ulong tptr; /* Tx internal data pointer */
1725 ushort tbptr; /* Tx BD pointer */
1726 ushort tcount; /* Tx byte count */
1727 ulong ttemp; /* Tx temp */
1728 ulong rcrc; /* temp receive CRC */
1729 ulong tcrc; /* temp transmit CRC */
1730 /*
1731 * HDLC specific parameter RAM
1732 */
1733 uchar res[4]; /* reserved */
1734 ulong c_mask; /* CRC constant */
1735 ulong c_pres; /* CRC preset */
1736 ushort disfc; /* discarded frame counter */
1737 ushort crcec; /* CRC error counter */
1738 ushort abtsc; /* abort sequence counter */
1739 ushort nmarc; /* nonmatching address rx cnt */
1740 ushort retrc; /* frame retransmission cnt */
1741 ushort mflr; /* maximum frame length reg */
1742 ushort max_cnt; /* maximum length counter */
1743 ushort rfthr; /* received frames threshold */
1744 ushort rfcnt; /* received frames count */
1745 ushort hmask; /* user defined frm addr mask */
1746 ushort haddr1; /* user defined frm address 1 */
1747 ushort haddr2; /* user defined frm address 2 */
1748 ushort haddr3; /* user defined frm address 3 */
1749 ushort haddr4; /* user defined frm address 4 */
1750 ushort tmp; /* temp */
1751 ushort tmp_mb; /* temp */
1752} hdlc_pram_t;
1753
1754/* CPM interrupts. There are nearly 32 interrupts generated by CPM
1755 * channels or devices. All of these are presented to the PPC core
1756 * as a single interrupt. The CPM interrupt handler dispatches its
1757 * own handlers, in a similar fashion to the PPC core handler. We
1758 * use the table as defined in the manuals (i.e. no special high
1759 * priority and SCC1 == SCCa, etc...).
1760 */
1761#define CPMVEC_NR 32
wdenk7c7a23b2002-12-07 00:20:59 +00001762#define CPMVEC_OFFSET 0x00010000
1763#define CPMVEC_PIO_PC15 ((ushort)0x1f | CPMVEC_OFFSET)
1764#define CPMVEC_SCC1 ((ushort)0x1e | CPMVEC_OFFSET)
1765#define CPMVEC_SCC2 ((ushort)0x1d | CPMVEC_OFFSET)
1766#define CPMVEC_SCC3 ((ushort)0x1c | CPMVEC_OFFSET)
1767#define CPMVEC_SCC4 ((ushort)0x1b | CPMVEC_OFFSET)
1768#define CPMVEC_PIO_PC14 ((ushort)0x1a | CPMVEC_OFFSET)
1769#define CPMVEC_TIMER1 ((ushort)0x19 | CPMVEC_OFFSET)
1770#define CPMVEC_PIO_PC13 ((ushort)0x18 | CPMVEC_OFFSET)
1771#define CPMVEC_PIO_PC12 ((ushort)0x17 | CPMVEC_OFFSET)
1772#define CPMVEC_SDMA_CB_ERR ((ushort)0x16 | CPMVEC_OFFSET)
1773#define CPMVEC_IDMA1 ((ushort)0x15 | CPMVEC_OFFSET)
1774#define CPMVEC_IDMA2 ((ushort)0x14 | CPMVEC_OFFSET)
1775#define CPMVEC_TIMER2 ((ushort)0x12 | CPMVEC_OFFSET)
1776#define CPMVEC_RISCTIMER ((ushort)0x11 | CPMVEC_OFFSET)
1777#define CPMVEC_I2C ((ushort)0x10 | CPMVEC_OFFSET)
1778#define CPMVEC_PIO_PC11 ((ushort)0x0f | CPMVEC_OFFSET)
1779#define CPMVEC_PIO_PC10 ((ushort)0x0e | CPMVEC_OFFSET)
1780#define CPMVEC_TIMER3 ((ushort)0x0c | CPMVEC_OFFSET)
1781#define CPMVEC_PIO_PC9 ((ushort)0x0b | CPMVEC_OFFSET)
1782#define CPMVEC_PIO_PC8 ((ushort)0x0a | CPMVEC_OFFSET)
1783#define CPMVEC_PIO_PC7 ((ushort)0x09 | CPMVEC_OFFSET)
1784#define CPMVEC_TIMER4 ((ushort)0x07 | CPMVEC_OFFSET)
1785#define CPMVEC_PIO_PC6 ((ushort)0x06 | CPMVEC_OFFSET)
1786#define CPMVEC_SPI ((ushort)0x05 | CPMVEC_OFFSET)
1787#define CPMVEC_SMC1 ((ushort)0x04 | CPMVEC_OFFSET)
1788#define CPMVEC_SMC2 ((ushort)0x03 | CPMVEC_OFFSET)
1789#define CPMVEC_PIO_PC5 ((ushort)0x02 | CPMVEC_OFFSET)
1790#define CPMVEC_PIO_PC4 ((ushort)0x01 | CPMVEC_OFFSET)
1791#define CPMVEC_ERROR ((ushort)0x00 | CPMVEC_OFFSET)
wdenkfe8c2802002-11-03 00:38:21 +00001792
1793extern void irq_install_handler(int vec, void (*handler)(void *), void *dev_id);
1794
1795/* CPM interrupt configuration vector.
1796*/
1797#define CICR_SCD_SCC4 ((uint)0x00c00000) /* SCC4 @ SCCd */
1798#define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */
1799#define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */
1800#define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */
1801#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */
1802#define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */
1803#define CICR_IEN ((uint)0x00000080) /* Int. enable */
1804#define CICR_SPS ((uint)0x00000001) /* SCC Spread */
1805#endif /* __CPM_8XX__ */