xref: /netbsd-src/sys/dev/isa/if_levar.h (revision fdecd6a253f999ae92b139670d9e15cc9df4497c)
1 /*	$NetBSD: if_levar.h,v 1.9 1997/06/06 23:43:53 thorpej Exp $	*/
2 
3 /*
4  * LANCE Ethernet driver header file
5  *
6  * Copyright (c) 1994, 1995 Charles M. Hannum.  All rights reserved.
7  *
8  * Copyright (C) 1993, Paul Richards. This software may be used, modified,
9  *   copied, distributed, and sold, in both source and binary form provided
10  *   that the above copyright and these terms are retained. Under no
11  *   circumstances is the author responsible for the proper functioning
12  *   of this software, nor does the author assume any responsibility
13  *   for damages incurred with its use.
14  */
15 
16 /* Board types */
17 #define	BICC		1
18 #define	BICC_RDP	0xc
19 #define	BICC_RAP	0xe
20 
21 #define	NE2100		2
22 #define	PCnet_ISA	4
23 #define	NE2100_RDP	0x10
24 #define	NE2100_RAP	0x12
25 
26 #define	DEPCA		3
27 #define	DEPCA_CSR	0x0
28 #define	DEPCA_CSR_SHE		0x80	/* Shared memory enabled */
29 #define	DEPCA_CSR_SWAP32	0x40	/* Byte swapped */
30 #define	DEPCA_CSR_DUM		0x08	/* rev E compatibility */
31 #define	DEPCA_CSR_IM		0x04	/* Interrupt masked */
32 #define	DEPCA_CSR_IEN		0x02	/* Interrupt enabled */
33 #define	DEPCA_CSR_NORMAL \
34 	(DEPCA_CSR_SHE | DEPCA_CSR_DUM | DEPCA_CSR_IEN)
35 #define	DEPCA_RDP	0x4
36 #define	DEPCA_RAP	0x6
37 #define	DEPCA_ADP	0xc
38 
39 /*
40  * Ethernet software status per interface.
41  *
42  * Each interface is referenced by a network interface structure,
43  * ethercom.ec_if, which the routing code uses to locate the interface.
44  * This structure contains the output queue for the interface, its address, ...
45  */
46 struct le_softc {
47 	struct	am7990_softc sc_am7990;	/* glue to MI code */
48 
49 	void	*sc_ih;
50 	bus_space_tag_t sc_iot;
51 	bus_space_tag_t sc_memt;
52 	bus_space_handle_t sc_ioh;
53 	bus_space_handle_t sc_memh;
54 	bus_dma_tag_t	sc_dmat;	/* DMA glue for non-DEPCA */
55 	bus_dmamap_t	sc_dmam;
56 	int	sc_card;
57 	int	sc_rap, sc_rdp;		/* offsets to LANCE registers */
58 };
59