Annotation of sys/arch/hp300/dev/gboxreg.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: gboxreg.h,v 1.2 2005/01/24 21:36:39 miod Exp $ */
2: /* $NetBSD: grf_gbreg.h,v 1.4 1994/10/26 07:23:53 cgd Exp $ */
3:
4: /*
5: * Copyright (c) 1988 University of Utah.
6: * Copyright (c) 1990, 1993
7: * The Regents of the University of California. All rights reserved.
8: *
9: * This code is derived from software contributed to Berkeley by
10: * the Systems Programming Group of the University of Utah Computer
11: * Science Department.
12: *
13: * Redistribution and use in source and binary forms, with or without
14: * modification, are permitted provided that the following conditions
15: * are met:
16: * 1. Redistributions of source code must retain the above copyright
17: * notice, this list of conditions and the following disclaimer.
18: * 2. Redistributions in binary form must reproduce the above copyright
19: * notice, this list of conditions and the following disclaimer in the
20: * documentation and/or other materials provided with the distribution.
21: * 3. Neither the name of the University nor the names of its contributors
22: * may be used to endorse or promote products derived from this software
23: * without specific prior written permission.
24: *
25: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35: * SUCH DAMAGE.
36: *
37: * from: Utah $Hdr: grf_gbreg.h 1.11 92/01/21$
38: *
39: * @(#)grf_gbreg.h 8.1 (Berkeley) 6/10/93
40: */
41:
42: /*
43: * Gatorbox driver regs
44: */
45:
46: #define TILER_ENABLE 0x80
47: #define LINE_MOVER_ENABLE 0x80
48: #define UP_LEFT 0x00
49: #define DOWN_RIGHT 0x40
50: #define MOVE_UP_LEFT (TILER_ENABLE | UP_LEFT)
51: #define MOVE_DOWN_RIGHT (TILER_ENABLE | DOWN_RIGHT)
52:
53: #define tile_mover_waitbusy(regaddr) \
54: do { \
55: while (((struct gboxfb *)(regaddr))->regs.sec_interrupt & 0x10) \
56: DELAY(1); \
57: } while (0)
58:
59: #define line_mover_waitbusy(regaddr) \
60: do { \
61: while ((((struct gboxfb *)(regaddr))->status & 0x80) == 0) \
62: DELAY(1); \
63: } while (0)
64:
65: #define gbcm_waitbusy(regaddr) \
66: do { \
67: while (((struct gboxfb *)(regaddr))->cmap_busy != 0xff) \
68: DELAY(1); \
69: } while (0)
70:
71: struct gboxfb {
72: struct diofbreg regs;
73: u_int8_t f2[0x4000-0x5f-1];
74: u_int8_t crtc_address; /* CTR controller address reg 0x4000 */
75: u_int8_t status; /* Status register 0x4001 */
76: u_int8_t crtc_data; /* CTR controller data reg 0x4002 */
77: u_int8_t f3[6];
78: u_int8_t line_mover_rep_rule; /* Line move rep rule */
79: u_int8_t :8, :8;
80: u_int8_t line_mover_width; /* Line move width */
81: u_int8_t f4[0xff3];
82: u_int8_t width; /* width in tiles 0x5001 */
83: u_int8_t :8;
84: u_int8_t height; /* height in tiles 0x5003 */
85: u_int8_t f5[3];
86: u_int8_t rep_rule; /* replacement rule 0x5007 */
87: u_int8_t f6[0x6001-0x5007-1];
88: u_int8_t blink1; /* blink 1 0x6001 */
89: u_int8_t f7[3];
90: u_int8_t blink2; /* blink 2 0x6005 */
91: u_int8_t f8[3];
92: u_int8_t write_protect; /* write protect 0x6009 */
93: u_int8_t f9[0x6803-0x6009-1];
94: u_int8_t cmap_busy; /* color map busy 0x6803 */
95: u_int8_t f10[0x68b9-0x6803-1];
96: u_int8_t creg_select; /* color map register select 0x68b8 */
97: u_int8_t f11[0x68f1-0x68b9-1];
98: u_int8_t cmap_write; /* color map write trigger 0x68f1 */
99: u_int8_t f12[0x69b3-0x68f1-1];
100: u_int8_t cmap_red; /* red value register 0x69b3 */
101: u_int8_t :8;
102: u_int8_t cmap_grn; /* green value register 0x69b5 */
103: u_int8_t :8;
104: u_int8_t cmap_blu; /* blue value register 0x69b6 */
105: };
CVSweb