xref: /openbsd-src/sys/dev/ic/ne2000var.h (revision d874cce4b1d9fe6b41c9e4f2117a77d8a4a37b92)
1*d874cce4Sray /*	$OpenBSD: ne2000var.h,v 1.9 2008/06/26 05:42:16 ray Exp $	*/
251ef1495Sfgsch /*	$NetBSD: ne2000var.h,v 1.2 1997/10/14 22:54:12 thorpej Exp $	*/
351ef1495Sfgsch 
451ef1495Sfgsch /*-
551ef1495Sfgsch  * Copyright (c) 1997 The NetBSD Foundation, Inc.
651ef1495Sfgsch  * All rights reserved.
751ef1495Sfgsch  *
851ef1495Sfgsch  * This code is derived from software contributed to The NetBSD Foundation
951ef1495Sfgsch  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
1051ef1495Sfgsch  * NASA Ames Research Center.
1151ef1495Sfgsch  *
1251ef1495Sfgsch  * Redistribution and use in source and binary forms, with or without
1351ef1495Sfgsch  * modification, are permitted provided that the following conditions
1451ef1495Sfgsch  * are met:
1551ef1495Sfgsch  * 1. Redistributions of source code must retain the above copyright
1651ef1495Sfgsch  *    notice, this list of conditions and the following disclaimer.
1751ef1495Sfgsch  * 2. Redistributions in binary form must reproduce the above copyright
1851ef1495Sfgsch  *    notice, this list of conditions and the following disclaimer in the
1951ef1495Sfgsch  *    documentation and/or other materials provided with the distribution.
2051ef1495Sfgsch  *
2151ef1495Sfgsch  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2251ef1495Sfgsch  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2351ef1495Sfgsch  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2451ef1495Sfgsch  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2551ef1495Sfgsch  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2651ef1495Sfgsch  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2751ef1495Sfgsch  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2851ef1495Sfgsch  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2951ef1495Sfgsch  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3051ef1495Sfgsch  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3151ef1495Sfgsch  * POSSIBILITY OF SUCH DAMAGE.
3251ef1495Sfgsch  */
3351ef1495Sfgsch 
3451ef1495Sfgsch #ifndef _DEV_IC_NE2000VAR_H_
3551ef1495Sfgsch #define	_DEV_IC_NE2000VAR_H_
3651ef1495Sfgsch 
3751ef1495Sfgsch struct ne2000_softc {
3851ef1495Sfgsch 	struct dp8390_softc sc_dp8390;
3951ef1495Sfgsch 
4051ef1495Sfgsch 	bus_space_tag_t sc_asict;	/* space tag for ASIC */
4151ef1495Sfgsch 	bus_space_handle_t sc_asich;	/* space handle for ASIC */
4251ef1495Sfgsch 
43f004f7e7Sbrad 	enum {
44f004f7e7Sbrad 		NE2000_TYPE_UNKNOWN = 0,
45f004f7e7Sbrad 		NE2000_TYPE_NE1000,
46f004f7e7Sbrad 		NE2000_TYPE_NE2000,
47f004f7e7Sbrad 		NE2000_TYPE_DL10019,
48f004f7e7Sbrad 		NE2000_TYPE_DL10022,
49f004f7e7Sbrad 		NE2000_TYPE_AX88190,
50f004f7e7Sbrad 		NE2000_TYPE_AX88790
51f004f7e7Sbrad 	} sc_type;
52f004f7e7Sbrad 	int sc_useword;
5351ef1495Sfgsch };
5451ef1495Sfgsch 
55c4071fd1Smillert int	ne2000_attach(struct ne2000_softc *, u_int8_t *);
56c4071fd1Smillert int	ne2000_detect(struct ne2000_softc *);
57c4071fd1Smillert int	ne2000_detach(struct ne2000_softc *, int);
5851ef1495Sfgsch 
5951ef1495Sfgsch #endif /* _DEV_IC_NE2000VAR_H_ */
60