Merge from vendor branch CVS:
[dragonfly.git] / sys / dev / netif / ed / if_ed98.h
CommitLineData
984263bc
MD
1/*
2 * Copyright (c) KATO Takenori, 1996. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer as
9 * the first lines of this file unmodified.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
1f18ea8c
JS
27 * $FreeBSD: src/sys/dev/ed/if_ed98.h,v 1.1 2000/08/17 12:15:43 nyan Exp $
28 * $DragonFly: src/sys/dev/netif/ed/Attic/if_ed98.h,v 1.3 2004/02/13 21:15:12 joerg Exp $
984263bc
MD
29 */
30
31/*
32 * PC-9801 specific definitions for DP8390/SMC8216 NICs.
33 */
34#ifndef PC98
35#error Why you include if_ed98.h?
36#endif
37
38/*
39 * Vendor types
40 */
41#define ED_VENDOR_MISC 0xf0 /* others */
42
43/*
44 * Card types.
45 *
46 * Type Card
47 * 0x00 Allied Telesis CenterCom LA-98-T / SMC EtherEZ98.
48 * 0x10 ** RESERVED **
49 * 0x20 PLANET SMART COM 98 EN-2298 / ELECOM LANEED LD-BDN[123]A.
50 * 0x30 MELCO EGY-98 / Contec C-NET(98)E-A/L-A.
51 * 0x40 MELCO LGY-98, IND-SP, IND-SS / MACNICA NE2098(XXX).
52 * 0x50 ICM DT-ET-25, DT-ET-T5, IF-2766ET, IF-2771ET /
53 * D-Link DE-298P{T,CAT}, DE-298{T,TP,CAT}.
54 * 0x60 Allied Telesis SIC-98.
55 * 0x70 ** RESERVED **
56 * 0x80 NEC PC-9801-108.
57 * 0x90 IO-DATA LA-98 / NEC PC-9801-77.
58 * 0xa0 Contec C-NET(98).
59 * 0xb0 Contec C-NET(98)E/L.
60 * 0xc0 ** RESERVED **
61 * 0xd0 Networld EC/EP-98X.
62 * 0xe0 Soliton SB-9801 / Fujikura FN-9801 / Networld EC/EP-98S.
63 * 0xf0 NextCom NC5098.
64 */
65#define ED_TYPE98_BASE 0x80
66
67#define ED_TYPE98_GENERIC 0x80
68#define ED_TYPE98_BDN 0x82
69#define ED_TYPE98_EGY 0x83
70#define ED_TYPE98_LGY 0x84
71#define ED_TYPE98_ICM 0x85
72#define ED_TYPE98_SIC 0x86
73#define ED_TYPE98_108 0x88
74#define ED_TYPE98_LA98 0x89
75#define ED_TYPE98_CNET98 0x8a
76#define ED_TYPE98_CNET98EL 0x8b
77#define ED_TYPE98_NW98X 0x8d
78#define ED_TYPE98_SB98 0x8e
79#define ED_TYPE98_NC5098 0x8f
80
81#define ED_TYPE98(x) (((x & 0xffff0000) >> 20) | ED_TYPE98_BASE)
82#define ED_TYPE98SUB(x) ((x & 0xf0000) >> 16)
83
84/*
85 * Definitions for C-NET(98) serise
86 */
87/*
88 * Initial Register(on board JP1)
89 */
90#define ED_CNET98_INIT 0xaaed /* default */
91#define ED_CNET98_INIT2 0x55ed /* another setting */
92
93#define ED_CNET98EL_PAGE_OFFSET 0x0000 /* Page offset for NIC access to mem */
94
95/*
96 * Definitions for Soliton SB-9801
97 */
98/*
99 * I/O port select register
100 */
101#define ED_SB98_IO_INHIBIT 0x0040 /* XXX - shares printer port! */
102
103/*
104 * Definitions for SMC EtherEZ98(SMC8498BTA)
105 */
106#define ED_EZ98_NIC_OFFSET 0x100 /* I/O base offset to NIC */
107#define ED_EZ98_ASIC_OFFSET 0 /* I/O base offset to ASIC */
108/*
109 * XXX - The I/O address range is fragmented in the EtherEZ98;
110 * it occupies 16*2 I/O addresses, by the way.
111 */
112#define ED_EZ98_IO_PORTS 16 /* # of i/o addresses used */