Home | History | Annotate | Line # | Download | only in pci
      1  1.5  macallan /*	$NetBSD: machfbreg.h,v 1.5 2012/08/15 15:39:23 macallan Exp $	*/
      2  1.1  junyoung 
      3  1.1  junyoung /*
      4  1.1  junyoung  * Copyright 1992,1993,1994,1995,1996,1997 by Kevin E. Martin, Chapel Hill, North Carolina.
      5  1.1  junyoung  *
      6  1.1  junyoung  * Permission to use, copy, modify, distribute, and sell this software and
      7  1.1  junyoung  * its documentation for any purpose is hereby granted without fee,
      8  1.1  junyoung  * provided that the above copyright notice appear in all copies and that
      9  1.1  junyoung  * both that copyright notice and this permission notice appear in
     10  1.1  junyoung  * supporting documentation, and that the name of Kevin E. Martin not be
     11  1.1  junyoung  * used in advertising or publicity pertaining to distribution of the
     12  1.1  junyoung  * software without specific, written prior permission.  Kevin E. Martin
     13  1.1  junyoung  * makes no representations about the suitability of this software for any
     14  1.1  junyoung  * purpose.  It is provided "as is" without express or implied warranty.
     15  1.1  junyoung  *
     16  1.1  junyoung  * KEVIN E. MARTIN, RICKARD E. FAITH, AND TIAGO GONS DISCLAIM ALL
     17  1.1  junyoung  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
     18  1.1  junyoung  * WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
     19  1.1  junyoung  * AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
     20  1.1  junyoung  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     21  1.1  junyoung  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     22  1.1  junyoung  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
     23  1.1  junyoung  * SOFTWARE.
     24  1.1  junyoung  *
     25  1.1  junyoung  * Modified for the Mach-8 by Rickard E. Faith (faith (at) cs.unc.edu)
     26  1.1  junyoung  * Modified for the Mach32 by Kevin E. Martin (martin (at) cs.unc.edu)
     27  1.1  junyoung  * Modified for the Mach64 by Kevin E. Martin (martin (at) cs.unc.edu)
     28  1.1  junyoung  */
     29  1.1  junyoung 
     30  1.5  macallan /* BARs */
     31  1.5  macallan #define MACH64_BAR_APERTURE	0x10 /* all mach64 have this */
     32  1.5  macallan #define MACH64_BAR_IO		0x14 /* most mach64 have this */
     33  1.5  macallan #define MACH64_BAR_MMIO		0x18 /* Rage Pro and newer */
     34  1.5  macallan 
     35  1.1  junyoung /* NON-GUI MEMORY MAPPED Registers - expressed in BYTE offsets */
     36  1.1  junyoung 
     37  1.1  junyoung #define CRTC_H_TOTAL_DISP       0x0000  /* Dword offset 00 */
     38  1.1  junyoung #define CRTC_H_SYNC_STRT_WID    0x0004  /* Dword offset 01 */
     39  1.1  junyoung #define CRTC_V_TOTAL_DISP       0x0008  /* Dword offset 02 */
     40  1.1  junyoung #define CRTC_V_SYNC_STRT_WID    0x000C  /* Dword offset 03 */
     41  1.1  junyoung #define CRTC_VLINE_CRNT_VLINE   0x0010  /* Dword offset 04 */
     42  1.1  junyoung #define CRTC_OFF_PITCH          0x0014  /* Dword offset 05 */
     43  1.1  junyoung #define CRTC_INT_CNTL           0x0018  /* Dword offset 06 */
     44  1.1  junyoung #define CRTC_GEN_CNTL           0x001C  /* Dword offset 07 */
     45  1.1  junyoung 
     46  1.1  junyoung #define DSP_CONFIG              0x0020  /* Dword offset 08 */
     47  1.1  junyoung #define DSP_ON_OFF              0x0024  /* Dword offset 09 */
     48  1.1  junyoung 
     49  1.1  junyoung #define SHARED_CNTL             0x0038  /* Dword offset 0E */
     50  1.1  junyoung 
     51  1.1  junyoung #define OVR_CLR                 0x0040  /* Dword offset 10 */
     52  1.1  junyoung #define OVR_WID_LEFT_RIGHT      0x0044  /* Dword offset 11 */
     53  1.1  junyoung #define OVR_WID_TOP_BOTTOM      0x0048  /* Dword offset 12 */
     54  1.1  junyoung 
     55  1.1  junyoung #define CUR_CLR0                0x0060  /* Dword offset 18 */
     56  1.1  junyoung #define CUR_CLR1                0x0064  /* Dword offset 19 */
     57  1.1  junyoung #define CUR_OFFSET              0x0068  /* Dword offset 1A */
     58  1.1  junyoung #define CUR_HORZ_VERT_POSN      0x006C  /* Dword offset 1B */
     59  1.1  junyoung #define CUR_HORZ_VERT_OFF       0x0070  /* Dword offset 1C */
     60  1.1  junyoung 
     61  1.1  junyoung #define HW_DEBUG                0x007C  /* Dword offset 1F */
     62  1.1  junyoung 
     63  1.1  junyoung #define SCRATCH_REG0            0x0080  /* Dword offset 20 */
     64  1.1  junyoung #define SCRATCH_REG1            0x0084  /* Dword offset 21 */
     65  1.1  junyoung 
     66  1.1  junyoung #define CLOCK_CNTL              0x0090  /* Dword offset 24 */
     67  1.1  junyoung 
     68  1.1  junyoung #define BUS_CNTL                0x00A0  /* Dword offset 28 */
     69  1.1  junyoung 
     70  1.1  junyoung #define LCD_INDEX               0x00A4  /* Dword offset 29 (LTPro) */
     71  1.1  junyoung #define LCD_DATA                0x00A8  /* Dword offset 2A (LTPro) */
     72  1.1  junyoung 
     73  1.1  junyoung #define MEM_CNTL                0x00B0  /* Dword offset 2C */
     74  1.1  junyoung 
     75  1.1  junyoung #define MEM_VGA_WP_SEL          0x00B4  /* Dword offset 2D */
     76  1.1  junyoung #define MEM_VGA_RP_SEL          0x00B8  /* Dword offset 2E */
     77  1.1  junyoung 
     78  1.1  junyoung #define DAC_REGS                0x00C0  /* Dword offset 30 */
     79  1.1  junyoung #define DAC_WINDEX		0x00C0  /* Dword offset 30 */
     80  1.1  junyoung #define DAC_DATA                0x00C1  /* Dword offset 30 */
     81  1.1  junyoung #define DAC_MASK                0x00C2  /* Dword offset 30 */
     82  1.1  junyoung #define DAC_RINDEX		0x00C3  /* Dword offset 30 */
     83  1.1  junyoung #define DAC_CNTL                0x00C4  /* Dword offset 31 */
     84  1.1  junyoung 
     85  1.1  junyoung #define HORZ_STRETCHING         0x00C8  /* Dword offset 32 (LT) */
     86  1.1  junyoung #define VERT_STRETCHING         0x00CC  /* Dword offset 33 (LT) */
     87  1.1  junyoung 
     88  1.1  junyoung #define GEN_TEST_CNTL           0x00D0  /* Dword offset 34 */
     89  1.1  junyoung 
     90  1.1  junyoung #define LCD_GEN_CNTL            0x00D4  /* Dword offset 35 (LT) */
     91  1.1  junyoung #define POWER_MANAGEMENT        0x00D8  /* Dword offset 36 (LT) */
     92  1.1  junyoung 
     93  1.1  junyoung #define CONFIG_CNTL		0x00DC	/* Dword offset 37 (CT, ET, VT) */
     94  1.1  junyoung #define CONFIG_CHIP_ID          0x00E0  /* Dword offset 38 */
     95  1.1  junyoung #define CONFIG_STAT0            0x00E4  /* Dword offset 39 */
     96  1.1  junyoung #define CONFIG_STAT1            0x00E8  /* Dword offset 3A */
     97  1.1  junyoung 
     98  1.1  junyoung 
     99  1.1  junyoung /* GUI MEMORY MAPPED Registers */
    100  1.1  junyoung 
    101  1.1  junyoung #define DST_OFF_PITCH           0x0100  /* Dword offset 40 */
    102  1.1  junyoung #define DST_X                   0x0104  /* Dword offset 41 */
    103  1.1  junyoung #define DST_Y                   0x0108  /* Dword offset 42 */
    104  1.1  junyoung #define DST_Y_X                 0x010C  /* Dword offset 43 */
    105  1.1  junyoung #define DST_WIDTH               0x0110  /* Dword offset 44 */
    106  1.1  junyoung #define DST_HEIGHT              0x0114  /* Dword offset 45 */
    107  1.1  junyoung #define DST_HEIGHT_WIDTH        0x0118  /* Dword offset 46 */
    108  1.1  junyoung #define DST_X_WIDTH             0x011C  /* Dword offset 47 */
    109  1.1  junyoung #define DST_BRES_LNTH           0x0120  /* Dword offset 48 */
    110  1.1  junyoung #define DST_BRES_ERR            0x0124  /* Dword offset 49 */
    111  1.1  junyoung #define DST_BRES_INC            0x0128  /* Dword offset 4A */
    112  1.1  junyoung #define DST_BRES_DEC            0x012C  /* Dword offset 4B */
    113  1.1  junyoung #define DST_CNTL                0x0130  /* Dword offset 4C */
    114  1.1  junyoung 
    115  1.1  junyoung #define SRC_OFF_PITCH           0x0180  /* Dword offset 60 */
    116  1.1  junyoung #define SRC_X                   0x0184  /* Dword offset 61 */
    117  1.1  junyoung #define SRC_Y                   0x0188  /* Dword offset 62 */
    118  1.1  junyoung #define SRC_Y_X                 0x018C  /* Dword offset 63 */
    119  1.1  junyoung #define SRC_WIDTH1              0x0190  /* Dword offset 64 */
    120  1.1  junyoung #define SRC_HEIGHT1             0x0194  /* Dword offset 65 */
    121  1.1  junyoung #define SRC_HEIGHT1_WIDTH1      0x0198  /* Dword offset 66 */
    122  1.1  junyoung #define SRC_X_START             0x019C  /* Dword offset 67 */
    123  1.1  junyoung #define SRC_Y_START             0x01A0  /* Dword offset 68 */
    124  1.1  junyoung #define SRC_Y_X_START           0x01A4  /* Dword offset 69 */
    125  1.1  junyoung #define SRC_WIDTH2              0x01A8  /* Dword offset 6A */
    126  1.1  junyoung #define SRC_HEIGHT2             0x01AC  /* Dword offset 6B */
    127  1.1  junyoung #define SRC_HEIGHT2_WIDTH2      0x01B0  /* Dword offset 6C */
    128  1.1  junyoung #define SRC_CNTL                0x01B4  /* Dword offset 6D */
    129  1.1  junyoung 
    130  1.1  junyoung #define HOST_DATA0              0x0200  /* Dword offset 80 */
    131  1.1  junyoung #define HOST_DATA1              0x0204  /* Dword offset 81 */
    132  1.1  junyoung #define HOST_DATA2              0x0208  /* Dword offset 82 */
    133  1.1  junyoung #define HOST_DATA3              0x020C  /* Dword offset 83 */
    134  1.1  junyoung #define HOST_DATA4              0x0210  /* Dword offset 84 */
    135  1.1  junyoung #define HOST_DATA5              0x0214  /* Dword offset 85 */
    136  1.1  junyoung #define HOST_DATA6              0x0218  /* Dword offset 86 */
    137  1.1  junyoung #define HOST_DATA7              0x021C  /* Dword offset 87 */
    138  1.1  junyoung #define HOST_DATA8              0x0220  /* Dword offset 88 */
    139  1.1  junyoung #define HOST_DATA9              0x0224  /* Dword offset 89 */
    140  1.1  junyoung #define HOST_DATAA              0x0228  /* Dword offset 8A */
    141  1.1  junyoung #define HOST_DATAB              0x022C  /* Dword offset 8B */
    142  1.1  junyoung #define HOST_DATAC              0x0230  /* Dword offset 8C */
    143  1.1  junyoung #define HOST_DATAD              0x0234  /* Dword offset 8D */
    144  1.1  junyoung #define HOST_DATAE              0x0238  /* Dword offset 8E */
    145  1.1  junyoung #define HOST_DATAF              0x023C  /* Dword offset 8F */
    146  1.1  junyoung #define HOST_CNTL               0x0240  /* Dword offset 90 */
    147  1.1  junyoung 
    148  1.1  junyoung #define PAT_REG0                0x0280  /* Dword offset A0 */
    149  1.1  junyoung #define PAT_REG1                0x0284  /* Dword offset A1 */
    150  1.1  junyoung #define PAT_CNTL                0x0288  /* Dword offset A2 */
    151  1.1  junyoung 
    152  1.1  junyoung #define SC_LEFT                 0x02A0  /* Dword offset A8 */
    153  1.1  junyoung #define SC_RIGHT                0x02A4  /* Dword offset A9 */
    154  1.1  junyoung #define SC_LEFT_RIGHT           0x02A8  /* Dword offset AA */
    155  1.1  junyoung #define SC_TOP                  0x02AC  /* Dword offset AB */
    156  1.1  junyoung #define SC_BOTTOM               0x02B0  /* Dword offset AC */
    157  1.1  junyoung #define SC_TOP_BOTTOM           0x02B4  /* Dword offset AD */
    158  1.1  junyoung 
    159  1.1  junyoung #define DP_BKGD_CLR             0x02C0  /* Dword offset B0 */
    160  1.1  junyoung #define DP_FRGD_CLR             0x02C4  /* Dword offset B1 */
    161  1.1  junyoung #define DP_WRITE_MASK           0x02C8  /* Dword offset B2 */
    162  1.1  junyoung #define DP_CHAIN_MASK           0x02CC  /* Dword offset B3 */
    163  1.1  junyoung #define DP_PIX_WIDTH            0x02D0  /* Dword offset B4 */
    164  1.1  junyoung #define DP_MIX                  0x02D4  /* Dword offset B5 */
    165  1.1  junyoung #define DP_SRC                  0x02D8  /* Dword offset B6 */
    166  1.1  junyoung 
    167  1.1  junyoung #define CLR_CMP_CLR             0x0300  /* Dword offset C0 */
    168  1.1  junyoung #define CLR_CMP_MASK            0x0304  /* Dword offset C1 */
    169  1.1  junyoung #define CLR_CMP_CNTL            0x0308  /* Dword offset C2 */
    170  1.1  junyoung 
    171  1.1  junyoung #define FIFO_STAT               0x0310  /* Dword offset C4 */
    172  1.1  junyoung 
    173  1.1  junyoung #define CONTEXT_MASK            0x0320  /* Dword offset C8 */
    174  1.1  junyoung #define CONTEXT_LOAD_CNTL       0x032C  /* Dword offset CB */
    175  1.1  junyoung 
    176  1.1  junyoung #define GUI_TRAJ_CNTL           0x0330  /* Dword offset CC */
    177  1.1  junyoung #define GUI_STAT                0x0338  /* Dword offset CE */
    178  1.1  junyoung 
    179  1.1  junyoung 
    180  1.1  junyoung /* CRTC control values */
    181  1.1  junyoung 
    182  1.1  junyoung #define CRTC_HSYNC_NEG		0x00200000
    183  1.1  junyoung #define CRTC_VSYNC_NEG		0x00200000
    184  1.1  junyoung 
    185  1.1  junyoung #define CRTC_DBL_SCAN_EN	0x00000001
    186  1.1  junyoung #define CRTC_INTERLACE_EN	0x00000002
    187  1.1  junyoung #define CRTC_HSYNC_DIS		0x00000004
    188  1.1  junyoung #define CRTC_VSYNC_DIS		0x00000008
    189  1.1  junyoung #define CRTC_CSYNC_EN		0x00000010
    190  1.1  junyoung #define CRTC_PIX_BY_2_EN	0x00000020
    191  1.1  junyoung 
    192  1.2  macallan #define CRTC_DISPLAY_DIS        0x00000040
    193  1.2  macallan 
    194  1.1  junyoung #define CRTC_PIX_WIDTH		0x00000700
    195  1.1  junyoung #define CRTC_PIX_WIDTH_4BPP	0x00000100
    196  1.1  junyoung #define CRTC_PIX_WIDTH_8BPP	0x00000200
    197  1.1  junyoung #define CRTC_PIX_WIDTH_15BPP	0x00000300
    198  1.1  junyoung #define CRTC_PIX_WIDTH_16BPP	0x00000400
    199  1.1  junyoung #define CRTC_PIX_WIDTH_24BPP	0x00000500
    200  1.1  junyoung #define CRTC_PIX_WIDTH_32BPP	0x00000600
    201  1.1  junyoung 
    202  1.1  junyoung #define CRTC_BYTE_PIX_ORDER	0x00000800
    203  1.1  junyoung #define CRTC_PIX_ORDER_MSN_LSN	0x00000000
    204  1.1  junyoung #define CRTC_PIX_ORDER_LSN_MSN	0x00000800
    205  1.1  junyoung 
    206  1.1  junyoung #define CRTC_FIFO_LWM		0x000f0000
    207  1.1  junyoung #define CRTC_LOCK_REGS		0x00400000
    208  1.1  junyoung #define CRTC_EXT_DISP_EN	0x01000000
    209  1.1  junyoung #define CRTC_EXT_EN		0x02000000
    210  1.1  junyoung 
    211  1.1  junyoung #define CRTC_CRNT_VLINE		0x07f00000
    212  1.1  junyoung #define CRTC_VBLANK		0x00000001
    213  1.1  junyoung 
    214  1.1  junyoung /* DAC control values */
    215  1.1  junyoung 
    216  1.1  junyoung #define DAC_EXT_SEL_RS2		0x01
    217  1.1  junyoung #define DAC_EXT_SEL_RS3		0x02
    218  1.1  junyoung #define DAC_8BIT_EN		0x00000100
    219  1.1  junyoung #define DAC_PIX_DLY_MASK	0x00000600
    220  1.1  junyoung #define DAC_PIX_DLY_0NS		0x00000000
    221  1.1  junyoung #define DAC_PIX_DLY_2NS		0x00000200
    222  1.1  junyoung #define DAC_PIX_DLY_4NS		0x00000400
    223  1.1  junyoung #define DAC_BLANK_ADJ_MASK	0x00001800
    224  1.1  junyoung #define DAC_BLANK_ADJ_0		0x00000000
    225  1.1  junyoung #define DAC_BLANK_ADJ_1		0x00000800
    226  1.1  junyoung #define DAC_BLANK_ADJ_2		0x00001000
    227  1.1  junyoung 
    228  1.1  junyoung 
    229  1.1  junyoung /* Mix control values */
    230  1.1  junyoung 
    231  1.1  junyoung #define MIX_NOT_DST		0x0000
    232  1.1  junyoung #define MIX_0                   0x0001
    233  1.1  junyoung #define MIX_1                   0x0002
    234  1.1  junyoung #define MIX_DST                 0x0003
    235  1.1  junyoung #define MIX_NOT_SRC             0x0004
    236  1.1  junyoung #define MIX_XOR                 0x0005
    237  1.1  junyoung #define MIX_XNOR                0x0006
    238  1.1  junyoung #define MIX_SRC                 0x0007
    239  1.1  junyoung #define MIX_NAND                0x0008
    240  1.1  junyoung #define MIX_NOT_SRC_OR_DST      0x0009
    241  1.1  junyoung #define MIX_SRC_OR_NOT_DST      0x000a
    242  1.1  junyoung #define MIX_OR                  0x000b
    243  1.1  junyoung #define MIX_AND                 0x000c
    244  1.1  junyoung #define MIX_SRC_AND_NOT_DST     0x000d
    245  1.1  junyoung #define MIX_NOT_SRC_AND_DST     0x000e
    246  1.1  junyoung #define MIX_NOR                 0x000f
    247  1.1  junyoung 
    248  1.1  junyoung /* Maximum engine dimensions */
    249  1.1  junyoung #define ENGINE_MIN_X		0
    250  1.1  junyoung #define ENGINE_MIN_Y		0
    251  1.1  junyoung #define ENGINE_MAX_X		4095
    252  1.1  junyoung #define ENGINE_MAX_Y		16383
    253  1.1  junyoung 
    254  1.1  junyoung /* Mach64 engine bit constants - these are typically ORed together */
    255  1.1  junyoung 
    256  1.1  junyoung /* HW_DEBUG register constants */
    257  1.1  junyoung /* For RagePro only... */
    258  1.1  junyoung #define AUTO_FF_DIS             0x000001000
    259  1.1  junyoung #define AUTO_BLKWRT_DIS         0x000002000
    260  1.1  junyoung 
    261  1.1  junyoung /* BUS_CNTL register constants */
    262  1.5  macallan #define BUS_APER_REG_DIS        0x00000010	/* register block 0 */
    263  1.5  macallan #define BUS_EXTRA_PIPE_DIS	0x00000020	/* disable extra pipeline */
    264  1.5  macallan #define BUS_DISABLE_MASTER	0x00000040	/* disable busmaster */
    265  1.5  macallan #define BUS_WRITE_ROM_EN	0x00000080	/* write to flash ROM */
    266  1.1  junyoung #define BUS_FIFO_ERR_ACK        0x00200000
    267  1.1  junyoung #define BUS_HOST_ERR_ACK        0x00800000
    268  1.5  macallan #define BUS_EXT_REG_EN		0x08000000	/* register block 1 */
    269  1.1  junyoung 
    270  1.1  junyoung /* GEN_TEST_CNTL register constants */
    271  1.1  junyoung #define GEN_OVR_OUTPUT_EN       0x20
    272  1.1  junyoung #define HWCURSOR_ENABLE         0x80
    273  1.1  junyoung #define GUI_ENGINE_ENABLE       0x100
    274  1.1  junyoung #define BLOCK_WRITE_ENABLE      0x200
    275  1.1  junyoung 
    276  1.1  junyoung /* DSP_CONFIG register constants */
    277  1.1  junyoung #define DSP_XCLKS_PER_QW        0x00003fff
    278  1.1  junyoung #define DSP_LOOP_LATENCY        0x000f0000
    279  1.1  junyoung #define DSP_PRECISION           0x00700000
    280  1.1  junyoung 
    281  1.1  junyoung /* DSP_ON_OFF register constants */
    282  1.1  junyoung #define DSP_OFF                 0x000007ff
    283  1.1  junyoung #define DSP_ON                  0x07ff0000
    284  1.1  junyoung 
    285  1.1  junyoung /* SHARED_CNTL register constants */
    286  1.1  junyoung #define CTD_FIFO5               0x01000000
    287  1.1  junyoung 
    288  1.1  junyoung /* CLOCK_CNTL register constants */
    289  1.4  macallan #define CLOCK_SEL		0x0000000f
    290  1.4  macallan #define CLOCK_DIV		0x00000030
    291  1.4  macallan #define CLOCK_DIV1		0x00000000
    292  1.4  macallan #define CLOCK_DIV2		0x00000010
    293  1.4  macallan #define CLOCK_DIV4		0x00000020
    294  1.4  macallan #define CLOCK_STROBE		0x00000040
    295  1.4  macallan #define PLL_WR_EN		0x00000200
    296  1.4  macallan #define PLL_ADDR		0x0000fc00
    297  1.4  macallan #define PLL_ADDR_SHIFT		10
    298  1.4  macallan #define PLL_DATA		0x00ff0000
    299  1.4  macallan #define PLL_DATA_SHIFT		16
    300  1.1  junyoung 
    301  1.1  junyoung /* PLL registers */
    302  1.1  junyoung #define PLL_MACRO_CNTL		0x01
    303  1.1  junyoung #define PLL_REF_DIV		0x02
    304  1.1  junyoung #define PLL_GEN_CNTL		0x03
    305  1.1  junyoung #define MCLK_FB_DIV		0x04
    306  1.1  junyoung #define PLL_VCLK_CNTL		0x05
    307  1.4  macallan   #define PLL_VCLK_RESET		0x04
    308  1.1  junyoung #define VCLK_POST_DIV		0x06
    309  1.1  junyoung #define VCLK0_FB_DIV		0x07
    310  1.1  junyoung #define VCLK1_FB_DIV		0x08
    311  1.1  junyoung #define VCLK2_FB_DIV		0x09
    312  1.1  junyoung #define VCLK3_FB_DIV		0x0A
    313  1.1  junyoung #define PLL_XCLK_CNTL		0x0B
    314  1.1  junyoung #define PLL_TEST_CTRL		0x0E
    315  1.1  junyoung #define PLL_TEST_COUNT		0x0F
    316  1.1  junyoung 
    317  1.1  junyoung /* Memory types for CT, ET, VT, GT */
    318  1.1  junyoung #define DRAM			1
    319  1.1  junyoung #define EDO_DRAM		2
    320  1.1  junyoung #define PSEUDO_EDO		3
    321  1.1  junyoung #define SDRAM			4
    322  1.1  junyoung #define SGRAM			5
    323  1.1  junyoung #define SGRAM32			6
    324  1.1  junyoung 
    325  1.1  junyoung #define DAC_INTERNAL		0x00
    326  1.1  junyoung #define DAC_IBMRGB514		0x01
    327  1.1  junyoung #define DAC_ATI68875		0x02
    328  1.1  junyoung #define DAC_TVP3026_A		0x72
    329  1.1  junyoung #define DAC_BT476		0x03
    330  1.1  junyoung #define DAC_BT481		0x04
    331  1.1  junyoung #define DAC_ATT20C491		0x14
    332  1.1  junyoung #define DAC_SC15026		0x24
    333  1.1  junyoung #define DAC_MU9C1880		0x34
    334  1.1  junyoung #define DAC_IMSG174		0x44
    335  1.1  junyoung #define DAC_ATI68860_B		0x05
    336  1.1  junyoung #define DAC_ATI68860_C		0x15
    337  1.1  junyoung #define DAC_TVP3026_B		0x75
    338  1.1  junyoung #define DAC_STG1700		0x06
    339  1.1  junyoung #define DAC_ATT498		0x16
    340  1.1  junyoung #define DAC_STG1702		0x07
    341  1.1  junyoung #define DAC_SC15021		0x17
    342  1.1  junyoung #define DAC_ATT21C498		0x27
    343  1.1  junyoung #define DAC_STG1703		0x37
    344  1.1  junyoung #define DAC_CH8398		0x47
    345  1.1  junyoung #define DAC_ATT20C408		0x57
    346  1.1  junyoung 
    347  1.1  junyoung #define CLK_ATI18818_0		0
    348  1.1  junyoung #define CLK_ATI18818_1		1
    349  1.1  junyoung #define CLK_STG1703		2
    350  1.1  junyoung #define CLK_CH8398		3
    351  1.1  junyoung #define CLK_INTERNAL		4
    352  1.1  junyoung #define CLK_ATT20C408		5
    353  1.1  junyoung #define CLK_IBMRGB514		6
    354  1.1  junyoung 
    355  1.1  junyoung /* DST_CNTL register constants */
    356  1.1  junyoung #define DST_X_RIGHT_TO_LEFT     0
    357  1.1  junyoung #define DST_X_LEFT_TO_RIGHT     1
    358  1.1  junyoung #define DST_Y_BOTTOM_TO_TOP     0
    359  1.1  junyoung #define DST_Y_TOP_TO_BOTTOM     2
    360  1.1  junyoung #define DST_X_MAJOR             0
    361  1.1  junyoung #define DST_Y_MAJOR             4
    362  1.1  junyoung #define DST_X_TILE              8
    363  1.1  junyoung #define DST_Y_TILE              0x10
    364  1.1  junyoung #define DST_LAST_PEL            0x20
    365  1.1  junyoung #define DST_POLYGON_ENABLE      0x40
    366  1.1  junyoung #define DST_24_ROTATION_ENABLE  0x80
    367  1.1  junyoung 
    368  1.1  junyoung /* SRC_CNTL register constants */
    369  1.1  junyoung #define SRC_PATTERN_ENABLE      1
    370  1.1  junyoung #define SRC_ROTATION_ENABLE     2
    371  1.1  junyoung #define SRC_LINEAR_ENABLE       4
    372  1.1  junyoung #define SRC_BYTE_ALIGN          8
    373  1.1  junyoung #define SRC_LINE_X_RIGHT_TO_LEFT 0
    374  1.1  junyoung #define SRC_LINE_X_LEFT_TO_RIGHT 0x10
    375  1.1  junyoung 
    376  1.1  junyoung /* HOST_CNTL register constants */
    377  1.1  junyoung #define HOST_BYTE_ALIGN         1
    378  1.1  junyoung 
    379  1.1  junyoung /* DP_CHAIN_MASK register constants */
    380  1.1  junyoung #define DP_CHAIN_4BPP		0x8888
    381  1.1  junyoung #define DP_CHAIN_7BPP		0xD2D2
    382  1.1  junyoung #define DP_CHAIN_8BPP		0x8080
    383  1.1  junyoung #define DP_CHAIN_8BPP_RGB	0x9292
    384  1.1  junyoung #define DP_CHAIN_15BPP		0x4210
    385  1.1  junyoung #define DP_CHAIN_16BPP		0x8410
    386  1.1  junyoung #define DP_CHAIN_24BPP		0x8080
    387  1.1  junyoung #define DP_CHAIN_32BPP		0x8080
    388  1.1  junyoung 
    389  1.1  junyoung /* DP_PIX_WIDTH register constants */
    390  1.1  junyoung #define DST_1BPP                0
    391  1.1  junyoung #define DST_4BPP                1
    392  1.1  junyoung #define DST_8BPP                2
    393  1.1  junyoung #define DST_15BPP               3
    394  1.1  junyoung #define DST_16BPP               4
    395  1.1  junyoung #define DST_32BPP               6
    396  1.1  junyoung #define SRC_1BPP                0
    397  1.1  junyoung #define SRC_4BPP                0x100
    398  1.1  junyoung #define SRC_8BPP                0x200
    399  1.1  junyoung #define SRC_15BPP               0x300
    400  1.1  junyoung #define SRC_16BPP               0x400
    401  1.1  junyoung #define SRC_32BPP               0x600
    402  1.1  junyoung #define HOST_1BPP               0
    403  1.1  junyoung #define HOST_4BPP               0x10000
    404  1.1  junyoung #define HOST_8BPP               0x20000
    405  1.1  junyoung #define HOST_15BPP              0x30000
    406  1.1  junyoung #define HOST_16BPP              0x40000
    407  1.1  junyoung #define HOST_32BPP              0x60000
    408  1.1  junyoung #define BYTE_ORDER_MSB_TO_LSB   0
    409  1.1  junyoung #define BYTE_ORDER_LSB_TO_MSB   0x1000000
    410  1.1  junyoung 
    411  1.1  junyoung /* DP_SRC register constants */
    412  1.1  junyoung #define BKGD_SRC_BKGD_CLR           0
    413  1.1  junyoung #define BKGD_SRC_FRGD_CLR           1
    414  1.1  junyoung #define BKGD_SRC_HOST               2
    415  1.1  junyoung #define BKGD_SRC_BLIT               3
    416  1.1  junyoung #define BKGD_SRC_PATTERN            4
    417  1.1  junyoung #define FRGD_SRC_BKGD_CLR           0
    418  1.1  junyoung #define FRGD_SRC_FRGD_CLR           0x100
    419  1.1  junyoung #define FRGD_SRC_HOST               0x200
    420  1.1  junyoung #define FRGD_SRC_BLIT               0x300
    421  1.1  junyoung #define FRGD_SRC_PATTERN            0x400
    422  1.1  junyoung #define MONO_SRC_ONE                0
    423  1.1  junyoung #define MONO_SRC_PATTERN            0x10000
    424  1.1  junyoung #define MONO_SRC_HOST               0x20000
    425  1.1  junyoung #define MONO_SRC_BLIT               0x30000
    426