Home | History | Annotate | Line # | Download | only in dev
grfvar.h revision 1.7.6.1
      1  1.7.6.1  skrll /*	$NetBSD: grfvar.h,v 1.7.6.1 2004/08/03 10:33:11 skrll Exp $	*/
      2      1.1    leo 
      3      1.1    leo /*
      4      1.1    leo  * Copyright (c) 1990 The Regents of the University of California.
      5      1.1    leo  * All rights reserved.
      6      1.1    leo  *
      7      1.1    leo  * This code is derived from software contributed to Berkeley by
      8      1.1    leo  * the Systems Programming Group of the University of Utah Computer
      9      1.1    leo  * Science Department.
     10      1.1    leo  *
     11      1.1    leo  * Redistribution and use in source and binary forms, with or without
     12      1.1    leo  * modification, are permitted provided that the following conditions
     13      1.1    leo  * are met:
     14      1.1    leo  * 1. Redistributions of source code must retain the above copyright
     15      1.1    leo  *    notice, this list of conditions and the following disclaimer.
     16      1.1    leo  * 2. Redistributions in binary form must reproduce the above copyright
     17      1.1    leo  *    notice, this list of conditions and the following disclaimer in the
     18      1.1    leo  *    documentation and/or other materials provided with the distribution.
     19  1.7.6.1  skrll  * 3. Neither the name of the University nor the names of its contributors
     20  1.7.6.1  skrll  *    may be used to endorse or promote products derived from this software
     21  1.7.6.1  skrll  *    without specific prior written permission.
     22  1.7.6.1  skrll  *
     23  1.7.6.1  skrll  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  1.7.6.1  skrll  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.7.6.1  skrll  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.7.6.1  skrll  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  1.7.6.1  skrll  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.7.6.1  skrll  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.7.6.1  skrll  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.7.6.1  skrll  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.7.6.1  skrll  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.7.6.1  skrll  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.7.6.1  skrll  * SUCH DAMAGE.
     34  1.7.6.1  skrll  *
     35  1.7.6.1  skrll  * from: Utah $Hdr: grfvar.h 1.9 91/01/21$
     36  1.7.6.1  skrll  *
     37  1.7.6.1  skrll  *	@(#)grfvar.h	7.3 (Berkeley) 5/7/91
     38  1.7.6.1  skrll  */
     39  1.7.6.1  skrll /*
     40  1.7.6.1  skrll  * Copyright (c) 1988 University of Utah.
     41  1.7.6.1  skrll  *
     42  1.7.6.1  skrll  * This code is derived from software contributed to Berkeley by
     43  1.7.6.1  skrll  * the Systems Programming Group of the University of Utah Computer
     44  1.7.6.1  skrll  * Science Department.
     45  1.7.6.1  skrll  *
     46  1.7.6.1  skrll  * Redistribution and use in source and binary forms, with or without
     47  1.7.6.1  skrll  * modification, are permitted provided that the following conditions
     48  1.7.6.1  skrll  * are met:
     49  1.7.6.1  skrll  * 1. Redistributions of source code must retain the above copyright
     50  1.7.6.1  skrll  *    notice, this list of conditions and the following disclaimer.
     51  1.7.6.1  skrll  * 2. Redistributions in binary form must reproduce the above copyright
     52  1.7.6.1  skrll  *    notice, this list of conditions and the following disclaimer in the
     53  1.7.6.1  skrll  *    documentation and/or other materials provided with the distribution.
     54      1.1    leo  * 3. All advertising materials mentioning features or use of this software
     55      1.1    leo  *    must display the following acknowledgement:
     56      1.1    leo  *	This product includes software developed by the University of
     57      1.1    leo  *	California, Berkeley and its contributors.
     58      1.1    leo  * 4. Neither the name of the University nor the names of its contributors
     59      1.1    leo  *    may be used to endorse or promote products derived from this software
     60      1.1    leo  *    without specific prior written permission.
     61      1.1    leo  *
     62      1.1    leo  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     63      1.1    leo  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     64      1.1    leo  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     65      1.1    leo  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     66      1.1    leo  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     67      1.1    leo  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     68      1.1    leo  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     69      1.1    leo  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     70      1.1    leo  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     71      1.1    leo  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     72      1.1    leo  * SUCH DAMAGE.
     73      1.1    leo  *
     74      1.1    leo  * from: Utah $Hdr: grfvar.h 1.9 91/01/21$
     75      1.1    leo  *
     76      1.1    leo  *	@(#)grfvar.h	7.3 (Berkeley) 5/7/91
     77      1.1    leo  */
     78      1.1    leo 
     79      1.4    leo /*
     80      1.4    leo  * Structure passed as 'auxp' during autoconf.
     81      1.4    leo  */
     82      1.4    leo typedef struct {
     83      1.4    leo 	cfprint_t	busprint;	/* grfbusprint function		*/
     84      1.4    leo 	int		from_bus_match;	/* called from grfbusmatch()	*/
     85      1.4    leo 	int		unit;		/* grf-unit we want to attach	*/
     86      1.4    leo } grf_auxp_t;
     87      1.4    leo 
     88      1.1    leo struct ite_softc;
     89      1.1    leo 
     90      1.1    leo /*
     91      1.1    leo  * this struct is owned by the driver (grfcc)
     92      1.1    leo  * and is passed to grf when grf is configed. The ite also
     93      1.1    leo  * uses it...
     94      1.1    leo  */
     95      1.1    leo struct	grf_softc {
     96      1.1    leo 	struct device	g_device;	/* config sets this up.		*/
     97      1.1    leo 	struct grfinfo	g_display;	/* hardware descr. (for ioctl)	*/
     98      1.1    leo 	int		g_flags;	/* software flags		*/
     99      1.1    leo 	int		g_unit;		/* grf unit we want/have	*/
    100      1.1    leo 	dev_t		g_itedev;	/* ite device number		*/
    101      1.1    leo 	dev_t		g_grfdev;	/* grf device number		*/
    102      1.1    leo 	dev_t		g_viewdev;	/* view device number		*/
    103      1.1    leo 	caddr_t		g_data;		/* device dependent data	*/
    104      1.3    leo 	int		(*g_mode) __P((struct grf_softc *, int, void *,
    105      1.3    leo 								int, int));
    106      1.1    leo 	int		g_conpri;	/* priority of ite as console	*/
    107      1.3    leo 	void		(*g_iteinit)   __P((struct ite_softc *));
    108      1.3    leo 	void		(*g_itedeinit) __P((struct ite_softc *));
    109      1.3    leo 	void		(*g_iteclear)  __P((struct ite_softc *, int, int,
    110      1.3    leo 								int, int));
    111      1.3    leo 	void		(*g_iteputc)   __P((struct ite_softc *, int, int,
    112      1.3    leo 								int, int));
    113      1.3    leo 	void		(*g_itecursor) __P((struct ite_softc *, int));
    114      1.3    leo 	void		(*g_itescroll) __P((struct ite_softc *, int, int,
    115      1.3    leo 								int, int));
    116      1.1    leo };
    117      1.1    leo 
    118      1.1    leo /* flags */
    119      1.1    leo #define	GF_ALIVE	0x01
    120      1.1    leo #define GF_OPEN		0x02
    121      1.1    leo #define GF_EXCLUDE	0x04
    122      1.1    leo #define GF_WANTED	0x08
    123      1.1    leo #define GF_GRFON	0x10
    124      1.1    leo 
    125      1.1    leo /* software ids defined in grfioctl.h */
    126      1.1    leo 
    127      1.1    leo /* requests to mode routine (g_mode())*/
    128      1.1    leo #define GM_GRFON		1
    129      1.1    leo #define GM_GRFOFF		2
    130      1.1    leo #define GM_GRFOVON		3
    131      1.1    leo #define GM_GRFOVOFF		4
    132      1.1    leo #define GM_GRFCONFIG		5
    133      1.1    leo #define GM_GRFGETVMODE		6
    134      1.1    leo #define GM_GRFSETVMODE		7
    135      1.1    leo #define GM_GRFGETNUMVM		8
    136      1.1    leo #define GM_GRFGETBANK		9
    137      1.1    leo #define GM_GRFSETBANK		10
    138      1.1    leo #define GM_GRFGETCURBANK	11
    139      1.1    leo #define GM_GRFIOCTL		12
    140      1.1    leo 
    141      1.1    leo /* minor device interpretation */
    142      1.1    leo #define GRFOVDEV	0x10	/* XXX no driver uses yet, overlay planes */
    143      1.1    leo #define GRFIMDEV	0x20	/* XXX no driver uses yet, images planes  */
    144      1.1    leo #define GRFUNIT(d)	((d) & 0x7)
    145      1.4    leo 
    146      1.4    leo #ifdef _KERNEL
    147      1.4    leo 
    148      1.4    leo int  grf_mode __P((struct grf_softc *, int, void *, int, int));
    149      1.4    leo void grf_viewsync __P((struct grf_softc *));
    150      1.4    leo 
    151      1.4    leo extern struct grf_softc *grfsp[]; /* XXX */
    152      1.4    leo #endif /* _KERNEL */
    153