sticreg.h revision 1.1.2.2 1 1.1.2.2 jonathan /* $NetBSD: sticreg.h,v 1.1.2.2 1997/11/08 07:27:51 jonathan Exp $ */
2 1.1.2.2 jonathan
3 1.1.2.2 jonathan /*
4 1.1.2.2 jonathan * Copyright (c) 1997 Jonathan Stone
5 1.1.2.2 jonathan * All rights reserved.
6 1.1.2.2 jonathan *
7 1.1.2.2 jonathan * Redistribution and use in source and binary forms, with or without
8 1.1.2.2 jonathan * modification, are permitted provided that the following conditions
9 1.1.2.2 jonathan * are met:
10 1.1.2.2 jonathan * 1. Redistributions of source code must retain the above copyright
11 1.1.2.2 jonathan * notice, this list of conditions and the following disclaimer.
12 1.1.2.2 jonathan * 2. Redistributions in binary form must reproduce the above copyright
13 1.1.2.2 jonathan * notice, this list of conditions and the following disclaimer in the
14 1.1.2.2 jonathan * documentation and/or other materials provided with the distribution.
15 1.1.2.2 jonathan * 3. All advertising materials mentioning features or use of this software
16 1.1.2.2 jonathan * must display the following acknowledgement:
17 1.1.2.2 jonathan * This product includes software developed by Jonathan Stone for
18 1.1.2.2 jonathan * the NetBSD Project.
19 1.1.2.2 jonathan * 4. The name of the author may not be used to endorse or promote products
20 1.1.2.2 jonathan * derived from this software without specific prior written permission.
21 1.1.2.2 jonathan *
22 1.1.2.2 jonathan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 1.1.2.2 jonathan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 1.1.2.2 jonathan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 1.1.2.2 jonathan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 1.1.2.2 jonathan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 1.1.2.2 jonathan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 1.1.2.2 jonathan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 1.1.2.2 jonathan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 1.1.2.2 jonathan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 1.1.2.2 jonathan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 1.1.2.2 jonathan */
33 1.1.2.2 jonathan
34 1.1.2.2 jonathan /*
35 1.1.2.2 jonathan * Register definitions for the pixelstamp and stamp interface chip (STIC)
36 1.1.2.2 jonathan * used in PMAG-C 2-d and PMAG-D 3-d accelerated TurboChannel framebuffers.
37 1.1.2.2 jonathan */
38 1.1.2.2 jonathan
39 1.1.2.2 jonathan #ifndef _TC_STICREG_H_
40 1.1.2.2 jonathan #define _TC_STICREG_H_
41 1.1.2.2 jonathan
42 1.1.2.2 jonathan struct stic_regs {
43 1.1.2.2 jonathan volatile int32_t stic__pad0, __pad1;
44 1.1.2.2 jonathan volatile int32_t hsync;
45 1.1.2.2 jonathan volatile int32_t hsync2;
46 1.1.2.2 jonathan volatile int32_t hblank;
47 1.1.2.2 jonathan volatile int32_t vsync;
48 1.1.2.2 jonathan volatile int32_t vblank;
49 1.1.2.2 jonathan volatile int32_t vtest;
50 1.1.2.2 jonathan volatile int32_t ipdvint;
51 1.1.2.2 jonathan volatile int32_t stic__pad2;
52 1.1.2.2 jonathan volatile int32_t sticsr;
53 1.1.2.2 jonathan volatile int32_t busdat;
54 1.1.2.2 jonathan volatile int32_t busadr;
55 1.1.2.2 jonathan volatile int32_t stic__pad3;
56 1.1.2.2 jonathan volatile int32_t buscsr;
57 1.1.2.2 jonathan volatile int32_t modcl;
58 1.1.2.2 jonathan };
59 1.1.2.2 jonathan
60 1.1.2.2 jonathan #define STICADDR(x) ((volatile struct stic_regs*) (x))
61 1.1.2.2 jonathan
62 1.1.2.2 jonathan
63 1.1.2.2 jonathan /*
64 1.1.2.2 jonathan * Bit definitions for stic_regs.stic_csr.
65 1.1.2.2 jonathan * these appear to exactly what the PROM tests use.
66 1.1.2.2 jonathan */
67 1.1.2.2 jonathan #define STIC_CSR_TSTFNC 0x00000003
68 1.1.2.2 jonathan # define STIC_CSR_TSTFNC_NORMAL 0
69 1.1.2.2 jonathan # define STIC_CSR_TSTFNC_PARITY 1
70 1.1.2.2 jonathan # define STIC_CSR_TSTFNC_CNTPIX 2
71 1.1.2.2 jonathan # define STIC_CSR_TSTFNC_TSTDAC 3
72 1.1.2.2 jonathan #define STIC_CSR_CHECKPAR 0x00000004
73 1.1.2.2 jonathan #define STIC_CSR_STARTVT 0x00000010
74 1.1.2.2 jonathan #define STIC_CSR_START 0x00000020
75 1.1.2.2 jonathan #define STIC_CSR_RESET 0x00000040
76 1.1.2.2 jonathan #define STIC_CSR_STARTST 0x00000080
77 1.1.2.2 jonathan
78 1.1.2.2 jonathan /*
79 1.1.2.2 jonathan * Bit definitions for stic_regs.int.
80 1.1.2.2 jonathan * Three four-bit wide fields, for error (E), vertical-blank (V), and
81 1.1.2.2 jonathan * packetbuf-done (P) intererupts, respectively.
82 1.1.2.2 jonathan * The low-order three bits of each field are enable, requested,
83 1.1.2.2 jonathan * and acknowledge bits. The top bit of each field is unused.
84 1.1.2.2 jonathan */
85 1.1.2.2 jonathan #define STIC_INT_E_EN 0x00000001
86 1.1.2.2 jonathan #define STIC_INT_E 0x00000002
87 1.1.2.2 jonathan #define STIC_INT_E_WE 0x00000004
88 1.1.2.2 jonathan
89 1.1.2.2 jonathan #define STIC_INT_V_EN 0x00000100
90 1.1.2.2 jonathan #define STIC_INT_V 0x00000200
91 1.1.2.2 jonathan #define STIC_INT_V_WE 0x00000400
92 1.1.2.2 jonathan
93 1.1.2.2 jonathan #define STIC_INT_P_EN 0x00010000
94 1.1.2.2 jonathan #define STIC_INT_P 0x00020000
95 1.1.2.2 jonathan #define STIC_INT_P_WE 0x00040000
96 1.1.2.2 jonathan
97 1.1.2.2 jonathan #define STIC_INT_WE (STIC_INT_E_WE|STIC_INT_V_WE|STIC_INT_PE_WE)
98 1.1.2.2 jonathan #define STIC_INT_CLR (STIC_INT_E_EN|STIC_INT_V_EN|STIC_INT_P_EN)
99 1.1.2.2 jonathan
100 1.1.2.2 jonathan #endif /* _TC_STICREG_H_ */
101