1 /*        $NetBSD: gareg.h,v 1.2 2008/04/28 20:23:18 martin Exp $     */
2 
3 /*-
4  * Copyright (c) 2004 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by UCHIYAMA Yasushi.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef _EWS4800MIPS_GAREG_H_
33 #define   _EWS4800MIPS_GAREG_H_
34 /* Graphic adapter */
35 
36 #define   GA_FRB_ADDR                             0xf0000000
37 #define   GA_FRB_SIZE                             0x08000000
38 #define   GA_ROM_ADDR                             0xf7e00000          /* 350 */
39 #define   GA_BLOCKWRITE_ADDR            0xf0c00000
40 #define   GA_PLANEMASK_ADDR             0xf1000000
41 #define   GA_OVLMASK_ADDR                         0xf2000000
42 #define   GA_ID_ADDR                              0xf3000000
43 #define   GA_REG_ADDR                             0xf5f00000
44 #define   GA_REG_SIZE                             0x4000
45 
46 /* Register (offset from GA_REG_ADDR) */
47 
48 #define   GA_PLANEMASK_REG              0x0400    /* write only */
49 #define    GA_PLANEMASK_R                0x0000ff
50 #define    GA_PLANEMASK_G                0x00ff00
51 #define    GA_PLANEMASK_B                0xff0000
52 
53 #define   GA_DDA_PATTERN_DRAW_ADDR_LO   0x0900
54 #define   GA_DDA_PATTERN_DRAW_ADDR_HI   0x0904
55 #define   GA_DDA_PATTERN_DRAW_DATA      0x093c    /* data? */
56 
57 #define   GA_BT463_ADDR_LO              0x0c80
58 #define   GA_BT463_ADDR_HI              0x0c84
59 #define   GA_BT463_IREG_DATA            0x0c88
60 #define   GA_BT463_CLUT_DATA            0x0c8c
61 #define   GA_BT431_BADDR_LO             0x0c90
62 #define   GA_BT431_BADDR_HI             0x0c94
63 #define   GA_BT431_BDATA                          0x0c98
64 #define   GA_BT431_CADDR_LO             0x0ca0
65 #define   GA_BT431_CADDR_HI             0x0ca4
66 #define   GA_BT431_CDATA                          0x0ca8
67 
68 #define   GA_STATUS_REG                           0x0e00
69 #define    GA_STATUS_VSYNC     0x1
70 #define    GA_STATUS_CLOCK     0x2
71 #define     GA_STATUS_CLOCK_60HZ                  0
72 #define     GA_STATUS_CLOCK_71HZ                  2
73 
74 #define   GA_CLOCK_REG                            0x0e08    /* write only */
75 #define    GA_CLOCK_60HZ                 0x670
76 #define    GA_CLOCK_71HZ                 0x790
77 #define   GA_BLOCKPLANEMASK_REG                   0x0e80
78 
79 #define   GA_DDA_STATUS_REG             0x0f00
80 
81 #if 0
82 #define   GA_ROP_   0x0000
83 #define   GA_ROP_   0x0002
84 #define   GA_ROP_   0x0004
85 #define   GA_ROP_   0x1000
86 #define   GA_ROP_   0x1002
87 #define   GA_ROP_   0x1004
88 #define   GA_ROP_   0x2000
89 #define   GA_ROP_   0x2002
90 #define   GA_ROP_   0x2004
91 
92 #define   GA_       0x0006
93 #define   GA_       0x0008
94 #define   GA_       0x000a
95 #define   GA_       0x000c
96 #define   GA_       0x000e
97 #define   GA_       0x0010
98 #define   GA_       0x0012
99 #define   GA_       0x0020
100 #endif
101 
102 #endif    /* !_EWS4800MIPS_GAREG_H_ */
103