Home | History | Annotate | Line # | Download | only in dev
grfvar.h revision 1.10.52.1
      1  1.10.52.1     skrll /*	$NetBSD: grfvar.h,v 1.10.52.1 2009/04/28 07:33:47 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.8       agc  *
      7        1.8       agc  * This code is derived from software contributed to Berkeley by
      8        1.8       agc  * the Systems Programming Group of the University of Utah Computer
      9        1.8       agc  * Science Department.
     10        1.8       agc  *
     11        1.8       agc  * Redistribution and use in source and binary forms, with or without
     12        1.8       agc  * modification, are permitted provided that the following conditions
     13        1.8       agc  * are met:
     14        1.8       agc  * 1. Redistributions of source code must retain the above copyright
     15        1.8       agc  *    notice, this list of conditions and the following disclaimer.
     16        1.8       agc  * 2. Redistributions in binary form must reproduce the above copyright
     17        1.8       agc  *    notice, this list of conditions and the following disclaimer in the
     18        1.8       agc  *    documentation and/or other materials provided with the distribution.
     19        1.8       agc  * 3. Neither the name of the University nor the names of its contributors
     20        1.8       agc  *    may be used to endorse or promote products derived from this software
     21        1.8       agc  *    without specific prior written permission.
     22        1.8       agc  *
     23        1.8       agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24        1.8       agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25        1.8       agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26        1.8       agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27        1.8       agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28        1.8       agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29        1.8       agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30        1.8       agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31        1.8       agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32        1.8       agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33        1.8       agc  * SUCH DAMAGE.
     34        1.8       agc  *
     35        1.8       agc  * from: Utah $Hdr: grfvar.h 1.9 91/01/21$
     36        1.8       agc  *
     37        1.8       agc  *	@(#)grfvar.h	7.3 (Berkeley) 5/7/91
     38        1.8       agc  */
     39        1.8       agc /*
     40        1.8       agc  * Copyright (c) 1988 University of Utah.
     41        1.1       leo  *
     42        1.1       leo  * This code is derived from software contributed to Berkeley by
     43        1.1       leo  * the Systems Programming Group of the University of Utah Computer
     44        1.1       leo  * Science Department.
     45        1.1       leo  *
     46        1.1       leo  * Redistribution and use in source and binary forms, with or without
     47        1.1       leo  * modification, are permitted provided that the following conditions
     48        1.1       leo  * are met:
     49        1.1       leo  * 1. Redistributions of source code must retain the above copyright
     50        1.1       leo  *    notice, this list of conditions and the following disclaimer.
     51        1.1       leo  * 2. Redistributions in binary form must reproduce the above copyright
     52        1.1       leo  *    notice, this list of conditions and the following disclaimer in the
     53        1.1       leo  *    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.10  christos 	void *		g_data;		/* device dependent data	*/
    104  1.10.52.1     skrll 	int		(*g_mode)(struct grf_softc *, int, void *,
    105  1.10.52.1     skrll 								int, int);
    106        1.1       leo 	int		g_conpri;	/* priority of ite as console	*/
    107  1.10.52.1     skrll 	void		(*g_iteinit)(struct ite_softc *);
    108  1.10.52.1     skrll 	void		(*g_itedeinit)(struct ite_softc *);
    109  1.10.52.1     skrll 	void		(*g_iteclear)(struct ite_softc *, int, int,
    110  1.10.52.1     skrll 								int, int);
    111  1.10.52.1     skrll 	void		(*g_iteputc)(struct ite_softc *, int, int,
    112  1.10.52.1     skrll 								int, int);
    113  1.10.52.1     skrll 	void		(*g_itecursor)(struct ite_softc *, int);
    114  1.10.52.1     skrll 	void		(*g_itescroll)(struct ite_softc *, int, int,
    115  1.10.52.1     skrll 								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.10.52.1     skrll int  grf_mode(struct grf_softc *, int, void *, int, int);
    149  1.10.52.1     skrll void grf_viewsync(struct grf_softc *);
    150        1.4       leo 
    151        1.4       leo extern struct grf_softc *grfsp[]; /* XXX */
    152        1.4       leo #endif /* _KERNEL */
    153