gareg.h revision 1.1 1 /* $NetBSD: gareg.h,v 1.1 2005/12/29 15:20:08 tsutsui 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 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 #ifndef _EWS4800MIPS_GAREG_H_
40 #define _EWS4800MIPS_GAREG_H_
41 /* Graphic adapter */
42
43 #define GA_FRB_ADDR 0xf0000000
44 #define GA_FRB_SIZE 0x08000000
45 #define GA_ROM_ADDR 0xf7e00000 /* 350 */
46 #define GA_BLOCKWRITE_ADDR 0xf0c00000
47 #define GA_PLANEMASK_ADDR 0xf1000000
48 #define GA_OVLMASK_ADDR 0xf2000000
49 #define GA_ID_ADDR 0xf3000000
50 #define GA_REG_ADDR 0xf5f00000
51 #define GA_REG_SIZE 0x4000
52
53 /* Register (offset from GA_REG_ADDR) */
54
55 #define GA_PLANEMASK_REG 0x0400 /* write only */
56 #define GA_PLANEMASK_R 0x0000ff
57 #define GA_PLANEMASK_G 0x00ff00
58 #define GA_PLANEMASK_B 0xff0000
59
60 #define GA_DDA_PATTERN_DRAW_ADDR_LO 0x0900
61 #define GA_DDA_PATTERN_DRAW_ADDR_HI 0x0904
62 #define GA_DDA_PATTERN_DRAW_DATA 0x093c /* data? */
63
64 #define GA_BT463_ADDR_LO 0x0c80
65 #define GA_BT463_ADDR_HI 0x0c84
66 #define GA_BT463_IREG_DATA 0x0c88
67 #define GA_BT463_CLUT_DATA 0x0c8c
68 #define GA_BT431_BADDR_LO 0x0c90
69 #define GA_BT431_BADDR_HI 0x0c94
70 #define GA_BT431_BDATA 0x0c98
71 #define GA_BT431_CADDR_LO 0x0ca0
72 #define GA_BT431_CADDR_HI 0x0ca4
73 #define GA_BT431_CDATA 0x0ca8
74
75 #define GA_STATUS_REG 0x0e00
76 #define GA_STATUS_VSYNC 0x1
77 #define GA_STATUS_CLOCK 0x2
78 #define GA_STATUS_CLOCK_60HZ 0
79 #define GA_STATUS_CLOCK_71HZ 2
80
81 #define GA_CLOCK_REG 0x0e08 /* write only */
82 #define GA_CLOCK_60HZ 0x670
83 #define GA_CLOCK_71HZ 0x790
84 #define GA_BLOCKPLANEMASK_REG 0x0e80
85
86 #define GA_DDA_STATUS_REG 0x0f00
87
88 #if 0
89 #define GA_ROP_ 0x0000
90 #define GA_ROP_ 0x0002
91 #define GA_ROP_ 0x0004
92 #define GA_ROP_ 0x1000
93 #define GA_ROP_ 0x1002
94 #define GA_ROP_ 0x1004
95 #define GA_ROP_ 0x2000
96 #define GA_ROP_ 0x2002
97 #define GA_ROP_ 0x2004
98
99 #define GA_ 0x0006
100 #define GA_ 0x0008
101 #define GA_ 0x000a
102 #define GA_ 0x000c
103 #define GA_ 0x000e
104 #define GA_ 0x0010
105 #define GA_ 0x0012
106 #define GA_ 0x0020
107 #endif
108
109 #endif /* !_EWS4800MIPS_GAREG_H_ */
110