Home | History | Annotate | Line # | Download | only in dev
grf_conf.c revision 1.6
      1 /*	$NetBSD: grf_conf.c,v 1.6 2003/08/07 16:30:23 agc Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1990, 1993
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * This code is derived from software contributed to Berkeley by
      8  * the Systems Programming Group of the University of Utah Computer
      9  * Science Department.
     10  *
     11  * Redistribution and use in source and binary forms, with or without
     12  * modification, are permitted provided that the following conditions
     13  * are met:
     14  * 1. Redistributions of source code must retain the above copyright
     15  *    notice, this list of conditions and the following disclaimer.
     16  * 2. Redistributions in binary form must reproduce the above copyright
     17  *    notice, this list of conditions and the following disclaimer in the
     18  *    documentation and/or other materials provided with the distribution.
     19  * 3. Neither the name of the University nor the names of its contributors
     20  *    may be used to endorse or promote products derived from this software
     21  *    without specific prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  * from: Utah $Hdr: grf_conf.c 1.2 92/01/22$
     36  *
     37  *	@(#)grf_conf.c	8.1 (Berkeley) 6/10/93
     38  */
     39 /*
     40  * Copyright (c) 1991 University of Utah.
     41  *
     42  * This code is derived from software contributed to Berkeley by
     43  * the Systems Programming Group of the University of Utah Computer
     44  * Science Department.
     45  *
     46  * Redistribution and use in source and binary forms, with or without
     47  * modification, are permitted provided that the following conditions
     48  * are met:
     49  * 1. Redistributions of source code must retain the above copyright
     50  *    notice, this list of conditions and the following disclaimer.
     51  * 2. Redistributions in binary form must reproduce the above copyright
     52  *    notice, this list of conditions and the following disclaimer in the
     53  *    documentation and/or other materials provided with the distribution.
     54  * 3. All advertising materials mentioning features or use of this software
     55  *    must display the following acknowledgement:
     56  *	This product includes software developed by the University of
     57  *	California, Berkeley and its contributors.
     58  * 4. Neither the name of the University nor the names of its contributors
     59  *    may be used to endorse or promote products derived from this software
     60  *    without specific prior written permission.
     61  *
     62  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     63  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     64  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     65  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     66  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     67  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     68  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     69  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     70  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     71  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     72  * SUCH DAMAGE.
     73  *
     74  * from: Utah $Hdr: grf_conf.c 1.2 92/01/22$
     75  *
     76  *	@(#)grf_conf.c	8.1 (Berkeley) 6/10/93
     77  */
     78 
     79 /*
     80  * XXX this information could be generated by config.
     81  */
     82 
     83 #include <sys/cdefs.h>
     84 __KERNEL_RCSID(0, "$NetBSD: grf_conf.c,v 1.6 2003/08/07 16:30:23 agc Exp $");
     85 
     86 #include <sys/types.h>
     87 #include <sys/device.h>
     88 
     89 #include <machine/grfioctl.h>
     90 
     91 #include <x68k/dev/grfvar.h>
     92 #include <x68k/x68k/iodevice.h>
     93 /*#include <x68k/dev/grfreg.h>*/
     94 
     95 int cc_init __P((struct grf_softc *, caddr_t));
     96 int cc_mode __P((struct grf_softc *, u_long, caddr_t));
     97 int gv_init __P((struct grf_softc *, caddr_t));
     98 int gv_mode __P((struct grf_softc *, u_long, caddr_t));
     99 #if 0
    100 extern	int tc_init(), tc_mode();
    101 extern	int gb_init(), gb_mode();
    102 extern	int rb_init(), rb_mode();
    103 extern	int dv_init(), dv_mode();
    104 extern	int hy_init(), hy_mode();
    105 #endif
    106 
    107 struct grfsw grfsw[] = {
    108 	{GID_BUILTIN,	GRFBUILTIN,	"builtin",	  cc_init, cc_mode},
    109 	{GID_GVRAM,	GRFBUILTIN,	"graphic",	  gv_init, gv_mode},
    110 #if 0
    111 	{GID_TOPCAT,	GRFBOBCAT,	"topcat",	  tc_init, tc_mode},
    112 	{GID_GATORBOX,	GRFGATOR,	"gatorbox",	  gb_init, gb_mode},
    113 	{GID_RENAISSANCE,GRFRBOX,	"renaissance",	  rb_init, rb_mode},
    114 	{GID_LRCATSEYE,	GRFCATSEYE,	"lo-res catseye", tc_init, tc_mode,
    115 	{GID_HRCCATSEYE,GRFCATSEYE,	"hi-res catseye", tc_init, tc_mode},
    116 	{GID_HRMCATSEYE,GRFCATSEYE,	"hi-res catseye", tc_init, tc_mode},
    117 	{GID_DAVINCI,	GRFDAVINCI,	"davinci",	  dv_init, dv_mode},
    118 	{GID_HYPERION,	GRFHYPERION,	"hyperion",	  hy_init, hy_mode},
    119 #endif
    120 };
    121 int	ngrfsw = sizeof(grfsw) / sizeof(grfsw[0]);
    122 
    123 #if 0 /* XXX? */
    124 #include "ite.h"
    125 #if NITE > 0
    126 
    127 #include <x68k/dev/itevar.h>
    128 
    129 extern	u_char ite_readbyte();
    130 extern	int ite_writeglyph();
    131 extern	int topcat_scroll(), topcat_init(), topcat_deinit();
    132 extern	int topcat_clear(), topcat_putc(), topcat_cursor();
    133 extern	int gbox_scroll(), gbox_init(), gbox_deinit();
    134 extern	int gbox_clear(), gbox_putc(), gbox_cursor();
    135 extern	int rbox_scroll(), rbox_init(), rbox_deinit();
    136 extern	int rbox_clear(), rbox_putc(), rbox_cursor();
    137 extern	int dvbox_scroll(), dvbox_init(), dvbox_deinit();
    138 extern	int dvbox_clear(), dvbox_putc(), dvbox_cursor();
    139 extern	int hyper_scroll(), hyper_init(), hyper_deinit();
    140 extern	int hyper_clear(), hyper_putc(), hyper_cursor();
    141 
    142 struct itesw itesw[] = {
    143 	GID_TOPCAT,
    144 	topcat_init,	topcat_deinit,	topcat_clear,	topcat_putc,
    145 	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph,
    146 	GID_GATORBOX,
    147 	gbox_init,	gbox_deinit,	gbox_clear,	gbox_putc,
    148 	gbox_cursor,	gbox_scroll,	ite_readbyte,	ite_writeglyph,
    149 	GID_RENAISSANCE,
    150 	rbox_init,	rbox_deinit,	rbox_clear,	rbox_putc,
    151 	rbox_cursor,	rbox_scroll,	ite_readbyte,	ite_writeglyph,
    152 	GID_LRCATSEYE,
    153 	topcat_init,	topcat_deinit,	topcat_clear,	topcat_putc,
    154 	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph,
    155 	GID_HRCCATSEYE,
    156 	topcat_init,	topcat_deinit,	topcat_clear,	topcat_putc,
    157 	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph,
    158 	GID_HRMCATSEYE,
    159 	topcat_init,	topcat_deinit,	topcat_clear,	topcat_putc,
    160 	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph,
    161 	GID_DAVINCI,
    162 	dvbox_init,	dvbox_deinit,	dvbox_clear,	dvbox_putc,
    163 	dvbox_cursor,	dvbox_scroll,	ite_readbyte,	ite_writeglyph,
    164 	GID_HYPERION,
    165 	hyper_init,	hyper_deinit,	hyper_clear,	hyper_putc,
    166 	hyper_cursor,	hyper_scroll,	ite_readbyte,	ite_writeglyph,
    167 };
    168 int	nitesw = sizeof(itesw) / sizeof(itesw[0]);
    169 #endif
    170 #endif /* 0 */
    171