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