grf_conf.c revision 1.9 1 1.9 christos /* $NetBSD: grf_conf.c,v 1.9 2007/03/04 06:01:06 christos Exp $ */
2 1.1 oki
3 1.1 oki /*
4 1.1 oki * Copyright (c) 1990, 1993
5 1.1 oki * The Regents of the University of California. All rights reserved.
6 1.1 oki *
7 1.1 oki * This code is derived from software contributed to Berkeley by
8 1.1 oki * the Systems Programming Group of the University of Utah Computer
9 1.1 oki * Science Department.
10 1.1 oki *
11 1.1 oki * Redistribution and use in source and binary forms, with or without
12 1.1 oki * modification, are permitted provided that the following conditions
13 1.1 oki * are met:
14 1.1 oki * 1. Redistributions of source code must retain the above copyright
15 1.1 oki * notice, this list of conditions and the following disclaimer.
16 1.1 oki * 2. Redistributions in binary form must reproduce the above copyright
17 1.1 oki * notice, this list of conditions and the following disclaimer in the
18 1.1 oki * documentation and/or other materials provided with the distribution.
19 1.6 agc * 3. Neither the name of the University nor the names of its contributors
20 1.6 agc * may be used to endorse or promote products derived from this software
21 1.6 agc * without specific prior written permission.
22 1.6 agc *
23 1.6 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.6 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.6 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.6 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.6 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.6 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.6 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.6 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.6 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.6 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.6 agc * SUCH DAMAGE.
34 1.6 agc *
35 1.6 agc * from: Utah $Hdr: grf_conf.c 1.2 92/01/22$
36 1.6 agc *
37 1.6 agc * @(#)grf_conf.c 8.1 (Berkeley) 6/10/93
38 1.6 agc */
39 1.6 agc /*
40 1.6 agc * Copyright (c) 1991 University of Utah.
41 1.6 agc *
42 1.6 agc * This code is derived from software contributed to Berkeley by
43 1.6 agc * the Systems Programming Group of the University of Utah Computer
44 1.6 agc * Science Department.
45 1.6 agc *
46 1.6 agc * Redistribution and use in source and binary forms, with or without
47 1.6 agc * modification, are permitted provided that the following conditions
48 1.6 agc * are met:
49 1.6 agc * 1. Redistributions of source code must retain the above copyright
50 1.6 agc * notice, this list of conditions and the following disclaimer.
51 1.6 agc * 2. Redistributions in binary form must reproduce the above copyright
52 1.6 agc * notice, this list of conditions and the following disclaimer in the
53 1.6 agc * documentation and/or other materials provided with the distribution.
54 1.1 oki * 3. All advertising materials mentioning features or use of this software
55 1.1 oki * must display the following acknowledgement:
56 1.1 oki * This product includes software developed by the University of
57 1.1 oki * California, Berkeley and its contributors.
58 1.1 oki * 4. Neither the name of the University nor the names of its contributors
59 1.1 oki * may be used to endorse or promote products derived from this software
60 1.1 oki * without specific prior written permission.
61 1.1 oki *
62 1.1 oki * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63 1.1 oki * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 1.1 oki * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65 1.1 oki * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
66 1.1 oki * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 1.1 oki * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68 1.1 oki * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 1.1 oki * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 1.1 oki * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 1.1 oki * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 1.1 oki * SUCH DAMAGE.
73 1.1 oki *
74 1.1 oki * from: Utah $Hdr: grf_conf.c 1.2 92/01/22$
75 1.1 oki *
76 1.1 oki * @(#)grf_conf.c 8.1 (Berkeley) 6/10/93
77 1.1 oki */
78 1.1 oki
79 1.1 oki /*
80 1.1 oki * XXX this information could be generated by config.
81 1.1 oki */
82 1.5 lukem
83 1.5 lukem #include <sys/cdefs.h>
84 1.9 christos __KERNEL_RCSID(0, "$NetBSD: grf_conf.c,v 1.9 2007/03/04 06:01:06 christos Exp $");
85 1.1 oki
86 1.1 oki #include <sys/types.h>
87 1.1 oki #include <sys/device.h>
88 1.1 oki
89 1.3 minoura #include <machine/grfioctl.h>
90 1.3 minoura
91 1.1 oki #include <x68k/dev/grfvar.h>
92 1.1 oki #include <x68k/x68k/iodevice.h>
93 1.1 oki
94 1.9 christos int cc_init(struct grf_softc *, void *);
95 1.9 christos int cc_mode(struct grf_softc *, u_long, void *);
96 1.9 christos int gv_init(struct grf_softc *, void *);
97 1.9 christos int gv_mode(struct grf_softc *, u_long, void *);
98 1.1 oki
99 1.1 oki struct grfsw grfsw[] = {
100 1.7 minoura {0 /* unused */, GRFBUILTIN, "builtin", cc_init, cc_mode},
101 1.7 minoura {0 /* unused */, GRFBUILTIN, "graphic", gv_init, gv_mode},
102 1.1 oki };
103 1.1 oki int ngrfsw = sizeof(grfsw) / sizeof(grfsw[0]);
104