Home | History | Annotate | Line # | Download | only in ee
gsreg.h revision 1.3.16.1
      1  1.3.16.1  rmind /*	$NetBSD: gsreg.h,v 1.3.16.1 2014/05/18 17:45:21 rmind Exp $	*/
      2       1.1    uch 
      3       1.1    uch /*-
      4       1.1    uch  * Copyright (c) 2001 The NetBSD Foundation, Inc.
      5       1.1    uch  * All rights reserved.
      6       1.1    uch  *
      7       1.1    uch  * This code is derived from software contributed to The NetBSD Foundation
      8       1.1    uch  * by UCHIYAMA Yasushi.
      9       1.1    uch  *
     10       1.1    uch  * Redistribution and use in source and binary forms, with or without
     11       1.1    uch  * modification, are permitted provided that the following conditions
     12       1.1    uch  * are met:
     13       1.1    uch  * 1. Redistributions of source code must retain the above copyright
     14       1.1    uch  *    notice, this list of conditions and the following disclaimer.
     15       1.1    uch  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.1    uch  *    notice, this list of conditions and the following disclaimer in the
     17       1.1    uch  *    documentation and/or other materials provided with the distribution.
     18       1.1    uch  *
     19       1.1    uch  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20       1.1    uch  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21       1.1    uch  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22       1.1    uch  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23       1.1    uch  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24       1.1    uch  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25       1.1    uch  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26       1.1    uch  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27       1.1    uch  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28       1.1    uch  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29       1.1    uch  * POSSIBILITY OF SUCH DAMAGE.
     30       1.1    uch  */
     31       1.1    uch 
     32       1.1    uch #define GS_S_PMODE_REG		MIPS_PHYS_TO_KSEG1(0x12000000)
     33       1.1    uch #define GS_S_SMODE1_REG		MIPS_PHYS_TO_KSEG1(0x12000010)
     34       1.1    uch #define GS_S_SMODE2_REG		MIPS_PHYS_TO_KSEG1(0x12000020)
     35       1.1    uch #define GS_S_SRFSH_REG		MIPS_PHYS_TO_KSEG1(0x12000030)
     36       1.1    uch #define GS_S_SYNCH1_REG		MIPS_PHYS_TO_KSEG1(0x12000040)
     37       1.1    uch #define GS_S_SYNCH2_REG		MIPS_PHYS_TO_KSEG1(0x12000050)
     38       1.1    uch #define GS_S_SYNCV_REG		MIPS_PHYS_TO_KSEG1(0x12000060)
     39       1.1    uch #define GS_S_DISPFB1_REG	MIPS_PHYS_TO_KSEG1(0x12000070)
     40       1.1    uch #define GS_S_DISPLAY1_REG	MIPS_PHYS_TO_KSEG1(0x12000080)
     41       1.1    uch #define GS_S_DISPFB2_REG	MIPS_PHYS_TO_KSEG1(0x12000090)
     42       1.1    uch #define GS_S_DISPLAY2_REG	MIPS_PHYS_TO_KSEG1(0x120000a0)
     43       1.1    uch #define GS_S_EXTBUF_REG		MIPS_PHYS_TO_KSEG1(0x120000b0)
     44       1.1    uch #define GS_S_EXTDATA_REG	MIPS_PHYS_TO_KSEG1(0x120000c0)
     45       1.1    uch #define GS_S_EXTWRITE_REG	MIPS_PHYS_TO_KSEG1(0x120000d0)
     46       1.1    uch #define GS_S_BGCOLOR_REG	MIPS_PHYS_TO_KSEG1(0x120000e0)
     47       1.1    uch #define GS_S_CSR_REG		MIPS_PHYS_TO_KSEG1(0x12001000)
     48       1.1    uch #define GS_S_IMR_REG		MIPS_PHYS_TO_KSEG1(0x12001010)
     49       1.1    uch #define GS_S_BUSDIR_REG		MIPS_PHYS_TO_KSEG1(0x12001040)
     50       1.1    uch #define GS_S_SIGLBLID_REG	MIPS_PHYS_TO_KSEG1(0x12001080)
     51       1.1    uch 
     52       1.1    uch #define SMODE1(vhp, vcksel, slck2, nvck, clksel, pevs, pehs, pvs, phs,	\
     53       1.1    uch     gcont, spml, pck2, xpck, sint, prst, ex, cmod, slck, t1248, lc, rc)	\
     54       1.1    uch 	(((u_int64_t)(vhp)	<< 36) |				\
     55       1.1    uch 	((u_int64_t)(vcksel)	<< 34) |				\
     56       1.1    uch 	((u_int64_t)(slck2)	<< 33) |				\
     57       1.1    uch 	((u_int64_t)(nvck)	<< 32) |				\
     58       1.1    uch 	((u_int64_t)(clksel)	<< 30) |				\
     59       1.1    uch 	((u_int64_t)(pevs)	<< 29) |				\
     60       1.1    uch 	((u_int64_t)(pehs)	<< 28) |				\
     61       1.1    uch 	((u_int64_t)(pvs)	<< 27) |				\
     62       1.1    uch 	((u_int64_t)(phs)	<< 26) |				\
     63       1.1    uch 	((u_int64_t)(gcont)	<< 25) |				\
     64       1.1    uch 	((u_int64_t)(spml)	<< 21) |				\
     65       1.1    uch 	((u_int64_t)(pck2)	<< 19) |				\
     66       1.1    uch 	((u_int64_t)(xpck)	<< 18) |				\
     67       1.1    uch 	((u_int64_t)(sint)	<< 17) |				\
     68       1.1    uch 	((u_int64_t)(prst)	<< 16) |				\
     69       1.1    uch 	((u_int64_t)(ex)	<< 15) |				\
     70       1.1    uch 	((u_int64_t)(cmod)	<< 13) |				\
     71       1.1    uch 	((u_int64_t)(slck)	<< 12) |				\
     72       1.1    uch 	((u_int64_t)(t1248)	<< 10) |				\
     73       1.1    uch 	((u_int64_t)(lc)	<<  3) |				\
     74       1.1    uch 	((u_int64_t)(rc)	<<  0))
     75       1.1    uch 
     76       1.1    uch #define SMODE2(dpms, ffmd, inter)					\
     77       1.1    uch 	(((u_int64_t)(dpms)	<< 2)	|				\
     78       1.1    uch 	 ((u_int64_t)(ffmd)	<< 1)	|				\
     79       1.1    uch 	 ((u_int64_t)(inter)	<< 0))
     80       1.1    uch 
     81       1.1    uch #define SRFSH(x)	(x)
     82       1.1    uch 
     83       1.1    uch #define SYNCH1(hs, hsvs, hseq, hbp, hfp)				\
     84       1.1    uch 	(((u_int64_t)(hs)	<< 43) |				\
     85       1.1    uch 	((u_int64_t)(hsvs)	<< 32) |				\
     86       1.1    uch 	((u_int64_t)(hseq)	<< 22) |				\
     87       1.1    uch 	((u_int64_t)(hbp)	<< 11) |				\
     88       1.1    uch 	((u_int64_t)(hfp)	<< 0))
     89       1.1    uch 
     90       1.1    uch #define SYNCH2(hb, hf)							\
     91       1.1    uch 	(((u_int64_t)(hb)	<< 11) |				\
     92       1.1    uch 	((u_int64_t)(hf)	<< 0))
     93       1.1    uch 
     94       1.1    uch #define SYNCV(vs, vdp, vbpe, vbp, vfpe, vfp)				\
     95       1.1    uch 	(((u_int64_t)(vs)	<< 53) |				\
     96       1.1    uch 	((u_int64_t)(vdp)	<< 42) |				\
     97       1.1    uch 	((u_int64_t)(vbpe)	<< 32) |				\
     98       1.1    uch 	((u_int64_t)(vbp)	<< 20) |				\
     99       1.1    uch 	((u_int64_t)(vfpe)	<< 10) |				\
    100       1.1    uch 	((u_int64_t)(vfp)	<< 0))
    101       1.1    uch 
    102       1.1    uch #define DISPLAY(dh, dw, magv, magh, dy, dx)				\
    103       1.1    uch 	(((u_int64_t)(dh)	<< 44)	|				\
    104       1.1    uch 	 ((u_int64_t)(dw)	<< 32)	|				\
    105       1.1    uch 	 ((u_int64_t)(magv)	<< 27)	|				\
    106       1.1    uch 	 ((u_int64_t)(magh)	<< 23)	|				\
    107       1.1    uch 	 ((u_int64_t)(dy)	<< 12)	|				\
    108       1.1    uch 	 ((u_int64_t)(dx)	<<  0))
    109