if_bmreg.h revision 1.1 1 /* $NetBSD: if_bmreg.h,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */
2
3 /*
4 * Copyright 1991-1998 by Open Software Foundation, Inc.
5 * All Rights Reserved
6 *
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.
12 *
13 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
14 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 * FOR A PARTICULAR PURPOSE.
16 *
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.
22 */
23
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 */
29
30 /* -------------------------------------------------------------------- */
31 /* BigMac Register Numbers & Bit Assignments */
32 /* -------------------------------------------------------------------- */
33 #define XIFC 0x0000
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
42 #define TXTH 0x0110
43 #define RXFIFOCSR 0x0120
44 #define RxFIFOEnable TxFIFOEnable
45 #define RxFIFO128 TxFIFO128
46 #define MEMADD 0x0130
47 #define MEMDATAHI 0x0140
48 #define MEMDATALO 0x0150
49 #define XCVRIF 0x0160
50 #define COLActiveLow 0x0002
51 #define SerialMode 0x0004
52 #define ClkBit 0x0008
53 #define CHIPID 0x0170
54 #define MIFCSR 0x0180
55 #define SROMCSR 0x0190
56 #define TXPNTR 0x01A0
57 #define RXPNTR 0x01B0
58 #define STATUS 0x0200
59 #define INTDISABLE 0x0210
60 #define IntFrameReceived 0x0001
61 #define IntRxFrameCntExp 0x0002
62 #define IntRxAlignCntExp 0x0004
63 #define IntRxCRCCntExp 0x0008
64 #define IntRxLenCntExp 0x0010
65 #define IntRxOverFlow 0x0020
66 #define IntRxCodeViolation 0x0040
67 #define IntSQETestError 0x0080
68 #define IntFrameSent 0x0100
69 #define IntTxUnderrun 0x0200
70 #define IntTxMaxSizeError 0x0400
71 #define IntTxNormalCollExp 0x0800
72 #define IntTxExcessCollExp 0x1000
73 #define IntTxLateCollExp 0x2000
74 #define IntTxNetworkCollExp 0x4000
75 #define IntTxDeferTimerExp 0x8000
76 #define NormalIntEvents ~(IntFrameSent)
77 #define NoEventsMask 0xFFFF
78
79 #define TxNeverGiveUp 0x0400
80 #define TXRST 0x0420
81 #define TxResetBit 0x0001
82 #define TXCFG 0x0430
83 #define TxMACEnable 0x0001
84 #define TxThreshold 0x0004
85 #define IPG1 0x0440
86 #define IPG2 0x0450
87 #define ALIMIT 0x0460
88 #define SLOT 0x0470
89 #define PALEN 0x0480
90 #define PAPAT 0x0490
91 #define TXSFD 0x04A0
92 #define JAM 0x04B0
93 #define TXMAX 0x04C0
94 #define TXMIN 0x04D0
95 #define PAREG 0x04E0
96 #define DCNT 0x04F0
97 #define NCCNT 0x0500
98 #define NTCNT 0x0510
99 #define EXCNT 0x0520
100 #define LTCNT 0x0530
101 #define RSEED 0x0540
102 #define TXSM 0x0550
103 #define RXRST 0x0620
104 #define RxResetValue 0x0000
105 #define RXCFG 0x0630
106 #define RxMACEnable 0x0001
107 #define ReservedValue 0x0004
108 #define RxPromiscEnable 0x0040
109 #define RxCRCEnable 0x0100
110 #define RxRejectOwnPackets 0x0200
111 #define RxHashFilterEnable 0x0800
112 #define RxAddrFilterEnable 0x1000
113 #define RXMAX 0x0640
114 #define RXMIN 0x0650
115 #define MADD2 0x0660
116 #define MADD1 0x0670
117 #define MADD0 0x0680
118 #define FRCNT 0x0690
119 #define LECNT 0x06A0
120 #define AECNT 0x06B0
121 #define FECNT 0x06C0
122 #define RXSM 0x06D0
123 #define RXCV 0x06E0
124 #define HASH3 0x0700
125 #define HASH2 0x0710
126 #define HASH1 0x0720
127 #define HASH0 0x0730
128 #define AFR2 0x0740
129 #define AFR1 0x0750
130 #define AFR0 0x0760
131 #define AFCR 0x0770
132 #define EnableAllCompares 0x0fff
133
134 /* -------------------------------------------------------------------- */
135 /* Misc. Bit definitions for BMac Status word */
136 /* -------------------------------------------------------------------- */
137 #define RxAbortBit 0x8000 /* status bit in BMac status for rx packets */
138 #define RxLengthMask 0x3FFF /* bits that determine length of rx packets */
139
140 #define NETWORK_BUFSIZE (ETHERMAXPACKET + ETHERCRC + 2)
141