Sync usage with man page.
[netbsd-mini2440.git] / sys / dev / eisa / eisavar.h
blob4f85e6c41ae6567f2ff7dcfba4df171760126150
1 /* $NetBSD: eisavar.h,v 1.23 2007/10/19 11:59:41 ad Exp $ */
3 /*-
4 * Copyright (c) 2000 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * Copyright (c) 1995, 1996 Christopher G. Demetriou
34 * All rights reserved.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
38 * are met:
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in the
43 * documentation and/or other materials provided with the distribution.
44 * 3. All advertising materials mentioning features or use of this software
45 * must display the following acknowledgement:
46 * This product includes software developed by Christopher G. Demetriou
47 * for the NetBSD Project.
48 * 4. The name of the author may not be used to endorse or promote products
49 * derived from this software without specific prior written permission
51 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
52 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
53 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
55 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
56 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
60 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63 #ifndef _DEV_EISA_EISAVAR_H_
64 #define _DEV_EISA_EISAVAR_H_
67 * Definitions for EISA autoconfiguration.
69 * This file describes types and functions which are used for EISA
70 * configuration. Some of this information is machine-specific, and is
71 * separated into eisa_machdep.h.
74 struct eisa_cfg_mem;
75 struct eisa_cfg_irq;
76 struct eisa_cfg_dma;
77 struct eisa_cfg_io;
79 #include <sys/bus.h>
80 #include <dev/eisa/eisareg.h> /* For ID register & string info. */
83 * Structures and definitions needed by the machine-dependent header.
85 struct eisabus_attach_args;
88 * Machine-dependent definitions.
90 #include <machine/eisa_machdep.h>
92 typedef int eisa_slot_t; /* really only needs to be 4 bits */
95 * EISA bus attach arguments.
97 struct eisabus_attach_args {
98 const char *_eba_busname; /* XXX placeholder */
99 bus_space_tag_t eba_iot; /* eisa i/o space tag */
100 bus_space_tag_t eba_memt; /* eisa mem space tag */
101 bus_dma_tag_t eba_dmat; /* DMA tag */
102 eisa_chipset_tag_t eba_ec;
106 * EISA device attach arguments.
108 struct eisa_attach_args {
109 bus_space_tag_t ea_iot; /* eisa i/o space tag */
110 bus_space_tag_t ea_memt; /* eisa mem space tag */
111 bus_dma_tag_t ea_dmat; /* DMA tag */
112 eisa_chipset_tag_t ea_ec;
114 eisa_slot_t ea_slot;
115 u_int8_t ea_vid[EISA_NVIDREGS];
116 u_int8_t ea_pid[EISA_NPIDREGS];
117 char ea_idstring[EISA_IDSTRINGLEN];
120 int eisabusprint(void *, const char *);
123 * EISA Configuration entries, set up by an EISA Configuration Utility.
126 struct eisa_cfg_mem {
127 bus_addr_t ecm_addr;
128 bus_size_t ecm_size;
129 int ecm_isram;
130 int ecm_decode;
131 int ecm_unitsize;
134 struct eisa_cfg_irq {
135 int eci_irq;
136 int eci_ist;
137 int eci_shared;
140 struct eisa_cfg_dma {
141 int ecd_drq;
142 int ecd_shared;
143 int ecd_size;
144 #define ECD_SIZE_8BIT 0
145 #define ECD_SIZE_16BIT 1
146 #define ECD_SIZE_32BIT 2
147 #define ECD_SIZE_RESERVED 3
148 int ecd_timing;
149 #define ECD_TIMING_ISA 0
150 #define ECD_TIMING_TYPEA 1
151 #define ECD_TIMING_TYPEB 2
152 #define ECD_TIMING_TYPEC 3
155 struct eisa_cfg_io {
156 bus_addr_t ecio_addr;
157 bus_size_t ecio_size;
158 int ecio_shared;
161 #endif /* _DEV_EISA_EISAVAR_H_ */