am79900reg.h revision 1.2 1 1.2 mycroft /* $NetBSD: am79900reg.h,v 1.2 1998/08/15 10:18:13 mycroft Exp $ */
2 1.2 mycroft
3 1.2 mycroft /*-
4 1.2 mycroft * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 1.2 mycroft * All rights reserved.
6 1.2 mycroft *
7 1.2 mycroft * This code is derived from software contributed to The NetBSD Foundation
8 1.2 mycroft * by Charles M. Hannum.
9 1.2 mycroft *
10 1.2 mycroft * Redistribution and use in source and binary forms, with or without
11 1.2 mycroft * modification, are permitted provided that the following conditions
12 1.2 mycroft * are met:
13 1.2 mycroft * 1. Redistributions of source code must retain the above copyright
14 1.2 mycroft * notice, this list of conditions and the following disclaimer.
15 1.2 mycroft * 2. Redistributions in binary form must reproduce the above copyright
16 1.2 mycroft * notice, this list of conditions and the following disclaimer in the
17 1.2 mycroft * documentation and/or other materials provided with the distribution.
18 1.2 mycroft * 3. All advertising materials mentioning features or use of this software
19 1.2 mycroft * must display the following acknowledgement:
20 1.2 mycroft * This product includes software developed by the NetBSD
21 1.2 mycroft * Foundation, Inc. and its contributors.
22 1.2 mycroft * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.2 mycroft * contributors may be used to endorse or promote products derived
24 1.2 mycroft * from this software without specific prior written permission.
25 1.2 mycroft *
26 1.2 mycroft * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.2 mycroft * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.2 mycroft * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.2 mycroft * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.2 mycroft * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.2 mycroft * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.2 mycroft * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.2 mycroft * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.2 mycroft * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.2 mycroft * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.2 mycroft * POSSIBILITY OF SUCH DAMAGE.
37 1.2 mycroft */
38 1.1 drochner
39 1.1 drochner /*-
40 1.1 drochner * Copyright (c) 1992, 1993
41 1.1 drochner * The Regents of the University of California. All rights reserved.
42 1.1 drochner *
43 1.1 drochner * This code is derived from software contributed to Berkeley by
44 1.1 drochner * Ralph Campbell and Rick Macklem.
45 1.1 drochner *
46 1.1 drochner * Redistribution and use in source and binary forms, with or without
47 1.1 drochner * modification, are permitted provided that the following conditions
48 1.1 drochner * are met:
49 1.1 drochner * 1. Redistributions of source code must retain the above copyright
50 1.1 drochner * notice, this list of conditions and the following disclaimer.
51 1.1 drochner * 2. Redistributions in binary form must reproduce the above copyright
52 1.1 drochner * notice, this list of conditions and the following disclaimer in the
53 1.1 drochner * documentation and/or other materials provided with the distribution.
54 1.1 drochner * 3. All advertising materials mentioning features or use of this software
55 1.1 drochner * must display the following acknowledgement:
56 1.1 drochner * This product includes software developed by the University of
57 1.1 drochner * California, Berkeley and its contributors.
58 1.1 drochner * 4. Neither the name of the University nor the names of its contributors
59 1.1 drochner * may be used to endorse or promote products derived from this software
60 1.1 drochner * without specific prior written permission.
61 1.1 drochner *
62 1.1 drochner * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63 1.1 drochner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 1.1 drochner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65 1.1 drochner * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
66 1.1 drochner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 1.1 drochner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68 1.1 drochner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 1.1 drochner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 1.1 drochner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 1.1 drochner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 1.1 drochner * SUCH DAMAGE.
73 1.1 drochner *
74 1.1 drochner * @(#)if_lereg.h 8.1 (Berkeley) 6/10/93
75 1.1 drochner */
76 1.1 drochner
77 1.1 drochner /*
78 1.1 drochner * Receive message descriptor
79 1.1 drochner */
80 1.1 drochner struct lermd {
81 1.1 drochner u_int32_t rmd0;
82 1.1 drochner u_int32_t rmd1;
83 1.1 drochner u_int32_t rmd2;
84 1.1 drochner int32_t rmd3;
85 1.1 drochner };
86 1.1 drochner
87 1.1 drochner /*
88 1.1 drochner * Transmit message descriptor
89 1.1 drochner */
90 1.1 drochner struct letmd {
91 1.1 drochner u_int32_t tmd0;
92 1.1 drochner u_int32_t tmd1;
93 1.1 drochner u_int32_t tmd2;
94 1.1 drochner int32_t tmd3;
95 1.1 drochner };
96 1.1 drochner
97 1.1 drochner /*
98 1.1 drochner * Initialization block
99 1.1 drochner */
100 1.1 drochner struct leinit {
101 1.1 drochner u_int32_t init_mode; /* +0x0000 */
102 1.1 drochner u_int32_t init_padr[2]; /* +0x0002 */
103 1.1 drochner u_int16_t init_ladrf[4]; /* +0x0008 */
104 1.1 drochner u_int32_t init_rdra; /* +0x0010 */
105 1.1 drochner u_int32_t init_tdra; /* +0x0014 */
106 1.1 drochner int32_t pad; /* Pad to 16 shorts */
107 1.1 drochner };
108 1.1 drochner
109 1.1 drochner /* Receive message descriptor 1 (rmd1_bits) */
110 1.1 drochner #define LE_R1_OWN (1<<31) /* LANCE owns the packet */
111 1.1 drochner #define LE_R1_ERR (1<<30) /* error summary */
112 1.1 drochner #define LE_R1_FRAM (1<<29) /* framing error */
113 1.1 drochner #define LE_R1_OFLO (1<<28) /* overflow error */
114 1.1 drochner #define LE_R1_CRC (1<<27) /* CRC error */
115 1.1 drochner #define LE_R1_BUFF (1<<26) /* buffer error */
116 1.1 drochner #define LE_R1_STP (1<<25) /* start of packet */
117 1.1 drochner #define LE_R1_ENP (1<<24) /* end of packet */
118 1.1 drochner #define LE_R1_ONES (0xf<<12) /* end of packet */
119 1.1 drochner
120 1.1 drochner #define LE_R1_BITS \
121 1.1 drochner "\20\40OWN\37ERR\36FRAM\35OFLO\34CRC\33BUFF\32STP\31ENP"
122 1.1 drochner
123 1.1 drochner /* Transmit message descriptor 1 (tmd1_bits) */
124 1.1 drochner #define LE_T1_OWN (1<<31) /* LANCE owns the packet */
125 1.1 drochner #define LE_T1_ERR (1<<30) /* error summary */
126 1.1 drochner #define LE_T1_MORE (1<<28) /* multiple collisions */
127 1.1 drochner #define LE_T1_ONE (1<<27) /* single collision */
128 1.1 drochner #define LE_T1_DEF (1<<26) /* defferred transmit */
129 1.1 drochner #define LE_T1_STP (1<<25) /* start of packet */
130 1.1 drochner #define LE_T1_ENP (1<<24) /* end of packet */
131 1.1 drochner #define LE_T1_ONES (0xf<<12) /* end of packet */
132 1.1 drochner
133 1.1 drochner #define LE_T1_BITS \
134 1.1 drochner "\20\40OWN\37ERR\36RES\35MORE\34ONE\33DEF\32STP\31ENP"
135 1.1 drochner
136 1.1 drochner /* Transmit message descriptor 3 (tmd3) */
137 1.1 drochner #define LE_T2_BUFF (1<<31) /* buffer error */
138 1.1 drochner #define LE_T2_UFLO (1<<30) /* underflow error */
139 1.1 drochner #define LE_T2_LCOL (1<<28) /* late collision */
140 1.1 drochner #define LE_T2_LCAR (1<<27) /* loss of carrier */
141 1.1 drochner #define LE_T2_RTRY (1<<26) /* retry error */
142 1.1 drochner #if 0
143 1.1 drochner #define LE_T3_TDR_MASK 0x03ff /* time domain reflectometry counter */
144 1.1 drochner #endif
145 1.1 drochner
146 1.1 drochner #define LE_T3_BITS \
147 1.1 drochner "\12\40BUFF\37UFLO\35LCOL\34LCAR\33RTRY"
148