Home | History | Annotate | Line # | Download | only in sbus
tcxreg.h revision 1.2
      1  1.2  perry /*	$NetBSD: tcxreg.h,v 1.2 2005/02/27 00:27:48 perry Exp $ */
      2  1.2  perry /*
      3  1.1     pk  *  Copyright (c) 1996 The NetBSD Foundation, Inc.
      4  1.1     pk  *  All rights reserved.
      5  1.2  perry  *
      6  1.1     pk  *  This code is derived from software contributed to The NetBSD Foundation
      7  1.1     pk  *  by Paul Kranenburg.
      8  1.2  perry  *
      9  1.1     pk  *  Redistribution and use in source and binary forms, with or without
     10  1.1     pk  *  modification, are permitted provided that the following conditions
     11  1.1     pk  *  are met:
     12  1.1     pk  *  1. Redistributions of source code must retain the above copyright
     13  1.1     pk  *     notice, this list of conditions and the following disclaimer.
     14  1.1     pk  *  2. Redistributions in binary form must reproduce the above copyright
     15  1.1     pk  *     notice, this list of conditions and the following disclaimer in the
     16  1.1     pk  *     documentation and/or other materials provided with the distribution.
     17  1.1     pk  *  3. All advertising materials mentioning features or use of this software
     18  1.1     pk  *     must display the following acknowledgement:
     19  1.1     pk  *         This product includes software developed by the NetBSD
     20  1.1     pk  *         Foundation, Inc. and its contributors.
     21  1.1     pk  *  4. Neither the name of The NetBSD Foundation nor the names of its
     22  1.1     pk  *     contributors may be used to endorse or promote products derived
     23  1.1     pk  *     from this software without specific prior written permission.
     24  1.2  perry  *
     25  1.1     pk  *  THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     26  1.1     pk  *  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     27  1.1     pk  *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     28  1.1     pk  *  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     29  1.1     pk  *  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     30  1.1     pk  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     31  1.1     pk  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     32  1.1     pk  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     33  1.1     pk  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     34  1.1     pk  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     35  1.1     pk  *  POSSIBILITY OF SUCH DAMAGE.
     36  1.2  perry  */
     37  1.1     pk 
     38  1.1     pk /*
     39  1.1     pk  * A TCX is composed of numerous groups of control registers, all with TLAs:
     40  1.1     pk  *	DHC - ???
     41  1.1     pk  *	TEC - transform engine control?
     42  1.1     pk  *	THC - TEC Hardware Configuration
     43  1.1     pk  *	ROM - a 128Kbyte ROM with who knows what in it.
     44  1.1     pk  *	STIP - ???
     45  1.1     pk  *	RSTIP - Raw ???
     46  1.1     pk  *	BLIT - ???
     47  1.1     pk  *	RBLIT - Raw ???
     48  1.1     pk  *	ALT - ???
     49  1.1     pk  *	colormap - see below
     50  1.1     pk  *	frame buffer memory (video RAM)
     51  1.1     pk  *	possible other stuff
     52  1.1     pk  *
     53  1.1     pk  */
     54  1.1     pk #define TCX_REG_DFB8	0
     55  1.1     pk #define TCX_REG_DFB24	1
     56  1.1     pk #define TCX_REG_STIP	2
     57  1.1     pk #define TCX_REG_BLIT	3
     58  1.1     pk #define TCX_REG_RDFB32	4
     59  1.1     pk #define TCX_REG_RSTIP	5
     60  1.1     pk #define TCX_REG_RBLIT	6
     61  1.1     pk #define TCX_REG_TEC	7
     62  1.1     pk #define TCX_REG_CMAP	8
     63  1.1     pk #define TCX_REG_THC	9
     64  1.1     pk #define TCX_REG_ROM	10
     65  1.1     pk #define TCX_REG_DHC	11
     66  1.1     pk #define TCX_REG_ALT	12
     67  1.1     pk 
     68  1.1     pk #define TCX_NREG	13
     69  1.1     pk 
     70  1.1     pk 
     71  1.1     pk /*
     72  1.1     pk  * The layout of the THC.
     73  1.1     pk  */
     74  1.1     pk struct tcx_thc {
     75  1.1     pk 	u_int	thc_config;
     76  1.1     pk 	u_int	thc_xxx1[31];
     77  1.1     pk 	u_int	thc_sensebus;
     78  1.1     pk 	u_int	thc_xxx2[3];
     79  1.1     pk 	u_int	thc_delay;
     80  1.1     pk 	u_int	thc_strapping;
     81  1.1     pk 	u_int	thc_xxx3[1];
     82  1.1     pk 	u_int	thc_linecount;
     83  1.1     pk 	u_int	thc_xxx4[478];
     84  1.1     pk 	u_int	thc_hcmisc;
     85  1.1     pk 	u_int	thc_xxx5[56];
     86  1.1     pk 	u_int	thc_cursoraddr;
     87  1.1     pk 	u_int	thc_cursorAdata[32];
     88  1.1     pk 	u_int	thc_cursorBdata[32];
     89  1.1     pk 
     90  1.1     pk };
     91  1.1     pk /* bits in thc_config ??? */
     92  1.1     pk #define THC_CFG_FBID		0xf0000000	/* id mask */
     93  1.1     pk #define THC_CFG_FBID_SHIFT	28
     94  1.1     pk #define THC_CFG_SENSE		0x07000000	/* sense mask */
     95  1.1     pk #define THC_CFG_SENSE_SHIFT	24
     96  1.1     pk #define THC_CFG_REV		0x00f00000	/* revision mask */
     97  1.1     pk #define THC_CFG_REV_SHIFT	20
     98  1.1     pk #define THC_CFG_RST		0x00008000	/* reset */
     99  1.1     pk 
    100  1.1     pk /* bits in thc_hcmisc */
    101  1.1     pk #define	THC_MISC_OPENFLG	0x80000000	/* open flag (what's that?) */
    102  1.1     pk #define	THC_MISC_SWERR_EN	0x20000000	/* enable SW error interrupt */
    103  1.1     pk #define	THC_MISC_VSYNC_LEVEL	0x08000000	/* vsync level when disabled */
    104  1.1     pk #define	THC_MISC_HSYNC_LEVEL	0x04000000	/* hsync level when disabled */
    105  1.1     pk #define	THC_MISC_VSYNC_DISABLE	0x02000000	/* vsync disable */
    106  1.1     pk #define	THC_MISC_HSYNC_DISABLE	0x01000000	/* hsync disable */
    107  1.1     pk #define	THC_MISC_XXX1		0x00ffe000	/* unused */
    108  1.1     pk #define	THC_MISC_RESET		0x00001000	/* ??? */
    109  1.1     pk #define	THC_MISC_XXX2		0x00000800	/* unused */
    110  1.1     pk #define	THC_MISC_VIDEN		0x00000400	/* video enable */
    111  1.1     pk #define	THC_MISC_SYNC		0x00000200	/* not sure what ... */
    112  1.1     pk #define	THC_MISC_VSYNC		0x00000100	/* ... these really are */
    113  1.1     pk #define	THC_MISC_SYNCEN		0x00000080	/* sync enable */
    114  1.1     pk #define	THC_MISC_CURSRES	0x00000040	/* cursor resolution */
    115  1.1     pk #define	THC_MISC_INTEN		0x00000020	/* v.retrace intr enable */
    116  1.1     pk #define	THC_MISC_INTR		0x00000010	/* intr pending / ack bit */
    117  1.1     pk #define	THC_MISC_DACWAIT	0x0000000f	/* ??? */
    118  1.1     pk 
    119  1.1     pk /*
    120  1.1     pk  * Partial description of TEC.
    121  1.1     pk  */
    122  1.1     pk struct tcx_tec {
    123  1.1     pk 	u_int	tec_config;	/* what's in it? */
    124  1.1     pk 	u_int	tec_xxx0[35];
    125  1.1     pk 	u_int	tec_delay;	/* */
    126  1.1     pk #define TEC_DELAY_SYNC		0x00000f00
    127  1.1     pk #define TEC_DELAY_WR_F		0x000000c0
    128  1.1     pk #define TEC_DELAY_WR_R		0x00000030
    129  1.1     pk #define TEC_DELAY_SOE_F		0x0000000c
    130  1.1     pk #define TEC_DELAY_SOE_S		0x00000003
    131  1.1     pk 	u_int	tec_strapping;	/* */
    132  1.1     pk #define TEC_STRAP_FIFO_LIMIT	0x00f00000
    133  1.1     pk #define TEC_STRAP_CACHE_EN	0x00010000
    134  1.1     pk #define TEC_STRAP_ZERO_OFFSET	0x00008000
    135  1.1     pk #define TEC_STRAP_REFRSH_DIS	0x00004000
    136  1.1     pk #define TEC_STRAP_REF_LOAD	0x00001000
    137  1.1     pk #define TEC_STRAP_REFRSH_PERIOD	0x000003ff
    138  1.1     pk 	u_int	tec_hcmisc;	/* */
    139  1.1     pk 	u_int	tec_linecount;	/* */
    140  1.1     pk 	u_int	tec_hss;	/* */
    141  1.1     pk 	u_int	tec_hse;	/* */
    142  1.1     pk 	u_int	tec_hds;	/* */
    143  1.1     pk 	u_int	tec_hsedvs;	/* */
    144  1.1     pk 	u_int	tec_hde;	/* */
    145  1.1     pk 	u_int	tec_vss;	/* */
    146  1.1     pk 	u_int	tec_vse;	/* */
    147  1.1     pk 	u_int	tec_vds;	/* */
    148  1.1     pk 	u_int	tec_vde;	/* */
    149  1.1     pk };
    150  1.1     pk 
    151