Home | History | Annotate | Line # | Download | only in gio
lightreg.h revision 1.1
      1 /*	$Id: lightreg.h,v 1.1 2006/12/26 04:28:16 rumble Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 2006 Stephen M. Rumble
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. The name of the author may not be used to endorse or promote products
     13  *    derived from this software without specific prior written permission.
     14  *
     15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25  */
     26 
     27 #ifndef _ARCH_SGIMIPS_GIO_LIGHTREG_H_
     28 #define _ARCH_SGIMIPS_GIO_LIGHTREG_H_
     29 
     30 #define LIGHT_ADDR_0		0x1f3f0000
     31 #define LIGHT_ADDR_1		0x1f3f8000	/* dual head */
     32 
     33 #define REX_PAGE0_SET		0x00000000	/* REX registers */
     34 #define REX_PAGE0_GO		0x00000800
     35 #define REX_PAGE1_SET		0x00004790	/* configuration registers */
     36 #define REX_PAGE1_GO		0x00004F90
     37 
     38 /* REX register offsets (from REX_PAGE0_{SET,GO}) */
     39 #define REX_COMMAND		0x00000000
     40 #define REX_XSTARTI		0x0000000C
     41 #define REX_YSTARTI		0x0000001C
     42 #define REX_XYMOVE		0x00000034
     43 #define REX_COLORREDI		0x00000038
     44 #define REX_COLORGREENI		0x00000040
     45 #define REX_COLORBLUEI		0x00000048
     46 #define REX_COLORBACK		0x0000005C
     47 #define REX_ZPATTERN		0x00000060
     48 #define REX_XENDI		0x00000084
     49 #define REX_YENDI		0x00000088
     50 
     51 /* configuration register offsets (from REX_PAGE1_{SET,GO}) */
     52 #define REX_CFG_WCLOCK		0x00000054	/* nsclock / revision */
     53 #define REX_CFG_CONFIGSEL	0x0000005c	/* function selector */
     54 #define REX_CFG_CONFIGMODE	0x00000068	/* REX system config */
     55 
     56 /* REX opcodes */
     57 #define REX_OPCODE_NOP		0x00000000
     58 #define REX_OPCODE_DRAW		0x00000001
     59 
     60 /* REX command flags */
     61 #define REX_OPFLG_BLOCK		0x00000008
     62 #define REX_OPFLG_LENGTH32	0x00000010
     63 #define REX_OPFLG_QUADMODE	0x00000020
     64 #define REX_OPFLG_XYCONTINUE	0x00000080
     65 #define REX_OPFLG_STOPONX	0x00000100
     66 #define REX_OPFLG_STOPONY	0x00000200
     67 #define REX_OPFLG_ENZPATTERN	0x00000400
     68 #define REX_OPFLG_LOGICSRC	0x00080000
     69 #define REX_OPFLG_ZOPAQUE	0x00800000
     70 #define REX_OPFLG_ZCONTINUE	0x01000000
     71 
     72 /* REX logicops */
     73 #define REX_LOGICOP_SRC		0x30000000
     74 
     75 /* configmode bits */
     76 #define REX_BUSY		0x00000001
     77 
     78 #endif	/* !_ARCH_SGIMIPS_GIO_LIGHTREG_H_ */
     79