1 /* $NetBSD: if_bmreg.h,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */
4 * Copyright 1991-1998 by Open Software Foundation, Inc.
7 * Permission to use, copy, modify, and distribute this software and
8 * its documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appears in all copies and
10 * that both the copyright notice and this permission notice appear in
11 * supporting documentation.
13 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
14 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 * FOR A PARTICULAR PURPOSE.
17 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
20 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
21 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 /* -------------------------------------------------------------------- */
25 /* Heathrow (F)eature (C)ontrol (R)egister Addresses */
26 /* -------------------------------------------------------------------- */
27 #define EnetEnable 0x60000000 /* enable Enet Xcvr/Controller */
28 #define ResetEnetCell 0x80000000 /* reset Enet cell */
30 /* -------------------------------------------------------------------- */
31 /* BigMac Register Numbers & Bit Assignments */
32 /* -------------------------------------------------------------------- */
34 #define TxOutputEnable 0x0001
35 #define MIILoopbackBits 0x0006
36 #define MIIBufferEnable 0x0008
37 #define SQETestEnable 0x0010
38 #define LinkStatus 0x0100
39 #define TXFIFOCSR 0x0100
40 #define TxFIFOEnable 0x0001
41 #define TxFIFO128 0x0000
43 #define RXFIFOCSR 0x0120
44 #define RxFIFOEnable TxFIFOEnable
45 #define RxFIFO128 TxFIFO128
47 #define MEMDATAHI 0x0140
48 #define MEMDATALO 0x0150
50 #define COLActiveLow 0x0002
51 #define SerialMode 0x0004
55 #define MIFDC 0x0001 /* MII clock */
56 #define MIFDO 0x0002 /* MII data out */
57 #define MIFDIR 0x0004 /* MII direction (1: write) */
58 #define MIFDI 0x0008 /* MII data in */
59 #define SROMCSR 0x0190
63 #define INTDISABLE 0x0210
64 #define IntFrameReceived 0x0001
65 #define IntRxFrameCntExp 0x0002
66 #define IntRxAlignCntExp 0x0004
67 #define IntRxCRCCntExp 0x0008
68 #define IntRxLenCntExp 0x0010
69 #define IntRxOverFlow 0x0020
70 #define IntRxCodeViolation 0x0040
71 #define IntSQETestError 0x0080
72 #define IntFrameSent 0x0100
73 #define IntTxUnderrun 0x0200
74 #define IntTxMaxSizeError 0x0400
75 #define IntTxNormalCollExp 0x0800
76 #define IntTxExcessCollExp 0x1000
77 #define IntTxLateCollExp 0x2000
78 #define IntTxNetworkCollExp 0x4000
79 #define IntTxDeferTimerExp 0x8000
80 #define NormalIntEvents ~(IntFrameSent)
81 #define NoEventsMask 0xFFFF
83 #define TxNeverGiveUp 0x0400
85 #define TxResetBit 0x0001
87 #define TxMACEnable 0x0001
88 #define TxThreshold 0x0004
89 #define TxFullDuplex 0x0200
109 #define RxResetValue 0x0000
111 #define RxMACEnable 0x0001
112 #define ReservedValue 0x0004
113 #define RxPromiscEnable 0x0040
114 #define RxCRCEnable 0x0100
115 #define RxRejectOwnPackets 0x0200
116 #define RxHashFilterEnable 0x0800
117 #define RxAddrFilterEnable 0x1000
137 #define EnableAllCompares 0x0fff
139 /* -------------------------------------------------------------------- */
140 /* Misc. Bit definitions for BMac Status word */
141 /* -------------------------------------------------------------------- */
142 #define RxAbortBit 0x8000 /* status bit in BMac status for rx packets */
143 #define RxLengthMask 0x3FFF /* bits that determine length of rx packets */
145 #define NETWORK_BUFSIZE (ETHERMAXPACKET + ETHERCRC + 2)