FreeBSD/Linux Kernel Cross Reference
sys/i386ipsc/conf.c
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * Copyright 1988, 1989, 1990, 1991 by Intel Corporation,
28 * Santa Clara, California.
29 *
30 * All Rights Reserved
31 *
32 * Permission to use, copy, modify, and distribute this software and its
33 * documentation for any purpose and without fee is hereby granted,
34 * provided that the above copyright notice appears in all copies and that
35 * both the copyright notice and this permission notice appear in
36 * supporting documentation, and that the name of Intel not be used in
37 * advertising or publicity pertaining to distribution of the software
38 * without specific, written prior permission.
39 *
40 * INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
41 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
42 * SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
43 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
44 * PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS
45 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
46 * THIS SOFTWARE.
47 */
48 /*
49 * HISTORY
50 * $Log: conf.c,v $
51 * Revision 2.6 92/02/23 22:43:13 elf
52 * Added getstat routine to md driver.
53 * [92/02/22 19:56:40 af]
54 *
55 * Revision 2.5 91/12/10 16:29:52 jsb
56 * Fixes from Intel
57 * [91/12/10 15:32:10 jsb]
58 *
59 * Revision 2.4 91/08/28 11:11:55 jsb
60 * Added entries for new dev_info field.
61 * [91/08/27 17:54:02 jsb]
62 *
63 * Revision 2.3 91/06/18 20:50:11 jsb
64 * New copyright from Intel.
65 * [91/06/18 20:05:51 jsb]
66 *
67 * Revision 2.2 90/12/04 14:47:04 jsb
68 * First checkin.
69 * [90/12/04 10:55:41 jsb]
70 *
71 */
72
73 /*
74 * Device switch for ipsc.
75 */
76
77 #include <device/conf.h>
78
79 extern int block_io_mmap();
80
81 extern int timeopen(), timeclose(), timemmap();
82 #define timename "time"
83
84 extern int ioplopen(), ioplclose(), ioplmmap();
85 #define ioplname "iopl"
86
87 #include <sd.h>
88 #if NSD > 0
89 extern int sdopen(), sdclose(), sdread(), sdwrite();
90 #define sdname "sd"
91 #endif
92
93 #include <usm.h>
94 #if NUSM > 0
95 extern int usmopen(), usmclose(), usmread(), usmwrite();
96 extern int usmgetstat(), usmsetstat(), usmportdeath();
97 #define usmname "usm"
98 #endif
99
100 #include <cnp.h>
101 #if NCNP > 0
102 extern int cnpopen(), cnpoutput(), cnpgetstat(), cnpsetstat(),
103 cnpsetinput();
104 #define cnpname "cnp"
105 #endif NCNP > 0
106
107 #include <md.h>
108 #if NMD > 0
109 extern int mdopen(), mdclose(), mdread(), mdwrite(), md_get_status();
110 #define mdname "md"
111 #endif
112
113 /*
114 * List of devices - console must be at slot 0
115 */
116 struct dev_ops dev_name_list[] =
117 {
118 /*name, open, close, read,
119 write, getstat, setstat, mmap,
120 async_in, reset, port_death, subdev,
121 dev_info */
122
123 #if NUSM > 0
124 { usmname, usmopen, usmclose, usmread,
125 usmwrite, usmgetstat, usmsetstat, nulldev,
126 nodev, nulldev, usmportdeath, 0,
127 nodev },
128 #endif
129 #if NSD > 0
130 { sdname, sdopen, sdclose, sdread,
131 sdwrite, nulldev, nulldev, nulldev,
132 nodev, nulldev, nulldev, 16,
133 nodev },
134 #endif
135 #if NCNP > 0
136 { cnpname, cnpopen, nulldev, nulldev,
137 cnpoutput, cnpgetstat, cnpsetstat, nulldev,
138 cnpsetinput, nulldev, nulldev, 0,
139 nodev },
140 #endif
141 #if NMD > 0
142 { mdname, mdopen, mdclose, mdread,
143 mdwrite, md_get_status, nulldev, nulldev,
144 nodev, nulldev, nulldev, 4,
145 nodev },
146 #endif
147 { timename, timeopen, timeclose, nulldev,
148 nulldev, nulldev, nulldev, timemmap,
149 nodev, nulldev, nulldev, 0,
150 nodev },
151
152 { ioplname, ioplopen, ioplclose, nodev,
153 nodev, nodev, nodev, ioplmmap,
154 nodev, nulldev, nulldev, 0,
155 nodev },
156 };
157 int dev_name_count = sizeof(dev_name_list)/sizeof(dev_name_list[0]);
158
159 /*
160 * Indirect list.
161 */
162 struct dev_indirect dev_indirect_list[] = {
163
164 /* console */
165 { "console", &dev_name_list[0], 0 }
166 };
167 int dev_indirect_count = sizeof(dev_indirect_list)
168 / sizeof(dev_indirect_list[0]);
Cache object: 8e60b2473f5e94818a71789b223cc493
|