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