Home | History | Annotate | Line # | Download | only in dev
p4reg.h revision 1.1
      1  1.1  jeremy /*	$NetBSD: p4reg.h,v 1.1 1997/04/09 04:50:43 jeremy Exp $	*/
      2  1.1  jeremy 
      3  1.1  jeremy /*
      4  1.1  jeremy  * Copyright (c) 1996 Jason R. Thorpe.  All rights reserved.
      5  1.1  jeremy  * Copyright (c) 1995 Theo de Raadt
      6  1.1  jeremy  * All rights reserved.
      7  1.1  jeremy  *
      8  1.1  jeremy  * Redistribution and use in source and binary forms, with or without
      9  1.1  jeremy  * modification, are permitted provided that the following conditions
     10  1.1  jeremy  * are met:
     11  1.1  jeremy  * 1. Redistributions of source code must retain the above copyright
     12  1.1  jeremy  *    notice, this list of conditions and the following disclaimer.
     13  1.1  jeremy  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1  jeremy  *    notice, this list of conditions and the following disclaimer in the
     15  1.1  jeremy  *    documentation and/or other materials provided with the distribution.
     16  1.1  jeremy  * 3. All advertising materials mentioning features or use of this software
     17  1.1  jeremy  *    must display the following acknowledgement:
     18  1.1  jeremy  *	This product includes software developed by Theo de Raadt.
     19  1.1  jeremy  * 4. The name of the author may not be used to endorse or promote products
     20  1.1  jeremy  *    derived from this software without specific prior written permission.
     21  1.1  jeremy  *
     22  1.1  jeremy  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     23  1.1  jeremy  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24  1.1  jeremy  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25  1.1  jeremy  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     26  1.1  jeremy  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     27  1.1  jeremy  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  1.1  jeremy  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  1.1  jeremy  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  1.1  jeremy  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     31  1.1  jeremy  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  jeremy  */
     33  1.1  jeremy 
     34  1.1  jeremy /*
     35  1.1  jeremy  * pfour framebuffer registers.
     36  1.1  jeremy  */
     37  1.1  jeremy 
     38  1.1  jeremy /* Offset of bwtwo framebuffer from pfour register */
     39  1.1  jeremy #define PFOUR_BW_OFF		0x00100000
     40  1.1  jeremy 
     41  1.1  jeremy /* Offsets for color framebuffers */
     42  1.1  jeremy #define PFOUR_COLOR_OFF_OVERLAY	0x00100000
     43  1.1  jeremy #define PFOUR_COLOR_OFF_ENABLE	0x00300000
     44  1.1  jeremy #define PFOUR_COLOR_OFF_COLOR	0x00500000
     45  1.1  jeremy #define PFOUR_COLOR_OFF_END	0x00700000
     46  1.1  jeremy #define PFOUR_COLOR_OFF_CMAP	0xfff00000	/* (-0x00100000) */
     47  1.1  jeremy 
     48  1.1  jeremy #define PFOUR_REG_DIAG		0x80
     49  1.1  jeremy #define PFOUR_REG_READBACKCLR	0x40
     50  1.1  jeremy #define PFOUR_REG_VIDEO		0x20
     51  1.1  jeremy #define PFOUR_REG_SYNC		0x10
     52  1.1  jeremy #define PFOUR_REG_VTRACE	0x08
     53  1.1  jeremy #define PFOUR_REG_INT		0x04
     54  1.1  jeremy #define PFOUR_REG_INTCLR	0x04
     55  1.1  jeremy #define PFOUR_REG_INTEN		0x02
     56  1.1  jeremy #define PFOUR_REG_FIRSTHALF	0x01
     57  1.1  jeremy #define PFOUR_REG_RESET		0x01
     58  1.1  jeremy 
     59  1.1  jeremy #define PFOUR_FBTYPE_MASK	0x7f000000
     60  1.1  jeremy #define	PFOUR_FBTYPE(x)		((x) >> 24)
     61  1.1  jeremy 
     62  1.1  jeremy #define	PFOUR_ID_MASK		0xf0
     63  1.1  jeremy #define PFOUR_ID(x)		(PFOUR_FBTYPE((x)) == PFOUR_ID_COLOR24 ? \
     64  1.1  jeremy 				    PFOUR_ID_COLOR24 : \
     65  1.1  jeremy 				    PFOUR_FBTYPE((x)) & PFOUR_ID_MASK)
     66  1.1  jeremy #define PFOUR_ID_BW		0x00	/* monochrome */
     67  1.1  jeremy #define PFOUR_ID_FASTCOLOR	0x60	/* accelerated 8-bit color */
     68  1.1  jeremy #define PFOUR_ID_COLOR8P1	0x40	/* 8-bit color + overlay */
     69  1.1  jeremy #define PFOUR_ID_COLOR24	0x45	/* 24-bit color + overlay */
     70  1.1  jeremy 
     71  1.1  jeremy #define PFOUR_SIZE_MASK		0x0f
     72  1.1  jeremy #define PFOUR_SIZE(x)		(PFOUR_FBTYPE((x)) & PFOUR_SIZE_MASK)
     73  1.1  jeremy #define PFOUR_SIZE_1152X900	0x01
     74  1.1  jeremy #define PFOUR_SIZE_1024X1024	0x02
     75  1.1  jeremy #define PFOUR_SIZE_1280X1024	0x03
     76  1.1  jeremy #define PFOUR_SIZE_1600X1280	0x00
     77  1.1  jeremy #define PFOUR_SIZE_1440X1440	0x04
     78  1.1  jeremy #define PFOUR_SIZE_640X480	0x05
     79  1.1  jeremy 
     80  1.1  jeremy #define PFOUR_NOTPFOUR		-1
     81