if_levar.h revision 1.1 1 1.1 mycroft /* $NetBSD: if_levar.h,v 1.1 1995/07/24 18:04:39 mycroft Exp $ */
2 1.1 mycroft
3 1.1 mycroft /*
4 1.1 mycroft * LANCE Ethernet driver header file
5 1.1 mycroft *
6 1.1 mycroft * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
7 1.1 mycroft *
8 1.1 mycroft * Copyright (C) 1993, Paul Richards. This software may be used, modified,
9 1.1 mycroft * copied, distributed, and sold, in both source and binary form provided
10 1.1 mycroft * that the above copyright and these terms are retained. Under no
11 1.1 mycroft * circumstances is the author responsible for the proper functioning
12 1.1 mycroft * of this software, nor does the author assume any responsibility
13 1.1 mycroft * for damages incurred with its use.
14 1.1 mycroft */
15 1.1 mycroft
16 1.1 mycroft /* Board types */
17 1.1 mycroft #define BICC 1
18 1.1 mycroft #define BICC_RDP 0xc
19 1.1 mycroft #define BICC_RAP 0xe
20 1.1 mycroft
21 1.1 mycroft #define NE2100 2
22 1.1 mycroft #define NE2100_RDP 0x10
23 1.1 mycroft #define NE2100_RAP 0x12
24 1.1 mycroft
25 1.1 mycroft #define DEPCA 3
26 1.1 mycroft #define DEPCA_CSR 0x0
27 1.1 mycroft #define DEPCA_CSR_SHE 0x80 /* Shared memory enabled */
28 1.1 mycroft #define DEPCA_CSR_SWAP32 0x40 /* Byte swapped */
29 1.1 mycroft #define DEPCA_CSR_DUM 0x08 /* rev E compatibility */
30 1.1 mycroft #define DEPCA_CSR_IM 0x04 /* Interrupt masked */
31 1.1 mycroft #define DEPCA_CSR_IEN 0x02 /* Interrupt enabled */
32 1.1 mycroft #define DEPCA_CSR_NORMAL \
33 1.1 mycroft (DEPCA_CSR_SHE | DEPCA_CSR_DUM | DEPCA_CSR_IEN)
34 1.1 mycroft #define DEPCA_RDP 0x4
35 1.1 mycroft #define DEPCA_RAP 0x6
36 1.1 mycroft #define DEPCA_ADP 0xc
37 1.1 mycroft
38 1.1 mycroft /* Chip types */
39 1.1 mycroft #define PROBE_MASK 0x0007
40 1.1 mycroft #define LANCE 1
41 1.1 mycroft #define LANCE_MASK 0x0007
42 1.1 mycroft #define PCnet_ISA 2
43 1.1 mycroft #define PCnet_ISA_MASK 0x0000
44 1.1 mycroft
45 1.1 mycroft /*
46 1.1 mycroft * Ethernet software status per interface.
47 1.1 mycroft *
48 1.1 mycroft * Each interface is referenced by a network interface structure,
49 1.1 mycroft * arpcom.ac_if, which the routing code uses to locate the interface.
50 1.1 mycroft * This structure contains the output queue for the interface, its address, ...
51 1.1 mycroft */
52 1.1 mycroft struct le_softc {
53 1.1 mycroft struct device sc_dev; /* base structure */
54 1.1 mycroft struct arpcom sc_arpcom; /* Ethernet common part */
55 1.1 mycroft
56 1.1 mycroft void (*sc_copytodesc)(); /* Copy to descriptor */
57 1.1 mycroft void (*sc_copyfromdesc)(); /* Copy from descriptor */
58 1.1 mycroft
59 1.1 mycroft void (*sc_copytobuf)(); /* Copy to buffer */
60 1.1 mycroft void (*sc_copyfrombuf)(); /* Copy from buffer */
61 1.1 mycroft void (*sc_zerobuf)(); /* and Zero bytes in buffer */
62 1.1 mycroft
63 1.1 mycroft u_int16_t sc_conf3; /* CSR3 value */
64 1.1 mycroft
65 1.1 mycroft void *sc_mem; /* base address of RAM -- CPU's view */
66 1.1 mycroft u_long sc_addr; /* base address of RAM -- LANCE's view */
67 1.1 mycroft u_long sc_memsize; /* size of RAM */
68 1.1 mycroft
69 1.1 mycroft int sc_nrbuf; /* number of receive buffers */
70 1.1 mycroft int sc_ntbuf; /* number of transmit buffers */
71 1.1 mycroft int sc_last_rd;
72 1.1 mycroft int sc_first_td, sc_last_td, sc_no_td;
73 1.1 mycroft
74 1.1 mycroft int sc_initaddr;
75 1.1 mycroft int sc_rmdaddr;
76 1.1 mycroft int sc_tmdaddr;
77 1.1 mycroft int sc_rbufaddr;
78 1.1 mycroft int sc_tbufaddr;
79 1.1 mycroft
80 1.1 mycroft #ifdef LEDEBUG
81 1.1 mycroft int sc_debug;
82 1.1 mycroft #endif
83 1.1 mycroft
84 1.1 mycroft void *sc_ih;
85 1.1 mycroft int sc_chip, sc_card;
86 1.1 mycroft int sc_rap, sc_rdp; /* LANCE registers */
87 1.1 mycroft };
88