if_ne_pbusreg.h revision 1.1.4.2 1 /* $NetBSD: if_ne_pbusreg.h,v 1.1.4.2 2002/01/08 00:22:47 nathanw Exp $ */
2
3 /*
4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Mark Brinicombe of Causality Limited.
9 *
10 * EtherH code Copyright (c) 1998 Mike Pumford
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 * This product includes software developed by the NetBSD
23 * Foundation, Inc. and its contributors.
24 * 4. Neither the name of The NetBSD Foundation nor the names of its
25 * contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
29 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
32 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 *
40 * Register definitions for podulebus hosted ne2000 ethernet controllers
41 */
42
43 /* EtherM netslot cards */
44 #define EM_NIC_OFFSET 0x0800
45 #define EM_NIC_SIZE (NE2000_NIC_NPORTS << EM_REGSHIFT)
46 #define EM_ASIC_OFFSET (EM_NIC_OFFSET + (NE2000_ASIC_OFFSET << EM_REGSHIFT))
47 #define EM_ASIC_SIZE (NE2000_ASIC_NPORTS << EM_REGSHIFT)
48 #define EM_REGSHIFT 5
49
50 /* EtherM interface has a special Diagnostic status register */
51 #define EM_DSR_REG 0x0d /* Register number from ASIC base */
52
53 /* Diagnostic status register */
54 #define EM_DSR_20M (1 << 1) /* 20MHz VCO functioning */
55 #define EM_DSR_TCOK (1 << 2) /* Transmit clock functioning */
56 #define EM_DSR_POL (1 << 3) /* Polarity of UTP link */
57 #define EM_DSR_JAB (1 << 4) /* Jabber state */
58 #define EM_DSR_LNK (1 << 5) /* Link state */
59 #define EM_DSR_LBK (1 << 6) /* Lookback mode */
60 #define EM_DSR_UTP (1 << 7) /* Twisted pair selected */
61
62 /* EtherLan 600 definitions */
63 #define EH600_CONTROL_OFFSET 0x0a00
64 #define EH600_CONTROL_SIZE (1 << EH600_REGSHIFT)
65 #define EH600_NIC_OFFSET 0x0800
66 #define EH600_NIC_SIZE (NE2000_NIC_NPORTS << EH600_REGSHIFT)
67 #define EH600_ASIC_OFFSET (EH600_NIC_OFFSET + (NE2000_ASIC_OFFSET \
68 << EH600_REGSHIFT))
69 #define EH600_ASIC_SIZE (NE2000_ASIC_NPORTS << EH600_REGSHIFT)
70 #define EH600_REGSHIFT 2
71
72 #define EH600_MEM_START 0x100 /* buffer ram start */
73 #define EH600_MEM_END 0x8000 /* buffer ram end */
74
75 /* Acorn EtherN registers */
76 #define EN_REGSHIFT 3
77 #define EN_NIC_OFFSET 0x400000
78 #define EN_NIC_SIZE (NE2000_NIC_NPORTS << EN_REGSHIFT)
79 #define EN_ASIC_OFFSET (EN_NIC_OFFSET + (NE2000_ASIC_OFFSET \
80 << EN_REGSHIFT))
81 #define EN_ASIC_SIZE (NE2000_ASIC_NPORTS << EN_REGSHIFT)
82
83 /* Etherlan 600 control register */
84 /*Write only */
85 #define EH_INTR_MASK (1 << 0) /* Interrupt Mask. */
86 #define EH_ID_CONTROL (1 << 1) /* ID control. */
87 /* Read only */
88 #define EH_INTR_STAT (1 << 0) /* Interrupt status. */
89