smc90cx6reg.h revision 1.5 1 /* $NetBSD: smc90cx6reg.h,v 1.5 1998/09/02 22:32:08 is Exp $ */
2
3 /*
4 * Copyright (c) 1994, 1995, 1998 Ignatios Souvatzis
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Ignatios Souvatzis
18 * for the NetBSD project.
19 * 4. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34 /*
35 * chip offsets and bits for the SMC Arcnet chipset.
36 */
37
38 #ifndef _SMC90CXVAR_H_
39 #define _SMC90CXVAR_H_
40
41 /* register offsets */
42
43 #define BAHSTAT 0
44 #define BAHCMD 1
45
46 /* memory offsets */
47 #define BAHCHECKBYTE 0
48 #define BAHMACOFF 1
49
50 #define BAH_TXDIS 0x01
51 #define BAH_RXDIS 0x02
52 #define BAH_TX(x) (0x03 | ((x)<<3))
53 #define BAH_RX(x) (0x04 | ((x)<<3))
54 #define BAH_RXBC(x) (0x84 | ((x)<<3))
55
56 #define BAH_CONF(x) (0x05 | (x))
57 #define CLR_POR 0x08
58 #define CLR_RECONFIG 0x10
59
60 #define BAH_CLR(x) (0x06 | (x))
61 #define CONF_LONG 0x08
62 #define CONF_SHORT 0x00
63
64 /*
65 * These are not in the COM90C65 docs. Derived from the arcnet.asm
66 * packet driver by Philippe Prindeville and Russel Nelson.
67 */
68
69 #define BAH_LDTST(x) (0x07 | (x))
70 #define TEST_ON 0x08
71 #define TEST_OFF 0x00
72
73 #define BAH_TA 1 /* int mask also */
74 #define BAH_TMA 2
75 #define BAH_RECON 4 /* int mask also */
76 #define BAH_TEST 8 /* not in the COM90C65 docs (see above) */
77 #define BAH_POR 0x10 /* non maskable interrupt */
78 #define BAH_ET1 0x20 /* timeout value bits, normally 1 */
79 #define BAH_ET2 0x40 /* timeout value bits, normally 1 */
80 #define BAH_RI 0x80 /* int mask also */
81
82 #endif
83