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