Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / networks / etherlink3 / etherlink3.h
blobef230c88d69934e5978c0d6faedf41e45d5ab771
1 /*
3 Copyright (C) 2002-2005 Neil Cafferkey
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA.
22 #ifndef ETHERLINK3_H
23 #define ETHERLINK3_H
26 /* General */
27 /* ======= */
29 #define EL3_WINDOWSIZE 16
30 #define EL3_PREAMBLESIZE 4
31 #define EL3_FRAGLEN 2
32 #define EL3_CORKSCREWOFFSET 992
35 /* Registers */
36 /* ========= */
38 /* All Windows */
40 #define EL3REG_COMMAND 14
41 #define EL3REG_STATUS 14
42 #define EL3REG_DOWNLIST 36
43 #define EL3REG_UPLIST 56
45 /* Window 0 */
47 #define EL3REG_MAKERID 0
48 #define EL3REG_PRODUCTID 2
49 #define EL3REG_ADAPTERID 2
50 #define EL3REG_CONFIG 4
51 #define EL3REG_ADDRCONFIG 6
52 #define EL3REG_RESCONFIG 8 /* also in window 3 */
53 #define EL3REG_EEPROMCMD 10 /* window 2 has alternative version */
54 #define EL3REG_EEPROMDATA 12
56 /* Window 1 */
58 #define EL3REG_DATA0 0
59 #define EL3REG_DATA1 2
60 #define EL3REG_RXERROR 4 /* also in window 7 */
61 #define EL3REG_RXSTATUS 8
62 #define EL3REG_TIMER 10
63 #define EL3REG_TXSTATUS 11
64 #define EL3REG_TXSPACE 12 /* also in window 3 */
66 /* Window 2 */
68 #define EL3REG_ADDRESS0 0
69 #define EL3REG_ADDRESS1 1
70 #define EL3REG_ADDRESS2 2
71 #define EL3REG_ADDRESS3 3
72 #define EL3REG_ADDRESS4 4
73 #define EL3REG_ADDRESS5 5
74 #define EL3REG_SRAMDIAG 6
75 #define EL3REG_MULTIFUNCCONFIG 8
76 #define EL3REG_ALTEEPROMCMD 10
77 #define EL3REG_MASK0 6
78 #define EL3REG_MASK1 7
79 #define EL3REG_MASK2 8
80 #define EL3REG_MASK3 9
81 #define EL3REG_MASK4 10
82 #define EL3REG_MASK5 11
83 #define EL3REG_RESETOPTIONS 12
85 /* Window 3 */
87 #define EL3REG_INTERNALCONFIG 0
88 #define EL3REG_ROMCONTROL 4
89 #define EL3REG_TXRECLAIM 6
90 #define EL3REG_MACCONTROL 6
91 #define EL3REG_MEDIAOPTIONS 8 /* formerly EL3REG_RESETOPTIONS */
92 #define EL3REG_RXSPACE 10
94 /* Window 4 */
96 #define EL3REG_FIFODIAG 4
97 #define EL3REG_NETDIAG 6
98 #define EL3REG_CONTROLLERSTATUS 8
99 #define EL3REG_PHYMGMT 8
100 #define EL3REG_MEDIA 10
101 #define EL3REG_BADSSD 12
102 #define EL3REG_BYTESOKUPPER 13
104 /* Window 5 */
106 #define EL3REG_TXSTARTTHRESH 0
107 #define EL3REG_TXAVAILTHRESH 2
108 #define EL3REG_RXEARLYTHRESH 6
109 #define EL3REG_RXFILTER 8
110 #define EL3REG_INTMASK 10
111 #define EL3REG_READZEROMASK 12
113 /* Window 6 */
115 #define EL3REG_CARRIERLOST 0
116 #define EL3REG_SQEERRORS 1
117 #define EL3REG_MULTIPLECOLLISIONS 2
118 #define EL3REG_SINGLECOLLISIONS 3
119 #define EL3REG_LATECOLLISIONS 4
120 #define EL3REG_RXOVERRUNS 5
121 #define EL3REG_TXFRAMESOK 6
122 #define EL3REG_RXFRAMESOK 7
123 #define EL3REG_FRAMESDEFERRED 8
124 #define EL3REG_FRAMESOKUPPER 9
125 #define EL3REG_RXBYTESOK 10
126 #define EL3REG_TXBYTESOK 12
129 /* (Some) EEPROM data offsets */
130 /* ========================== */
132 #define EL3ROM_ADDRESS0 0
133 #define EL3ROM_ADDRESS1 1
134 #define EL3ROM_ADDRESS2 2
135 #define EL3ROM_PRODUCTID 3
136 #define EL3ROM_MANFDATA0 4
137 #define EL3ROM_MANFDATA1 5
138 #define EL3ROM_MANFDATA2 6
139 #define EL3ROM_MAKERID 7
140 #define EL3ROM_ADDRCONFIG 8
141 #define EL3ROM_RESCONFIG 9
142 #define EL3ROM_ALTADDRESS0 10
143 #define EL3ROM_ALTADDRESS1 11
144 #define EL3ROM_ALTADDRESS2 12
145 #define EL3ROM_SOFTWAREINFO 13
146 #define EL3ROM_COMPATIBILITY 14
147 /*#define EL3ROM_CHECKSUM 15*/ /* PCMCIA? */
148 #define EL3ROM_SOFTWAREINFO2 15
149 #define EL3ROM_CAPABILITIES 16
150 #define EL3ROM_CHECKSUM 23
153 /* EEPROM commands */
154 /* =============== */
156 #define EL3ECMD_WRITEDISABLE (0x0 << 4)
157 #define EL3ECMD_WRITEALL (0x1 << 4)
158 #define EL3ECMD_ERASEALL (0x2 << 4)
159 #define EL3ECMD_WRITEENABLE (0x3 << 4)
160 #define EL3ECMD_WRITE (0x4 << 4)
161 #define EL3ECMD_READ (0x8 << 4)
162 #define EL3ECMD_ERASE (0xc << 4)
165 /* Commands */
166 /* ======== */
168 #define EL3CMD_GLOBALRESET (0 << 11)
169 #define EL3CMD_SELECTWINDOW (1 << 11)
170 #define EL3CMD_STARTCOAX (2 << 11)
171 #define EL3CMD_RXDISABLE (3 << 11)
172 #define EL3CMD_RXENABLE (4 << 11)
173 #define EL3CMD_RXRESET (5 << 11)
174 #define EL3CMD_UPSTALL (6 << 11)
175 #define EL3CMD_UPUNSTALL (EL3CMD_UPSTALL + 1)
176 #define EL3CMD_DOWNSTALL (EL3CMD_UPSTALL + 2)
177 #define EL3CMD_DOWNUNSTALL (EL3CMD_UPSTALL + 3)
178 #define EL3CMD_RXDISCARD (8 << 11)
179 #define EL3CMD_TXENABLE (9 << 11)
180 #define EL3CMD_TXDISABLE (10 << 11)
181 #define EL3CMD_TXRESET (11 << 11)
182 #define EL3CMD_REQINT (12 << 11)
183 #define EL3CMD_ACKINT (13 << 11)
184 #define EL3CMD_SETINTMASK (14 << 11)
185 #define EL3CMD_SETZEROMASK (15 << 11)
186 #define EL3CMD_SETRXFILTER (16 << 11)
187 #define EL3CMD_SETRXTHRESH (17 << 11)
188 #define EL3CMD_SETTXTHRESH (18 << 11)
189 #define EL3CMD_SETTXSTART (19 << 11)
190 #define EL3CMD_STATSENABLE (21 << 11)
191 #define EL3CMD_STATSDISABLE (22 << 11)
192 #define EL3CMD_STOPCOAX (23 << 11)
193 #define EL3CMD_POWERUP (27 << 11)
194 #define EL3CMD_POWERDOWN (28 << 11)
195 #define EL3CMD_POWERAUTO (29 << 11)
198 /* Interrupt Types */
199 /* =============== */
201 #define EL3INTB_UPDONE 10
202 #define EL3INTB_DOWNDONE 9
203 #define EL3INTB_LINKEVENT 8
204 #define EL3INTB_UPDATESTATS 7
205 #define EL3INTB_REQINT 6
206 #define EL3INTB_RXEARLY 5
207 #define EL3INTB_RXCOMPLETE 4
208 #define EL3INTB_TXAVAIL 3
209 #define EL3INTB_TXCOMPLETE 2
210 #define EL3INTB_FAILURE 1
211 #define EL3INTB_ANY 0
213 #define EL3INTF_UPDONE (1 << EL3INTB_UPDONE)
214 #define EL3INTF_DOWNDONE (1 << EL3INTB_DOWNDONE)
215 #define EL3INTF_UPDATESTATS (1 << EL3INTB_UPDATESTATS)
216 #define EL3INTF_REQINT (1 << EL3INTB_REQINT)
217 #define EL3INTF_RXEARLY (1 << EL3INTB_RXEARLY)
218 #define EL3INTF_RXCOMPLETE (1 << EL3INTB_RXCOMPLETE)
219 #define EL3INTF_TXAVAIL (1 << EL3INTB_TXAVAIL)
220 #define EL3INTF_TXCOMPLETE (1 << EL3INTB_TXCOMPLETE)
221 #define EL3INTF_FAILURE (1 << EL3INTB_FAILURE)
222 #define EL3INTF_ANY (1 << EL3INTB_ANY)
225 /* Transceiver Types */
226 /* ================= */
228 #define EL3XCVR_10BASET 0
229 #define EL3XCVR_AUI 1
230 #define EL3XCVR_10BASE2 3
231 #define EL3XCVR_100BASETX 4
232 #define EL3XCVR_100BASEFX 5
233 #define EL3XCVR_MII 6
234 #define EL3XCVR_AUTONEG 8
237 /* Register Details */
238 /* ================ */
240 /* Configuration Control Register */
242 #define EL3REG_CONFIGB_NOTPCCARD 14
243 #define EL3REG_CONFIGB_AUI 13
244 #define EL3REG_CONFIGB_10BASE2 12
245 #define EL3REG_CONFIGB_10BASET 9
246 #define EL3REG_CONFIGB_USEINTERNAL 8
247 #define EL3REG_CONFIGB_RESET 2
248 #define EL3REG_CONFIGB_ENABLE 0
250 #define EL3REG_CONFIGF_NOTPCCARD (1 << EL3REG_CONFIGB_NOTPCCARD)
251 #define EL3REG_CONFIGF_AUI (1 << EL3REG_CONFIGB_AUI)
252 #define EL3REG_CONFIGF_10BASE2 (1 << EL3REG_CONFIGB_10BASE2)
253 #define EL3REG_CONFIGF_10BASET (1 << EL3REG_CONFIGB_10BASET)
254 #define EL3REG_CONFIGF_USEINTERNAL (1 << EL3REG_CONFIGB_USEINTERNAL)
255 #define EL3REG_CONFIGF_RESET (1 << EL3REG_CONFIGB_RESET)
256 #define EL3REG_CONFIGF_ENABLE (1 << EL3REG_CONFIGB_ENABLE)
258 /* Address Configuration Register */
260 #define EL3REG_ADDRCONFIGB_XCVR 14
261 #define EL3REG_ADDRCONFIGB_AUTOSELECT 7
263 #define EL3REG_ADDRCONFIGF_AUTOSELECT (1 << EL3REG_ADDRCONFIGB_AUTOSELECT)
264 #define EL3REG_ADDRCONFIGF_XCVR 0xc000
266 /* Status Register */
268 #define EL3REG_STATUSB_WINDOW 13
269 #define EL3REG_STATUSB_CMDINPROGRESS 12
271 #define EL3REG_STATUSF_WINDOW 0xe0
272 #define EL3REG_STATUSF_CMDINPROGRESS (1 << EL3REG_STATUSB_CMDINPROGRESS)
274 /* EEPROM Command Register */
276 #define EL3REG_EEPROMCMDB_BUSY 15
278 #define EL3REG_EEPROMCMDF_BUSY (1 << EL3REG_EEPROMCMDB_BUSY)
280 /* RX Status Register */
282 #define EL3REG_RXSTATUSB_INCOMPLETE 15
283 #define EL3REG_RXSTATUSB_ERROR 14
285 #define EL3REG_RXSTATUSF_INCOMPLETE (1 << EL3REG_RXSTATUSB_INCOMPLETE)
286 #define EL3REG_RXSTATUSF_ERROR (1 << EL3REG_RXSTATUSB_ERROR)
288 #define EL3REG_RXSTATUS_ERRORMASK 0x3800
289 #define EL3REG_RXSTATUS_SIZEMASK 0x07ff
291 /* TX Status Register */
293 #define EL3REG_TXSTATUSB_COMPLETE 7
294 #define EL3REG_TXSTATUSB_ONSUCCESS 6
295 #define EL3REG_TXSTATUSB_JABBER 5
296 #define EL3REG_TXSTATUSB_UNDERRUN 4
297 #define EL3REG_TXSTATUSB_MAXCOLLISIONS 3
298 #define EL3REG_TXSTATUSB_OVERFLOW 2
299 #define EL3REG_TXSTATUSB_RECLAIMERROR 1
301 #define EL3REG_TXSTATUSF_COMPLETE (1 << EL3REG_TXSTATUSB_COMPLETE)
302 #define EL3REG_TXSTATUSF_ONSUCCESS (1 << EL3REG_TXSTATUSB_ONSUCCESS)
303 #define EL3REG_TXSTATUSF_JABBER (1 << EL3REG_TXSTATUSB_JABBER)
304 #define EL3REG_TXSTATUSF_UNDERRUN (1 << EL3REG_TXSTATUSB_UNDERRUN)
305 #define EL3REG_TXSTATUSF_MAXCOLLISIONS (1 << EL3REG_TXSTATUSB_MAXCOLLISIONS)
306 #define EL3REG_TXSTATUSF_OVERFLOW (1 << EL3REG_TXSTATUSB_OVERFLOW)
307 #define EL3REG_TXSTATUSF_RECLAIMERROR (1 << EL3REG_TXSTATUSB_RECLAIMERROR)
309 /* Internal Config Register */
311 #define EL3REG_INTERNALCONFIGB_AUTOXCVR 24
312 #define EL3REG_INTERNALCONFIGB_XCVR 20
313 #define EL3REG_INTERNALCONFIGB_RAMSPLIT 16
314 #define EL3REG_INTERNALCONFIGB_SSDOFF 8
315 #define EL3REG_INTERNALCONFIGB_ROMSIZE 6
316 #define EL3REG_INTERNALCONFIGB_RAMSPEED 4
317 #define EL3REG_INTERNALCONFIGB_RAMWIDTH 3
318 #define EL3REG_INTERNALCONFIGB_RAMSIZE 0
320 #define EL3REG_INTERNALCONFIGF_AUTOXCVR (1 << EL3REG_INTERNALCONFIGB_AUTOXCVR)
321 #define EL3REG_INTERNALCONFIGF_XCVR 0x00f00000
323 /* MAC Control Register */
325 #define EL3REG_MACCONTROLB_FULLDUPLEX 5
327 #define EL3REG_MACCONTROLF_FULLDUPLEX (1 << EL3REG_MACCONTROLB_FULLDUPLEX)
329 /* Media Options Register (formerly Reset Options Register) */
331 #define EL3REG_MEDIAOPTIONSB_MII 6
332 #define EL3REG_MEDIAOPTIONSB_AUI 5
333 #define EL3REG_MEDIAOPTIONSB_10BASE2 4
334 #define EL3REG_MEDIAOPTIONSB_10BASET 3
335 #define EL3REG_MEDIAOPTIONSB_100BASEFX 2
336 #define EL3REG_MEDIAOPTIONSB_100BASETX 1
337 #define EL3REG_MEDIAOPTIONSB_100BASET4 0
339 #define EL3REG_MEDIAOPTIONSF_MII (1 << EL3REG_MEDIAOPTIONSB_MII)
340 #define EL3REG_MEDIAOPTIONSF_AUI (1 << EL3REG_MEDIAOPTIONSB_AUI)
341 #define EL3REG_MEDIAOPTIONSF_10BASE2 (1 << EL3REG_MEDIAOPTIONSB_10BASE2)
342 #define EL3REG_MEDIAOPTIONSF_10BASET (1 << EL3REG_MEDIAOPTIONSB_10BASET)
343 #define EL3REG_MEDIAOPTIONSF_100BASEFX (1 << EL3REG_MEDIAOPTIONSB_100BASEFX)
344 #define EL3REG_MEDIAOPTIONSF_100BASETX (1 << EL3REG_MEDIAOPTIONSB_100BASETX)
345 #define EL3REG_MEDIAOPTIONSF_100BASET4 (1 << EL3REG_MEDIAOPTIONSB_100BASET4)
347 /* Net Diagnostic Port Register */
349 #define EL3REG_NETDIAGB_EXTERNALLOOP 15
350 #define EL3REG_NETDIAGB_ENDECLOOP 14
351 #define EL3REG_NETDIAGB_CONTROLLERLOOP 13
352 #define EL3REG_NETDIAGB_FIFOLOOP 12
353 #define EL3REG_NETDIAGB_TXON 11
354 #define EL3REG_NETDIAGB_RXON 10
355 #define EL3REG_NETDIAGB_TXING 9
356 #define EL3REG_NETDIAGB_NEEDTXRESET 8
357 #define EL3REG_NETDIAGB_STATSON 7
358 #define EL3REG_NETDIAGB_WIDESTATS 6
359 #define EL3REG_NETDIAGB_TESTLVD 0
361 #define EL3REG_NETDIAGF_EXTERNALLOOP (1 << EL3REG_NETDIAGB_EXTERNALLOOP)
362 #define EL3REG_NETDIAGF_ENDECLOOP (1 << EL3REG_NETDIAGB_ENDECLOOP)
363 #define EL3REG_NETDIAGF_CONTROLLERLOOP (1 << EL3REG_NETDIAGB_CONTROLLERLOOP)
364 #define EL3REG_NETDIAGF_FIFOLOOP (1 << EL3REG_NETDIAGB_FIFOLOOP)
365 #define EL3REG_NETDIAGF_TXON (1 << EL3REG_NETDIAGB_TXON)
366 #define EL3REG_NETDIAGF_RXON (1 << EL3REG_NETDIAGB_RXON)
367 #define EL3REG_NETDIAGF_TXING (1 << EL3REG_NETDIAGB_TXING)
368 #define EL3REG_NETDIAGF_NEEDTXRESET (1 << EL3REG_NETDIAGB_NEEDTXRESET)
369 #define EL3REG_NETDIAGF_STATSON (1 << EL3REG_NETDIAGB_STATSON)
370 #define EL3REG_NETDIAGF_WIDESTATS (1 << EL3REG_NETDIAGB_WIDESTATS)
371 #define EL3REG_NETDIAGF_TESTLVD (1 << EL3REG_NETDIAGB_TESTLVD)
373 #define EL3REG_NETDIAG_REVMASK 0x3e
375 /* Physical Management Register */
377 #define EL3REG_PHYMGMTB_NOCAT5LINKTEST 15
378 #define EL3REG_PHYMGMTB_WRITE 2
379 #define EL3REG_PHYMGMTB_DATA 1
380 #define EL3REG_PHYMGMTB_CLK 0
382 #define EL3REG_PHYMGMTF_NOCAT5LINKTEST (1 << EL3REG_PHYMGMTB_NOCAT5LINKTEST)
383 #define EL3REG_PHYMGMTF_WRITE (1 << EL3REG_PHYMGMTB_WRITE)
384 #define EL3REG_PHYMGMTF_DATA (1 << EL3REG_PHYMGMTB_DATA)
385 #define EL3REG_PHYMGMTF_CLK (1 << EL3REG_PHYMGMTB_CLK)
387 /* Media Type and Status Register */
389 #define EL3REG_MEDIAB_TP 15
390 #define EL3REG_MEDIAB_COAX 14
391 #define EL3REG_MEDIAB_SQE 12
392 #define EL3REG_MEDIAB_BEAT 11
393 #define EL3REG_MEDIAB_POLEREV 10
394 #define EL3REG_MEDIAB_JABBER 9
395 #define EL3REG_MEDIAB_UNSQUELCH 8
396 #define EL3REG_MEDIAB_BEATCHECK 7
397 #define EL3REG_MEDIAB_JABBERCHECK 6
398 #define EL3REG_MEDIAB_CRS 5
399 #define EL3REG_MEDIAB_COLLISION 4
400 #define EL3REG_MEDIAB_SQESTATSENABLE 3
401 #define EL3REG_MEDIAB_CRCSTRIPDISABLE 2
402 #define EL3REG_MEDIAB_LINKLIGHT 0
404 #define EL3REG_MEDIAF_TP (1 << EL3REG_MEDIAB_TP)
405 #define EL3REG_MEDIAF_COAX (1 << EL3REG_MEDIAB_COAX)
406 #define EL3REG_MEDIAF_SQE (1 << EL3REG_MEDIAB_SQE)
407 #define EL3REG_MEDIAF_BEAT (1 << EL3REG_MEDIAB_BEAT)
408 #define EL3REG_MEDIAF_POLEREV (1 << EL3REG_MEDIAB_POLEREV)
409 #define EL3REG_MEDIAF_JABBER (1 << EL3REG_MEDIAB_JABBER)
410 #define EL3REG_MEDIAF_UNSQUELCH (1 << EL3REG_MEDIAB_UNSQUELCH)
411 #define EL3REG_MEDIAF_BEATCHECK (1 << EL3REG_MEDIAB_BEATCHECK)
412 #define EL3REG_MEDIAF_JABBERCHECK (1 << EL3REG_MEDIAB_JABBERCHECK)
413 #define EL3REG_MEDIAF_CRS (1 << EL3REG_MEDIAB_CRS)
414 #define EL3REG_MEDIAF_COLLISION (1 << EL3REG_MEDIAB_COLLISION)
415 #define EL3REG_MEDIAF_SQESTATSENABLE (1 << EL3REG_MEDIAB_SQESTATSENABLE)
416 #define EL3REG_MEDIAF_CRCSTRIPDISABLE (1 << EL3REG_MEDIAB_CRCSTRIPDISABLE)
417 #define EL3REG_MEDIAF_LINKLIGHT (1 << EL3REG_MEDIAB_LINKLIGHT)
420 /* Command parameters */
421 /* ================== */
423 #define EL3CMD_RXRESETB_SKIPNETWORK 2
425 #define EL3CMD_RXRESETF_SKIPNETWORK (1 << EL3CMD_RXRESETB_SKIPNETWORK)
427 #define EL3CMD_SETRXFILTERB_UCAST 0
428 #define EL3CMD_SETRXFILTERB_MCAST 1
429 #define EL3CMD_SETRXFILTERB_BCAST 2
430 #define EL3CMD_SETRXFILTERB_PROM 3
432 #define EL3CMD_SETRXFILTERF_UCAST (1 << EL3CMD_SETRXFILTERB_UCAST)
433 #define EL3CMD_SETRXFILTERF_MCAST (1 << EL3CMD_SETRXFILTERB_MCAST)
434 #define EL3CMD_SETRXFILTERF_BCAST (1 << EL3CMD_SETRXFILTERB_BCAST)
435 #define EL3CMD_SETRXFILTERF_PROM (1 << EL3CMD_SETRXFILTERB_PROM)
438 /* EEPROM field details */
439 /* ==================== */
441 #define EL3ROM_CAPABILITIESB_PNP 0
442 #define EL3ROM_CAPABILITIESB_DUPLEX 1
443 #define EL3ROM_CAPABILITIESB_BIGPACKETS 2
444 #define EL3ROM_CAPABILITIESB_SLAVEDMA 3
445 #define EL3ROM_CAPABILITIESB_2NDDMA 4
446 #define EL3ROM_CAPABILITIESB_FULLMASTER 5
447 #define EL3ROM_CAPABILITIESB_MASTER 6
448 #define EL3ROM_CAPABILITIESB_CRCPASS 7
449 #define EL3ROM_CAPABILITIESB_TXDONE 8
450 #define EL3ROM_CAPABILITIESB_NOTXLEN 9
451 #define EL3ROM_CAPABILITIESB_RXREPEAT 10
452 #define EL3ROM_CAPABILITIESB_SNOOP 11
453 #define EL3ROM_CAPABILITIESB_100MBPS 12
454 #define EL3ROM_CAPABILITIESB_POWERSAVE 13
456 #if 0
457 #define EL3ROM_CAPABILITIESF_PNP (1 << EL3ROM_CAPABILITIESB_PNP)
458 #define EL3ROM_CAPABILITIESF_DUPLEX (1 << EL3ROM_CAPABILITIESB_DUPLEX)
459 #define EL3ROM_CAPABILITIESF_BIGPACKETS (1 << EL3ROM_CAPABILITIESB_BIGPACKETS)
460 #define EL3ROM_CAPABILITIESF_SLAVEDMA (1 << EL3ROM_CAPABILITIESB_SLAVEDMA)
461 #define EL3ROM_CAPABILITIESF_2NDDMA (1 << EL3ROM_CAPABILITIESB_2NDDMA)
462 #define EL3ROM_CAPABILITIESF_FULLMASTER (1 << EL3ROM_CAPABILITIESB_FULLMASTER)
463 #define EL3ROM_CAPABILITIESF_MASTER (1 << EL3ROM_CAPABILITIESB_MASTER)
464 #define EL3ROM_CAPABILITIESF_CRCPASS (1 << EL3ROM_CAPABILITIESB_CRCPASS)
465 #define EL3ROM_CAPABILITIESF_TXDONE (1 << EL3ROM_CAPABILITIESB_TXDONE)
466 #define EL3ROM_CAPABILITIESF_NOTXLEN (1 << EL3ROM_CAPABILITIESB_NOTXLEN)
467 #define EL3ROM_CAPABILITIESF_RXREPEAT (1 << EL3ROM_CAPABILITIESB_RXREPEAT)
468 #define EL3ROM_CAPABILITIESF_SNOOP (1 << EL3ROM_CAPABILITIESB_SNOOP)
469 #define EL3ROM_CAPABILITIESF_100MBPS (1 << EL3ROM_CAPABILITIESB_100MBPS)
470 #define EL3ROM_CAPABILITIESF_POWERSAVE (1 << EL3ROM_CAPABILITIESB_POWERSAVE)
471 #endif
473 #define EL3ROM_CAPABILITIESF_FULLMASTER (1 << EL3ROM_CAPABILITIESB_FULLMASTER)
474 #define EL3ROM_CAPABILITIESF_100MBPS (1 << EL3ROM_CAPABILITIESB_100MBPS)
477 /* DMA Packet Descriptors */
478 /* ====================== */
480 /* Fragments */
482 #define EL3FRAG_ADDR 0
483 #define EL3FRAG_LEN 1
485 #define EL3FRAG_LENB_LAST 31
487 #define EL3FRAG_LENF_LAST (1 << EL3FRAG_LENB_LAST)
489 /* Download Packet Descriptors */
491 #define EL3DPD_NEXT 0
492 #define EL3DPD_HEADER 1
493 #define EL3DPD_FIRSTFRAG 2
495 #define EL3DPD_HEADERB_DLINT 31
496 #define EL3DPD_HEADERB_TXINT 15
498 #define EL3DPD_HEADERF_DLINT (1 << EL3DPD_HEADERB_DLINT)
499 #define EL3DPD_HEADERF_TXINT (1 << EL3DPD_HEADERB_TXINT)
501 /* Upload Packet Descriptors */
503 #define EL3UPD_NEXT 0
504 #define EL3UPD_STATUS 1
505 #define EL3UPD_FIRSTFRAG 2
507 #define EL3UPD_STATUSB_COMPLETE 15
508 #define EL3UPD_STATUSB_ERROR 14
510 #define EL3UPD_STATUSF_COMPLETE (1 << EL3UPD_STATUSB_COMPLETE)
511 #define EL3UPD_STATUSF_ERROR (1 << EL3UPD_STATUSB_ERROR)
512 #define EL3UPD_STATUSF_SIZE 0x1fff
515 #endif