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