RTEMS  5.1
wd80x3.h
Go to the documentation of this file.
1 
9 /*
10  * Information about the DP8390 Ethernet controller.
11  */
12 
13 #ifndef __BSP_WD80x3_h
14 #define __BSP_WD80x3_h
15 
16 /* Register descriptions */
17 /* Controller DP8390. */
18 
19 #define DATAPORT 0x10 /* Port Window. */
20 #define RESET 0x1f /* Issue a read for reset */
21 #define W83CREG 0x00 /* I/O port definition */
22 #define ADDROM 0x08
23 
24 /* page 0 read or read/write registers */
25 
26 #define CMDR 0x00+RO
27 #define CLDA0 0x01+RO /* current local dma addr 0 for read */
28 #define CLDA1 0x02+RO /* current local dma addr 1 for read */
29 #define BNRY 0x03+RO /* boundary reg for rd and wr */
30 #define TSR 0x04+RO /* tx status reg for rd */
31 #define NCR 0x05+RO /* number of collision reg for rd */
32 #define FIFO 0x06+RO /* FIFO for rd */
33 #define ISR 0x07+RO /* interrupt status reg for rd and wr */
34 #define CRDA0 0x08+RO /* current remote dma address 0 for rd */
35 #define CRDA1 0x09+RO /* current remote dma address 1 for rd */
36 #define RSR 0x0C+RO /* rx status reg for rd */
37 #define CNTR0 0x0D+RO /* tally cnt 0 for frm alg err for rd */
38 #define CNTR1 RO+0x0E /* tally cnt 1 for crc err for rd */
39 #define CNTR2 0x0F+RO /* tally cnt 2 for missed pkt for rd */
40 
41 /* page 0 write registers */
42 
43 #define PSTART 0x01+RO /* page start register */
44 #define PSTOP 0x02+RO /* page stop register */
45 #define TPSR 0x04+RO /* tx start page start reg */
46 #define TBCR0 0x05+RO /* tx byte count 0 reg */
47 #define TBCR1 0x06+RO /* tx byte count 1 reg */
48 #define RSAR0 0x08+RO /* remote start address reg 0 */
49 #define RSAR1 0x09+RO /* remote start address reg 1 */
50 #define RBCR0 0x0A+RO /* remote byte count reg 0 */
51 #define RBCR1 0x0B+RO /* remote byte count reg 1 */
52 #define RCR 0x0C+RO /* rx configuration reg */
53 #define TCR 0x0D+RO /* tx configuration reg */
54 #define DCR RO+0x0E /* data configuration reg */
55 #define IMR 0x0F+RO /* interrupt mask reg */
56 
57 /* page 1 registers */
58 
59 #define PAR 0x01+RO /* physical addr reg base for rd and wr */
60 #define CURR 0x07+RO /* current page reg for rd and wr */
61 #define MAR 0x08+RO /* multicast addr reg base fro rd and WR */
62 #define MARsize 8 /* size of multicast addr space */
63 
64 /*-----W83CREG command bits-----*/
65 #define MSK_RESET 0x80 /* W83CREG masks */
66 #define MSK_ENASH 0x40
67 #define MSK_DECOD 0x3F /* memory decode bits, corresponding */
68  /* to SA 18-13. SA 19 assumed to be 1 */
69 
70 /*-----CMDR command bits-----*/
71 #define MSK_STP 0x01 /* stop the chip */
72 #define MSK_STA 0x02 /* start the chip */
73 #define MSK_TXP 0x04 /* initial txing of a frm */
74 #define MSK_RRE 0x08 /* remote read */
75 #define MSK_RWR 0x10 /* remote write */
76 #define MSK_RD2 0x20 /* no DMA used */
77 #define MSK_PG0 0x00 /* select register page 0 */
78 #define MSK_PG1 0x40 /* select register page 1 */
79 #define MSK_PG2 0x80 /* select register page 2 */
80 
81 /*-----ISR and TSR status bits-----*/
82 #define MSK_PRX 0x01 /* rx with no error */
83 #define MSK_PTX 0x02 /* tx with no error */
84 #define MSK_RXE 0x04 /* rx with error */
85 #define MSK_TXE 0x08 /* tx with error */
86 #define MSK_OVW 0x10 /* overwrite warning */
87 #define MSK_CNT 0x20 /* MSB of one of the tally counters is set */
88 #define MSK_RDC 0x40 /* remote dma completed */
89 #define MSK_RST 0x80 /* reset state indicator */
90 
91 /*-----DCR command bits-----*/
92 #define MSK_WTS 0x01 /* word transfer mode selection */
93 #define MSK_BOS 0x02 /* byte order selection */
94 #define MSK_LAS 0x04 /* long addr selection */
95 #define MSK_BMS 0x08 /* burst mode selection */
96 #define MSK_ARM 0x10 /* autoinitialize remote */
97 #define MSK_FT00 0x00 /* burst lrngth selection */
98 #define MSK_FT01 0x20 /* burst lrngth selection */
99 #define MSK_FT10 0x40 /* burst lrngth selection */
100 #define MSK_FT11 0x60 /* burst lrngth selection */
101 
102 /*-----RCR command bits-----*/
103 #define MSK_SEP 0x01 /* save error pkts */
104 #define MSK_AR 0x02 /* accept runt pkt */
105 #define MSK_AB 0x04 /* 8390 RCR */
106 #define MSK_AM 0x08 /* accept multicast */
107 #define MSK_PRO 0x10 /* accept all pkt with physical adr */
108 #define MSK_MON 0x20 /* monitor mode */
109 
110 /*-----TCR command bits-----*/
111 #define MSK_CRC 0x01 /* inhibit CRC, do not append crc */
112 #define MSK_LOOP 0x02 /* set loopback mode */
113 #define MSK_BCST 0x04 /* Accept broadcasts */
114 #define MSK_LB01 0x06 /* encoded loopback control */
115 #define MSK_ATD 0x08 /* auto tx disable */
116 #define MSK_OFST 0x10 /* collision offset enable */
117 
118 /*-----receive status bits-----*/
119 #define SMK_PRX 0x01 /* rx without error */
120 #define SMK_CRC 0x02 /* CRC error */
121 #define SMK_FAE 0x04 /* frame alignment error */
122 #define SMK_FO 0x08 /* FIFO overrun */
123 #define SMK_MPA 0x10 /* missed pkt */
124 #define SMK_PHY 0x20 /* physical/multicase address */
125 #define SMK_DIS 0x40 /* receiver disable. set in monitor mode */
126 #define SMK_DEF 0x80 /* deferring */
127 
128 /*-----transmit status bits-----*/
129 #define SMK_PTX 0x01 /* tx without error */
130 #define SMK_DFR 0x02 /* non deferred tx */
131 #define SMK_COL 0x04 /* tx collided */
132 #define SMK_ABT 0x08 /* tx abort because of excessive collisions */
133 #define SMK_CRS 0x10 /* carrier sense lost */
134 #define SMK_FU 0x20 /* FIFO underrun */
135 #define SMK_CDH 0x40 /* collision detect heartbeat */
136 #define SMK_OWC 0x80 /* out of window collision */
137 
138 #endif
139 /* end of include */