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