1 #ifndef _DEV_RTLREGS_H_
2 #define _DEV_RTLREGS_H_
119 #define NIC_IOPORT 0x10
120 #define NIC_RESET 0x1f
125 #define NIC_PG0_CLDA0 0x01
126 #define NIC_PG0_PSTART 0x01
127 #define NIC_PG0_CLDA1 0x02
128 #define NIC_PG0_PSTOP 0x02
129 #define NIC_PG0_BNRY 0x03
130 #define NIC_PG0_TSR 0x04
131 #define NIC_PG0_TPSR 0x04
132 #define NIC_PG0_NCR 0x05
133 #define NIC_PG0_TBCR0 0x05
134 #define NIC_PG0_FIFO 0x06
135 #define NIC_PG0_TBCR1 0x06
136 #define NIC_PG0_ISR 0x07
137 #define NIC_PG0_CRDA0 0x08
138 #define NIC_PG0_RSAR0 0x08
140 #define NIC_PG0_CRDA1 0x09
141 #define NIC_PG0_RSAR1 0x09
143 #define NIC_PG0_RBCR0 0x0a
146 #define NIC_PG0_RBCR1 0x0b
149 #define NIC_PG0_RSR 0x0c
150 #define NIC_PG0_RCR 0x0c
151 #define NIC_PG0_CNTR0 0x0d
152 #define NIC_PG0_TCR 0x0d
153 #define NIC_PG0_CNTR1 0x0e
154 #define NIC_PG0_DCR 0x0e
155 #define NIC_PG0_CNTR2 0x0f
156 #define NIC_PG0_IMR 0x0f
161 #define NIC_PG1_PAR0 0x01
162 #define NIC_PG1_PAR1 0x02
163 #define NIC_PG1_PAR2 0x03
164 #define NIC_PG1_PAR3 0x04
165 #define NIC_PG1_PAR4 0x05
166 #define NIC_PG1_PAR5 0x06
167 #define NIC_PG1_CURR 0x07
170 #define NIC_PG1_MAR0 0x08
171 #define NIC_PG1_MAR1 0x09
172 #define NIC_PG1_MAR2 0x0a
173 #define NIC_PG1_MAR3 0x0b
174 #define NIC_PG1_MAR4 0x0c
175 #define NIC_PG1_MAR5 0x0d
176 #define NIC_PG1_MAR6 0x0e
177 #define NIC_PG1_MAR7 0x0f
182 #define NIC_PG2_PSTART 0x01
183 #define NIC_PG2_CLDA0 0x01
184 #define NIC_PG2_PSTOP 0x02
185 #define NIC_PG2_CLDA1 0x02
186 #define NIC_PG2_RNP 0x03
187 #define NIC_PG2_TSPR 0x04
188 #define NIC_PG2_LNP 0x05
189 #define NIC_PG2_ACU 0x06
190 #define NIC_PG2_ACL 0x07
191 #define NIC_PG2_RCR 0x0c
192 #define NIC_PG2_TCR 0x0d
193 #define NIC_PG2_DCR 0x0e
194 #define NIC_PG2_IMR 0x0f
199 #define NIC_PG3_EECR 0x01
200 #define NIC_PG3_BPAGE 0x02
201 #define NIC_PG3_CONFIG0 0x03
202 #define NIC_PG3_CONFIG1 0x04
203 #define NIC_PG3_CONFIG2 0x05
204 #define NIC_PG3_CONFIG3 0x06
205 #define NIC_PG3_CSNSAV 0x08
206 #define NIC_PG3_HLTCLK 0x09
207 #define NIC_PG3_INTR 0x0b
212 #define NIC_CR_STP 0x01
213 #define NIC_CR_STA 0x02
214 #define NIC_CR_TXP 0x04
215 #define NIC_CR_RD0 0x08
216 #define NIC_CR_RD1 0x10
217 #define NIC_CR_RD2 0x20
218 #define NIC_CR_PS0 0x40
219 #define NIC_CR_PS1 0x80
224 #define NIC_ISR_PRX 0x01
225 #define NIC_ISR_PTX 0x02
226 #define NIC_ISR_RXE 0x04
227 #define NIC_ISR_TXE 0x08
228 #define NIC_ISR_OVW 0x10
229 #define NIC_ISR_CNT 0x20
230 #define NIC_ISR_RDC 0x40
231 #define NIC_ISR_RST 0x80
236 #define NIC_IMR_PRXE 0x01
237 #define NIC_IMR_PTXE 0x02
238 #define NIC_IMR_RXEE 0x04
239 #define NIC_IMR_TXEE 0x08
240 #define NIC_IMR_OVWE 0x10
241 #define NIC_IMR_CNTE 0x20
242 #define NIC_IMR_RCDE 0x40
247 #define NIC_DCR_WTS 0x01
248 #define NIC_DCR_BOS 0x02
249 #define NIC_DCR_LAS 0x04
250 #define NIC_DCR_LS 0x08
251 #define NIC_DCR_AR 0x10
252 #define NIC_DCR_FT0 0x20
253 #define NIC_DCR_FT1 0x40
258 #define NIC_TCR_CRC 0x01
259 #define NIC_TCR_LB0 0x02
260 #define NIC_TCR_LB1 0x04
261 #define NIC_TCR_ATD 0x08
262 #define NIC_TCR_OFST 0x10
267 #define NIC_TSR_PTX 0x01
268 #define NIC_TSR_COL 0x04
269 #define NIC_TSR_ABT 0x08
270 #define NIC_TSR_CRS 0x10
271 #define NIC_TSR_FU 0x20
272 #define NIC_TSR_CDH 0x40
273 #define NIC_TSR_OWC 0x80
278 #define NIC_RCR_SEP 0x01
279 #define NIC_RCR_AR 0x02
280 #define NIC_RCR_AB 0x04
281 #define NIC_RCR_AM 0x08
282 #define NIC_RCR_PRO 0x10
283 #define NIC_RCR_MON 0x20
288 #define NIC_RSR_PRX 0x01
289 #define NIC_RSR_CRC 0x02
290 #define NIC_RSR_FAE 0x04
291 #define NIC_RSR_FO 0x08
292 #define NIC_RSR_MPA 0x10
293 #define NIC_RSR_PHY 0x20
294 #define NIC_RSR_DIS 0x40
295 #define NIC_RSR_DFR 0x80
300 #define NIC_EECR_EEM1 0x80
301 #define NIC_EECR_EEM0 0x40
306 #define NIC_EECR_EECS 0x08
307 #define NIC_EECR_EESK 0x04
308 #define NIC_EECR_EEDI 0x02
309 #define NIC_EECR_EEDO 0x01
314 #define NIC_CONFIG2_PL1 0x80
315 #define NIC_CONFIG2_PL0 0x40
320 #define NIC_CONFIG2_BSELB 0x20
321 #define NIC_CONFIG2_BS4 0x10
322 #define NIC_CONFIG2_BS3 0x08
323 #define NIC_CONFIG2_BS2 0x04
324 #define NIC_CONFIG2_BS1 0x02
325 #define NIC_CONFIG2_BS0 0x01
330 #define NIC_CONFIG3_PNP 0x80
331 #define NIC_CONFIG3_FUDUP 0x40
332 #define NIC_CONFIG3_LEDS1 0x20
335 #define NIC_CONFIG3_LEDS0 0x10
338 #define NIC_CONFIG3_SLEEP 0x04
339 #define NIC_CONFIG3_PWRDN 0x02
340 #define NIC_CONFIG3_ACTIVEB 0x01
347 #define nic_read(reg) *(base + (reg))
352 #define nic_write(reg, data) *(base + (reg)) = data