FreeBSD/Linux Kernel Cross Reference
sys/i386at/autoconf.c
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992,1991,1990,1989 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 * HISTORY
28 * $Log: autoconf.c,v $
29 * Revision 2.21 93/11/17 16:41:08 dbg
30 * Added 174x driver (dherity@cs.tcd.ie & ralf@chpc.org)
31 * [93/10/06 af]
32 * Lint.
33 * [93/05/08 11:20:03 af]
34 *
35 * Made it possible to have two Adaptec boards.
36 * [93/05/07 18:37:34 af]
37 *
38 * Added include of standard types.
39 * [93/05/06 09:30:11 af]
40 *
41 * Revision 2.20 93/10/20 15:54:10 dbg
42 * Add clockmc, clockpit for real-time Mach. Purge non-
43 * MACH_KERNEL code. Add ANSI function prototypes.
44 * [93/05/18 dbg]
45 *
46 * Revision 2.19 93/08/10 15:57:38 mrt
47 * Iff rcline != -1, then proberc will turn on the com line first
48 * thing. So the rest of the probe will be reported thru rconsole.
49 * [93/06/08 rvb]
50 *
51 * Revision 2.18 93/05/10 23:24:01 rvb
52 * Added TTD teledebug code used to initialize the teledebugger and
53 * begin setup debugging.
54 * [93/03/01 grm]
55 *
56 * Revision 2.17 93/05/10 21:18:41 rvb
57 * Lint.
58 * [93/05/08 11:20:03 af]
59 *
60 * Made it possible to have two Adaptec boards.
61 * [93/05/07 18:37:34 af]
62 *
63 * Added include of standard types.
64 * [93/05/06 09:30:11 af]
65 *
66 * Revision 2.16 92/04/03 12:08:35 rpd
67 * Use port 0x250, 0x350 for irq 5 bnc, thick respectively.
68 * [92/04/02 rvb]
69 * Tossing (0x3bc) below is the WRONG thing to do!!
70 * [92/03/10 rvb]
71 *
72 * Revision 2.15 92/03/06 13:38:29 rpd
73 * Removed 0x3bc entry for lprdriver until someone can come up
74 * with a better fix.
75 * [92/03/06 13:16:43 jsb]
76 *
77 * Revision 2.14 92/02/19 16:29:36 elf
78 * Re-oder device probes -- disks first.
79 * [92/02/18 rvb]
80 *
81 * Revision 2.13 92/02/19 15:08:08 elf
82 * Made take_dev_irq() print device name instead of XYZ in case of
83 * failure.
84 * [92/01/20 kivinen]
85 *
86 * Added more possible configurations for ns8390driver to be able to
87 * use two wd cards simultaneously.
88 * [92/01/20 kivinen]
89 *
90 * Revision 2.12 92/01/14 16:43:46 rpd
91 * Flush com3 it is hardly every available and would use irq 6 -- a no-no.
92 * [92/01/08 rvb]
93 *
94 * Revision 2.11 91/10/07 17:25:07 af
95 * Allow for second fd controller and fix hd entry.
96 * [91/10/01 15:26:32 rvb]
97 *
98 * Synchronize with 2.5 tables.
99 * [91/09/04 rvb]
100 *
101 * Revision 2.10 91/08/24 11:57:16 af
102 * Use new MI autoconf procedures. Added SCSI.
103 * [91/08/02 02:52:15 af]
104 *
105 * Revision 2.9 91/06/19 11:55:44 rvb
106 * cputypes.h->platforms.h
107 * [91/06/12 13:45:33 rvb]
108 *
109 * Revision 2.8 91/05/14 16:19:38 mrt
110 * Correcting copyright
111 *
112 * Revision 2.7 91/02/05 17:15:58 mrt
113 * Changed to new Mach copyright
114 * [91/02/01 17:41:36 mrt]
115 *
116 * Revision 2.6 91/01/09 19:56:29 rpd
117 * Converted from wd8003 to ns8390.
118 * [91/01/08 rpd]
119 *
120 * Revision 2.4 90/11/26 14:48:56 rvb
121 * jsb beat me to XMK34, sigh ...
122 * [90/11/26 rvb]
123 * Synched 2.5 & 3.0 at I386q (r1.7.1.8) & XMK35 (r2.4)
124 * [90/11/15 rvb]
125 *
126 * Revision 2.3 90/10/01 14:22:53 jeffreyh
127 * added wd ethernet driver
128 * [90/09/27 18:23:07 jeffreyh]
129 *
130 * Revision 1.7.1.7 90/08/25 15:42:34 rvb
131 * Define take_<>_irq() vs direct manipulations of ivect and friends.
132 * Replace single Ctlr[] with one per Ctlr type.
133 * [90/08/20 rvb]
134 *
135 * Added parallel port printer driver.
136 * [90/08/14 mg32]
137 *
138 * Revision 1.7.1.6 90/07/27 11:22:57 rvb
139 * Move wd8003 IRQ to IRQ9.
140 * [90/07/26 rvb]
141 *
142 * Revision 1.7.1.5 90/07/10 11:41:45 rvb
143 * iPSC2: subtype and call dcminit().
144 * [90/06/16 rvb]
145 *
146 * Rework probe and attach to be much more bsd flavored.
147 * [90/06/07 rvb]
148 *
149 * Revision 1.7.1.4 90/06/07 08:04:46 rvb
150 * updated for new hd driver probe/attach [eugene]
151 * (Temporarily disabled.)
152 *
153 * Revision 1.7.1.3 90/05/14 13:17:45 rvb
154 * Copy in slave_config() from loose_ends.c
155 * [90/04/23 rvb]
156 *
157 * Revision 2.2 90/05/03 15:40:37 dbg
158 * Converted for pure kernel.
159 * [90/04/23 dbg]
160 *
161 * Revision 1.7.1.2 90/03/16 18:14:51 rvb
162 * Add 3com 3c501 ether [bernadat]
163 * Also clean up things, at least for ether; there are NO
164 * controllers -- just devices.
165 *
166 * Revision 1.7.1.1 89/10/22 11:29:41 rvb
167 * Call setconf for generic kernels.
168 * [89/10/17 rvb]
169 *
170 * Revision 1.7 89/09/20 17:26:26 rvb
171 * Support ln for ORC
172 * [89/09/20 rvb]
173 *
174 * Revision 1.6 89/09/09 15:19:19 rvb
175 * pc586, qd and com are now configured based on the appropriate .h
176 * files and pccom -> com.
177 * [89/09/09 rvb]
178 *
179 * Revision 1.5 89/07/17 10:34:58 rvb
180 * Olivetti Changes to X79 upto 5/9/89:
181 * An almost legitimate probe routine().
182 * [89/07/11 rvb]
183 *
184 * Revision 1.4 89/02/26 12:25:02 gm0w
185 * Changes for cleanup.
186 *
187 */
188
189 #include <mach_ttd.h>
190
191 #include <mach/std_types.h>
192 #include <kern/kern_io.h>
193 #include <i386/ipl.h>
194 #include <chips/busses.h>
195
196 /* initialization typecasts */
197 #define SPL_FIVE (vm_offset_t)SPL5
198 #define SPL_SIX (vm_offset_t)SPL6
199 #define SPL_TTY (vm_offset_t)SPLTTY
200
201
202 #include <hd.h>
203 #if NHD > 0
204 extern struct bus_driver hddriver;
205 extern int hdintr();
206 #endif /* NHD */
207
208 #include <fd.h>
209 #if NFD > 0
210 extern struct bus_driver fddriver;
211 extern int fdintr();
212 #endif /* NFD */
213
214 #include <aha.h>
215 #if NAHA > 0
216 extern struct bus_driver aha_driver;
217 extern int aha_intr();
218 #endif /* NAHA */
219
220 #include <eaha.h>
221 #if NEAHA > 0
222 extern struct bus_driver eaha_driver;
223 extern int eaha_intr();
224 #endif /* NEAHA */
225
226 #include <pc586.h>
227 #if NPC586 > 0
228 extern struct bus_driver pcdriver;
229 extern int pc586intr();
230 #endif /* NPC586 */
231
232 #include <ns8390.h>
233 #if NNS8390 > 0
234 extern struct bus_driver ns8390driver;
235 extern int ns8390intr();
236 #endif /* NNS8390 */
237
238 #include <at3c501.h>
239 #if NAT3C501 > 0
240 extern struct bus_driver at3c501driver;
241 extern int at3c501intr();
242 #endif /* NAT3C501 */
243
244 #include <com.h>
245 #if NCOM > 0
246 extern struct bus_driver comdriver;
247 extern int comintr();
248 #endif /* NCOM */
249
250 #include <lpr.h>
251 #if NLPR > 0
252 extern struct bus_driver lprdriver;
253 extern int lprintr();
254 #endif /* NLPR */
255
256 #include <wt.h>
257 #if NWT > 0
258 extern struct bus_driver wtdriver;
259 extern int wtintr();
260 #endif /* NWT */
261
262 #include <mc.h>
263 #if NMC > 0
264 extern struct bus_driver mc_driver;
265 extern int mc_intr();
266 #endif
267
268 #include <clockpit.h>
269 #if NCLOCKPIT > 0
270 extern struct bus_driver clockpitdriver;
271 extern int clockpitintr();
272 #endif
273
274 struct bus_ctlr bus_master_init[] = {
275
276 /* driver name unit intr address len phys_address
277 adaptor alive flags spl pic */
278
279 #if NHD > 0
280 {&hddriver, "hdc", 0, hdintr, 0x1f0, 8, 0x1f0,
281 '?', 0, 0, SPL_FIVE, 14},
282
283 {&hddriver, "hdc", 1, hdintr, 0x170, 8, 0x170,
284 '?', 0, 0, SPL_FIVE, 15},
285 #endif /* NHD > 0 */
286
287 #if NAHA > 0
288 {&aha_driver, "ahac", 0, aha_intr, 0x330, 4, 0x330,
289 '?', 0, 0, SPL_FIVE, 11},
290
291 #if NAHA > 1
292
293 {&aha_driver, "ahac", 1, aha_intr, 0x234, 4, 0x234,
294 '?', 0, 0, SPL_FIVE, 12},
295 {&aha_driver, "ahac", 1, aha_intr, 0x230, 4, 0x230,
296 '?', 0, 0, SPL_FIVE, 12},
297 {&aha_driver, "ahac", 1, aha_intr, 0x134, 4, 0x134,
298 '?', 0, 0, SPL_FIVE, 12},
299 {&aha_driver, "ahac", 1, aha_intr, 0x130, 4, 0x130,
300 '?', 0, 0, SPL_FIVE, 12},
301
302 #else
303
304 {&aha_driver, "ahac", 0, aha_intr, 0x334, 4, 0x334,
305 '?', 0, 0, SPL_FIVE, 11},
306 {&aha_driver, "ahac", 0, aha_intr, 0x234, 4, 0x234,
307 '?', 0, 0, SPL_FIVE, 11},
308 {&aha_driver, "ahac", 0, aha_intr, 0x230, 4, 0x230,
309 '?', 0, 0, SPL_FIVE, 11},
310 {&aha_driver, "ahac", 0, aha_intr, 0x134, 4, 0x134,
311 '?', 0, 0, SPL_FIVE, 11},
312 {&aha_driver, "ahac", 0, aha_intr, 0x130, 4, 0x130,
313 '?', 0, 0, SPL_FIVE, 11},
314
315 #endif /* NAHA > 1 */
316 #endif /* NAHA > 0*/
317
318 #if NEAHA > 0
319 {&eaha_driver, "eahac", 0, eaha_intr, 0x0000, 4, 0x0000,
320 '?', 0, 0, SPL_FIVE, 12},
321 {&eaha_driver, "eahac", 0, eaha_intr, 0x1000, 4, 0x1000,
322 '?', 0, 0, SPL_FIVE, 12},
323 {&eaha_driver, "eahac", 0, eaha_intr, 0x2000, 4, 0x2000,
324 '?', 0, 0, SPL_FIVE, 12},
325 {&eaha_driver, "eahac", 0, eaha_intr, 0x3000, 4, 0x3000,
326 '?', 0, 0, SPL_FIVE, 12},
327 {&eaha_driver, "eahac", 0, eaha_intr, 0x4000, 4, 0x4000,
328 '?', 0, 0, SPL_FIVE, 12},
329 {&eaha_driver, "eahac", 0, eaha_intr, 0x5000, 4, 0x5000,
330 '?', 0, 0, SPL_FIVE, 12},
331 {&eaha_driver, "eahac", 0, eaha_intr, 0x6000, 4, 0x6000,
332 '?', 0, 0, SPL_FIVE, 12},
333 {&eaha_driver, "eahac", 0, eaha_intr, 0x7000, 4, 0x7000,
334 '?', 0, 0, SPL_FIVE, 12},
335 {&eaha_driver, "eahac", 0, eaha_intr, 0x8000, 4, 0x8000,
336 '?', 0, 0, SPL_FIVE, 12},
337 {&eaha_driver, "eahac", 0, eaha_intr, 0x9000, 4, 0x9000,
338 '?', 0, 0, SPL_FIVE, 12},
339 {&eaha_driver, "eahac", 0, eaha_intr, 0xa000, 4, 0xa000,
340 '?', 0, 0, SPL_FIVE, 12},
341 {&eaha_driver, "eahac", 0, eaha_intr, 0xb000, 4, 0xb000,
342 '?', 0, 0, SPL_FIVE, 12},
343 {&eaha_driver, "eahac", 0, eaha_intr, 0xc000, 4, 0xc000,
344 '?', 0, 0, SPL_FIVE, 12},
345 {&eaha_driver, "eahac", 0, eaha_intr, 0xd000, 4, 0xd000,
346 '?', 0, 0, SPL_FIVE, 12},
347 {&eaha_driver, "eahac", 0, eaha_intr, 0xe000, 4, 0xe000,
348 '?', 0, 0, SPL_FIVE, 12},
349 {&eaha_driver, "eahac", 0, eaha_intr, 0xf000, 4, 0xf000,
350 '?', 0, 0, SPL_FIVE, 12},
351 #endif /* NEAHA > 0 */
352
353 #if NFD > 0
354 {&fddriver, "fdc", 0, fdintr, 0x3f2, 6, 0x3f2,
355 '?', 0, 0, SPL_FIVE, 6},
356
357 {&fddriver, "fdc", 1, fdintr, 0x372, 6, 0x372,
358 '?', 0, 0, SPL_FIVE, 10},
359 #endif /* NFD > 0 */
360
361 0
362 };
363
364
365 struct bus_device bus_device_init[] = {
366
367 /* driver name unit intr address am phys_address
368 adaptor alive ctlr slave flags *mi *next sysdep sysdep */
369
370 #if NMC > 0
371 {&mc_driver, "mc", 0, mc_intr, 0x70, 0, 0x70,
372 '?', 0, -1, -1, 0, 0, 0, SPLHI, 8},
373 #endif
374 #if NCLOCKPIT > 0
375 {&clockpitdriver, "pit", 0, clockpitintr, 0x40, 0, 0x40,
376 '?', 0, -1, -1, 0, 0, 0, SPLHI, 0},
377 #endif
378
379 #if NHD > 0
380 {&hddriver, "hd", 0, hdintr, 0x104, 8, 0x1f0,
381 '?', 0, 0, 0, 0, 0, 0, SPL_FIVE, 14},
382 {&hddriver, "hd", 1, hdintr, 0x118, 8, 0x1f0,
383 '?', 0, 0, 1, 0, 0, 0, SPL_FIVE, 14},
384 {&hddriver, "hd", 2, hdintr, 0x104, 8, 0x170, /*??*/
385 '?', 0, 1, 0, 0, 0, 0, SPL_FIVE, 15},
386 {&hddriver, "hd", 3, hdintr, 0x118, 8, 0x170,
387 '?', 0, 1, 1, 0, 0, 0, SPL_FIVE, 15},
388 #endif /* NHD > 0 */
389
390 #if NAHA > 0
391 { &aha_driver, "rz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
392 { &aha_driver, "rz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
393 { &aha_driver, "rz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
394 { &aha_driver, "rz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
395 { &aha_driver, "rz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
396 { &aha_driver, "rz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
397 { &aha_driver, "rz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
398 { &aha_driver, "rz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
399
400 { &aha_driver, "tz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
401 { &aha_driver, "tz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
402 { &aha_driver, "tz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
403 { &aha_driver, "tz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
404 { &aha_driver, "tz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
405 { &aha_driver, "tz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
406 { &aha_driver, "tz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
407 { &aha_driver, "tz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
408
409 #if NAHA > 1
410
411 { &aha_driver, "rz", 8, 0, 0x0,0, 0, '?', 0, 1, 0, 0, },
412 { &aha_driver, "rz", 9, 0, 0x0,0, 0, '?', 0, 1, 1, 0, },
413 { &aha_driver, "rz", 10, 0, 0x0,0, 0, '?', 0, 1, 2, 0, },
414 { &aha_driver, "rz", 11, 0, 0x0,0, 0, '?', 0, 1, 3, 0, },
415 { &aha_driver, "rz", 12, 0, 0x0,0, 0, '?', 0, 1, 4, 0, },
416 { &aha_driver, "rz", 13, 0, 0x0,0, 0, '?', 0, 1, 5, 0, },
417 { &aha_driver, "rz", 14, 0, 0x0,0, 0, '?', 0, 1, 6, 0, },
418 { &aha_driver, "rz", 15, 0, 0x0,0, 0, '?', 0, 1, 7, 0, },
419
420 { &aha_driver, "tz", 8, 0, 0x0,0, 0, '?', 0, 1, 0, 0, },
421 { &aha_driver, "tz", 9, 0, 0x0,0, 0, '?', 0, 1, 1, 0, },
422 { &aha_driver, "tz", 10, 0, 0x0,0, 0, '?', 0, 1, 2, 0, },
423 { &aha_driver, "tz", 11, 0, 0x0,0, 0, '?', 0, 1, 3, 0, },
424 { &aha_driver, "tz", 12, 0, 0x0,0, 0, '?', 0, 1, 4, 0, },
425 { &aha_driver, "tz", 13, 0, 0x0,0, 0, '?', 0, 1, 5, 0, },
426 { &aha_driver, "tz", 14, 0, 0x0,0, 0, '?', 0, 1, 6, 0, },
427 { &aha_driver, "tz", 15, 0, 0x0,0, 0, '?', 0, 1, 7, 0, },
428 #endif /* NAHA > 1 */
429 #endif /* NAHA > 0 */
430
431 #if NEAHA > 0
432 { &eaha_driver, "rz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
433 { &eaha_driver, "rz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
434 { &eaha_driver, "rz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
435 { &eaha_driver, "rz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
436 { &eaha_driver, "rz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
437 { &eaha_driver, "rz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
438 { &eaha_driver, "rz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
439 { &eaha_driver, "rz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
440
441 { &eaha_driver, "tz", 0, 0, 0x0,0, 0, '?', 0, 0, 0, 0, },
442 { &eaha_driver, "tz", 1, 0, 0x0,0, 0, '?', 0, 0, 1, 0, },
443 { &eaha_driver, "tz", 2, 0, 0x0,0, 0, '?', 0, 0, 2, 0, },
444 { &eaha_driver, "tz", 3, 0, 0x0,0, 0, '?', 0, 0, 3, 0, },
445 { &eaha_driver, "tz", 4, 0, 0x0,0, 0, '?', 0, 0, 4, 0, },
446 { &eaha_driver, "tz", 5, 0, 0x0,0, 0, '?', 0, 0, 5, 0, },
447 { &eaha_driver, "tz", 6, 0, 0x0,0, 0, '?', 0, 0, 6, 0, },
448 { &eaha_driver, "tz", 7, 0, 0x0,0, 0, '?', 0, 0, 7, 0, },
449 #endif /* NEAHA > 0*/
450
451 #if NFD > 0
452 {&fddriver, "fd", 0, fdintr, 0x3f2, 6, 0x3f2,
453 '?', 0, 0, 0, 0, 0, 0, SPL_FIVE, 6},
454 {&fddriver, "fd", 1, fdintr, 0x3f2, 6, 0x3f2,
455 '?', 0, 0, 1, 0, 0, 0, SPL_FIVE, 6},
456
457 {&fddriver, "fd", 2, fdintr, 0x372, 6, 0x372,
458 '?', 0, 1, 0, 0, 0, 0, SPL_FIVE, 10},
459 {&fddriver, "fd", 3, fdintr, 0x372, 6, 0x372,
460 '?', 0, 1, 1, 0, 0, 0, SPL_FIVE, 10},
461 #endif /* NFD > 0 */
462
463 #if NPC586 > 0
464 /* For MACH Default */
465 {&pcdriver, "pc", 0, pc586intr, 0xd0000, 0, 0xd0000,
466 '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 9},
467 /* For Factory Default */
468 {&pcdriver, "pc", 0, pc586intr, 0xc0000, 0, 0xc0000,
469 '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
470 /* For what Intel Ships */
471 {&pcdriver, "pc", 0, pc586intr, 0xf00000, 0, 0xf00000,
472 '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 12},
473 #endif /* NPC586 > 0 */
474
475 #if NNS8390 > 0
476 /* "wd" and "el" */
477 {&ns8390driver, "wd", 0, ns8390intr, 0x280,0x2000,0xd0000,
478 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
479 {&ns8390driver, "wd", 0, ns8390intr, 0x2a0,0x2000,0xd0000,
480 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
481 {&ns8390driver, "wd", 0, ns8390intr, 0x2e0,0x2000,0xd0000,
482 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
483 {&ns8390driver, "wd", 0, ns8390intr, 0x300,0x2000,0xd0000,
484 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
485 {&ns8390driver, "wd", 0, ns8390intr, 0x250,0x2000,0xd0000,
486 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
487 {&ns8390driver, "wd", 0, ns8390intr, 0x350,0x2000,0xd0000,
488 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 5},
489 {&ns8390driver, "wd", 0, ns8390intr, 0x240,0x2000,0xd0000,
490 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 11},
491 {&ns8390driver, "wd", 1, ns8390intr, 0x340,0x2000,0xe8000,
492 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 15},
493 #endif /* NNS8390 > 0 */
494
495 #if NAT3C501 > 0
496 {&at3c501driver, "et", 0, at3c501intr, 0x300, 0,0x300,
497 '?', 0, -1, -1, 0, 0, 0, SPL_SIX, 9},
498 #endif /* NAT3C501 > 0 */
499
500 #if NCOM > 0
501 {&comdriver, "com", 0, comintr, 0x3f8, 8, 0x3f8,
502 '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 4},
503 {&comdriver, "com", 1, comintr, 0x2f8, 8, 0x2f8,
504 '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 3},
505 {&comdriver, "com", 2, comintr, 0x3e8, 8, 0x3e8,
506 '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 5},
507 #endif /* NCOM > 0 */
508
509 #if NLPR > 0
510 {&lprdriver, "lpr", 0, lprintr, 0x378, 3, 0x378,
511 '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
512 {&lprdriver, "lpr", 0, lprintr, 0x278, 3, 0x278,
513 '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
514 {&lprdriver, "lpr", 0, lprintr, 0x3bc, 3, 0x3bc,
515 '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
516 #endif /* NLPR > 0 */
517
518 #if NWT > 0
519 {&wtdriver, "wt", 0, wtintr, 0x300, 2, 0x300,
520 '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
521 {&wtdriver, "wt", 0, wtintr, 0x288, 2, 0x288,
522 '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
523 {&wtdriver, "wt", 0, wtintr, 0x388, 2, 0x388,
524 '?', 0, -1, -1, 0, 0, 0, SPL_FIVE, 5},
525 #endif /* NWT > 0 */
526
527 0
528 };
529
530 /*
531 * probeio:
532 *
533 * Probe and subsequently attach devices out on the AT bus.
534 *
535 *
536 */
537 void probeio(void)
538 {
539 register struct bus_device *device;
540 register struct bus_ctlr *master;
541 int i = 0;
542
543 for (master = bus_master_init; master->driver; master++)
544 if (configure_bus_master(master->name, master->address,
545 master->phys_address, i, "atbus"))
546 i++;
547
548 for (device = bus_device_init; device->driver; device++) {
549 /* ignore what we (should) have found already */
550 if (device->alive || device->ctlr != -1)
551 continue;
552 if (configure_bus_device(device->name, device->address,
553 device->phys_address, i, "atbus"))
554 i++;
555 }
556
557 #if MACH_TTD
558 /*
559 * Initialize Remote kernel debugger.
560 */
561 ttd_init();
562 #endif /* MACH_TTD */
563 }
564
565 void proberc(void)
566 {
567 register struct bus_device *device;
568 int i = 0;
569 extern int rcline;
570
571 if (rcline == -1) return;
572
573 for (device = bus_device_init; device->driver; device++) {
574 if (device->driver == &comdriver && device->unit == rcline)
575 configure_bus_device(device->name, device->address,
576 device->phys_address, i, "atbus");
577 }
578 }
579
580 void take_dev_irq(
581 struct bus_device *dev)
582 {
583 int pic = (int)dev->sysdep1;
584
585 if (intpri[pic] == 0) {
586 iunit[pic] = dev->unit;
587 ivect[pic] = dev->intr;
588 intpri[pic] = (int)dev->sysdep;
589 form_pic_mask();
590 } else {
591 printf("The device below will clobber IRQ %d.\n", pic);
592 printf("You have two devices at the same IRQ.\n");
593 printf("This won't work. Reconfigure your hardware and try again.\n");
594 printf("%s%d: port = %x, spl = %d, pic = %d.\n",
595 dev->name, dev->unit, dev->address,
596 dev->sysdep, dev->sysdep1);
597 while (1);
598 }
599
600 }
601
602 void take_ctlr_irq(
603 struct bus_ctlr *ctlr)
604 {
605 int pic = ctlr->sysdep1;
606 if (intpri[pic] == 0) {
607 iunit[pic] = ctlr->unit;
608 ivect[pic] = ctlr->intr;
609 intpri[pic] = (int)ctlr->sysdep;
610 form_pic_mask();
611 } else {
612 printf("The device below will clobber IRQ %d.\n", pic);
613 printf("You have two devices at the same IRQ. This won't work.\n");
614 printf("Reconfigure your hardware and try again.\n");
615 while (1);
616 }
617 }
Cache object: d3553239fa8e20e400f77a5591e83a80
|