isa_machdep.c revision 1.8 1 /* $NetBSD: isa_machdep.c,v 1.8 1997/04/07 23:40:17 cgd Exp $ */
2
3 /*
4 * Copyright (c) 1995, 1996 Carnegie-Mellon University.
5 * All rights reserved.
6 *
7 * Author: Chris G. Demetriou
8 *
9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation.
14 *
15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 *
19 * Carnegie Mellon requests users of this software to return to
20 *
21 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
25 *
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
28 */
29
30 /*
31 * Machine-specific functions for ISA autoconfiguration.
32 */
33
34 #include <machine/options.h> /* Config options headers */
35 #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
36
37 __KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.8 1997/04/07 23:40:17 cgd Exp $");
38
39 #include <sys/types.h>
40 #include <sys/param.h>
41 #include <sys/time.h>
42 #include <sys/systm.h>
43 #include <sys/errno.h>
44 #include <sys/device.h>
45 #include <vm/vm.h>
46
47 #include <dev/isa/isavar.h>
48
49 #include "vga_isa.h"
50 #if NVGA_ISA
51 #include <alpha/isa/vga_isavar.h>
52 #endif
53
54 struct {
55 int (*probe) __P((bus_space_tag_t, bus_space_tag_t));
56 void (*console) __P((bus_space_tag_t, bus_space_tag_t));
57 } isa_display_console_devices[] = {
58 #if NVGA_ISA
59 { vga_isa_console_match, vga_isa_console_attach },
60 #endif
61 { },
62 };
63
64 void
65 isa_display_console(iot, memt)
66 bus_space_tag_t iot, memt;
67 {
68 int i = 0;
69
70 while (isa_display_console_devices[i].probe != NULL)
71 if ((*isa_display_console_devices[i].probe)(iot, memt)) {
72 (*isa_display_console_devices[i].console)(iot, memt);
73 break;
74 }
75 }
76