ciareg.h revision 1.7.2.4 1 1.7.2.4 cgd /* $NetBSD: ciareg.h,v 1.7.2.4 1997/08/12 05:56:07 cgd Exp $ */
2 1.7.2.4 cgd
3 1.7.2.4 cgd /*
4 1.7.2.4 cgd * Copyright Notice:
5 1.7.2.4 cgd *
6 1.7.2.4 cgd * Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
7 1.7.2.4 cgd *
8 1.7.2.4 cgd * License:
9 1.7.2.4 cgd *
10 1.7.2.4 cgd * This License applies to this software ("Software"), created
11 1.7.2.4 cgd * by Christopher G. Demetriou ("Author").
12 1.7.2.4 cgd *
13 1.7.2.4 cgd * You may use, copy, modify and redistribute this Software without
14 1.7.2.4 cgd * charge, in either source code form, binary form, or both, on the
15 1.7.2.4 cgd * following conditions:
16 1.7.2.4 cgd *
17 1.7.2.4 cgd * 1. (a) Binary code: (i) a complete copy of the above copyright notice
18 1.7.2.4 cgd * must be included within each copy of the Software in binary code form,
19 1.7.2.4 cgd * and (ii) a complete copy of the above copyright notice and all terms
20 1.7.2.4 cgd * of this License as presented here must be included within each copy of
21 1.7.2.4 cgd * all documentation accompanying or associated with binary code, in any
22 1.7.2.4 cgd * medium, along with a list of the software modules to which the license
23 1.7.2.4 cgd * applies.
24 1.7.2.4 cgd *
25 1.7.2.4 cgd * (b) Source Code: A complete copy of the above copyright notice and all
26 1.7.2.4 cgd * terms of this License as presented here must be included within: (i)
27 1.7.2.4 cgd * each copy of the Software in source code form, and (ii) each copy of
28 1.7.2.4 cgd * all accompanying or associated documentation, in any medium.
29 1.7.2.4 cgd *
30 1.7.2.4 cgd * 2. The following Acknowledgment must be used in communications
31 1.7.2.4 cgd * involving the Software as described below:
32 1.7.2.4 cgd *
33 1.7.2.4 cgd * This product includes software developed by
34 1.7.2.4 cgd * Christopher G. Demetriou for the NetBSD Project.
35 1.7.2.4 cgd *
36 1.7.2.4 cgd * The Acknowledgment must be conspicuously and completely displayed
37 1.7.2.4 cgd * whenever the Software, or any software, products or systems containing
38 1.7.2.4 cgd * the Software, are mentioned in advertising, marketing, informational
39 1.7.2.4 cgd * or publicity materials of any kind, whether in print, electronic or
40 1.7.2.4 cgd * other media (except for information provided to support use of
41 1.7.2.4 cgd * products containing the Software by existing users or customers).
42 1.7.2.4 cgd *
43 1.7.2.4 cgd * 3. The name of the Author may not be used to endorse or promote
44 1.7.2.4 cgd * products derived from this Software without specific prior written
45 1.7.2.4 cgd * permission (conditions (1) and (2) above are not considered
46 1.7.2.4 cgd * endorsement or promotion).
47 1.7.2.4 cgd *
48 1.7.2.4 cgd * 4. This license applies to: (a) all copies of the Software, whether
49 1.7.2.4 cgd * partial or whole, original or modified, and (b) your actions, and the
50 1.7.2.4 cgd * actions of all those who may act on your behalf. All uses not
51 1.7.2.4 cgd * expressly permitted are reserved to the Author.
52 1.7.2.4 cgd *
53 1.7.2.4 cgd * 5. Disclaimer. THIS SOFTWARE IS MADE AVAILABLE BY THE AUTHOR TO THE
54 1.7.2.4 cgd * PUBLIC FOR FREE AND "AS IS.'' ALL USERS OF THIS FREE SOFTWARE ARE
55 1.7.2.4 cgd * SOLELY AND ENTIRELY RESPONSIBLE FOR THEIR OWN CHOICE AND USE OF THIS
56 1.7.2.4 cgd * SOFTWARE FOR THEIR OWN PURPOSES. BY USING THIS SOFTWARE, EACH USER
57 1.7.2.4 cgd * AGREES THAT THE AUTHOR SHALL NOT BE LIABLE FOR DAMAGES OF ANY KIND IN
58 1.7.2.4 cgd * RELATION TO ITS USE OR PERFORMANCE.
59 1.7.2.4 cgd *
60 1.7.2.4 cgd * 6. If you have a special need for a change in one or more of these
61 1.7.2.4 cgd * license conditions, please contact the Author via electronic mail to
62 1.7.2.4 cgd *
63 1.7.2.4 cgd * cgd (at) NetBSD.ORG
64 1.7.2.4 cgd *
65 1.7.2.4 cgd * or via the contact information on
66 1.7.2.4 cgd *
67 1.7.2.4 cgd * http://www.NetBSD.ORG/People/Pages/cgd.html
68 1.7.2.4 cgd */
69 1.1 cgd
70 1.1 cgd /*
71 1.4 cgd * Copyright (c) 1995, 1996 Carnegie-Mellon University.
72 1.1 cgd * All rights reserved.
73 1.1 cgd *
74 1.7.2.3 cgd * Authors: Chris G. Demetriou, Jason R. Thorpe
75 1.1 cgd *
76 1.1 cgd * Permission to use, copy, modify and distribute this software and
77 1.1 cgd * its documentation is hereby granted, provided that both the copyright
78 1.1 cgd * notice and this permission notice appear in all copies of the
79 1.1 cgd * software, derivative works or modified versions, and any portions
80 1.1 cgd * thereof, and that both notices appear in supporting documentation.
81 1.1 cgd *
82 1.1 cgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
83 1.1 cgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
84 1.1 cgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
85 1.1 cgd *
86 1.1 cgd * Carnegie Mellon requests users of this software to return to
87 1.1 cgd *
88 1.1 cgd * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
89 1.1 cgd * School of Computer Science
90 1.1 cgd * Carnegie Mellon University
91 1.1 cgd * Pittsburgh PA 15213-3890
92 1.1 cgd *
93 1.1 cgd * any improvements or extensions that they make and grant Carnegie the
94 1.1 cgd * rights to redistribute these changes.
95 1.1 cgd */
96 1.1 cgd
97 1.1 cgd /*
98 1.1 cgd * 21171 Chipset registers and constants.
99 1.1 cgd *
100 1.7.2.2 cgd * Taken from EC-QE18B-TE.
101 1.1 cgd */
102 1.1 cgd
103 1.7.2.2 cgd #define REGVAL(r) (*(volatile int32_t *)ALPHA_PHYS_TO_K0SEG(r))
104 1.1 cgd
105 1.1 cgd /*
106 1.1 cgd * Base addresses
107 1.7.2.4 cgd * XXX CLEAN UP: split into logical sections, then offsets into section.
108 1.1 cgd */
109 1.6 cgd #define CIA_PCI_SMEM1 0x8000000000UL
110 1.6 cgd #define CIA_PCI_SMEM2 0x8400000000UL
111 1.6 cgd #define CIA_PCI_SMEM3 0x8500000000UL
112 1.6 cgd #define CIA_PCI_SIO1 0x8580000000UL
113 1.6 cgd #define CIA_PCI_SIO2 0x85c0000000UL
114 1.6 cgd #define CIA_PCI_DENSE 0x8600000000UL
115 1.6 cgd #define CIA_PCI_CONF 0x8700000000UL
116 1.6 cgd #define CIA_PCI_IACK 0x8720000000UL
117 1.6 cgd #define CIA_CSRS 0x8740000000UL
118 1.6 cgd #define CIA_PCI_MC_CSRS 0x8750000000UL
119 1.6 cgd #define CIA_PCI_ATRANS 0x8760000000UL
120 1.7.2.3 cgd #define CIA_PCI_TBIA 0x8760000100UL
121 1.7.2.3 cgd
122 1.7.2.3 cgd #define CIA_PCI_W0BASE 0x8760000400UL
123 1.7.2.3 cgd #define CIA_PCI_W0MASK 0x8760000440UL
124 1.7.2.3 cgd #define CIA_PCI_T0BASE 0x8760000480UL
125 1.7.2.3 cgd
126 1.7.2.3 cgd #define CIA_PCI_W1BASE 0x8760000500UL
127 1.7.2.3 cgd #define CIA_PCI_W1MASK 0x8760000540UL
128 1.7.2.3 cgd #define CIA_PCI_T1BASE 0x8760000580UL
129 1.7.2.3 cgd
130 1.7.2.3 cgd #define CIA_PCI_W2BASE 0x8760000600UL
131 1.7.2.3 cgd #define CIA_PCI_W2MASK 0x8760000640UL
132 1.7.2.3 cgd #define CIA_PCI_T2BASE 0x8760000680UL
133 1.7.2.3 cgd
134 1.7.2.3 cgd #define CIA_PCI_W3BASE 0x8760000700UL
135 1.7.2.3 cgd #define CIA_PCI_W3MASK 0x8760000740UL
136 1.7.2.3 cgd #define CIA_PCI_T3BASE 0x8760000780UL
137 1.7.2.3 cgd
138 1.7.2.3 cgd /*
139 1.7.2.3 cgd * Values for CIA_PCI_TBIA
140 1.7.2.3 cgd */
141 1.7.2.3 cgd #define CIA_PCI_TBIA_NOOP 0 /* no operation */
142 1.7.2.3 cgd #define CIA_PCI_TBIA_LOCKED 1 /* invalidate and unlock locked tags */
143 1.7.2.3 cgd #define CIA_PCI_TBIA_UNLOCKED 2 /* invalidate unlocked tags */
144 1.7.2.3 cgd #define CIA_PCI_TBIA_ALL 3 /* invalidate and unlock all tags */
145 1.7.2.3 cgd
146 1.7.2.3 cgd /*
147 1.7.2.3 cgd * Values for CIA_PCI_WnBASE
148 1.7.2.3 cgd */
149 1.7.2.3 cgd #define CIA_PCI_WnBASE_W_BASE 0xfff00000
150 1.7.2.3 cgd #define CIA_PCI_WnBASE_DAC_EN 0x00000008 /* W3BASE only */
151 1.7.2.3 cgd #define CIA_PCI_WnBASE_MEMCS_EN 0x00000004 /* W0BASE only */
152 1.7.2.3 cgd #define CIA_PCI_WnBASE_SG_EN 0x00000002
153 1.7.2.3 cgd #define CIA_PCI_WnBASE_W_EN 0x00000001
154 1.7.2.3 cgd
155 1.7.2.3 cgd /*
156 1.7.2.3 cgd * Values for CIA_PCI_WnMASK
157 1.7.2.3 cgd */
158 1.7.2.3 cgd #define CIA_PCI_WnMASK_W_MASK 0xfff00000
159 1.7.2.3 cgd #define CIA_PCI_WnMASK_1M 0x00000000
160 1.7.2.3 cgd #define CIA_PCI_WnMASK_2M 0x00100000
161 1.7.2.3 cgd #define CIA_PCI_WnMASK_4M 0x00300000
162 1.7.2.3 cgd #define CIA_PCI_WnMASK_8M 0x00700000
163 1.7.2.3 cgd #define CIA_PCI_WnMASK_16M 0x00f00000
164 1.7.2.3 cgd #define CIA_PCI_WnMASK_32M 0x01f00000
165 1.7.2.3 cgd #define CIA_PCI_WnMASK_64M 0x03f00000
166 1.7.2.3 cgd #define CIA_PCI_WnMASK_128M 0x07f00000
167 1.7.2.3 cgd #define CIA_PCI_WnMASK_256M 0x0ff00000
168 1.7.2.3 cgd #define CIA_PCI_WnMASK_512M 0x1ff00000
169 1.7.2.3 cgd #define CIA_PCI_WnMASK_1G 0x3ff00000
170 1.7.2.3 cgd #define CIA_PCI_WnMASK_2G 0x7ff00000
171 1.7.2.3 cgd #define CIA_PCI_WnMASK_4G 0xfff00000
172 1.7.2.3 cgd
173 1.7.2.3 cgd /*
174 1.7.2.3 cgd * Values for CIA_PCI_TnBASE
175 1.7.2.3 cgd */
176 1.7.2.3 cgd #define CIA_PCI_TnBASE_MASK 0xfffffff0
177 1.7.2.3 cgd #define CIA_PCI_TnBASE_SHIFT 2
178 1.2 cgd
179 1.2 cgd /*
180 1.2 cgd * General CSRs
181 1.2 cgd */
182 1.2 cgd
183 1.7.2.4 cgd #define CIA_CSR_CIA_REV (CIA_CSRS + 0x080)
184 1.7.2.4 cgd
185 1.7.2.4 cgd #define CIA_REV_REV_MASK 0x000000ff
186 1.7.2.4 cgd #define CIA_REV_REV_SHIFT 0
187 1.7.2.4 cgd
188 1.7.2.4 cgd #define CIA_REV_ALT_MEM 0x00000100 /* 21172 only */
189 1.7.2.4 cgd
190 1.7.2.4 cgd #define CIA_CSR_PCI_LAT (CIA_CSRS + 0x0c0)
191 1.7.2.4 cgd
192 1.7.2.4 cgd #define CIA_CSR_CIA_CTRL (CIA_CSRS + 0x100)
193 1.7.2.4 cgd
194 1.7.2.4 cgd #define CIA_CSR_CIA_CNFG (CIA_CSRS + 0x140) /* 21172 only */
195 1.7.2.4 cgd
196 1.7.2.4 cgd #define CIA_CNFG_IOA_BWEN 0x00000001 /* 21172 only */
197 1.7.2.4 cgd
198 1.2 cgd #define CIA_CSR_HAE_MEM (CIA_CSRS + 0x400)
199 1.2 cgd
200 1.6 cgd #define HAE_MEM_REG1_START(x) (((u_int32_t)(x) & 0xe0000000UL) << 0)
201 1.6 cgd #define HAE_MEM_REG1_MASK 0x1fffffffUL
202 1.6 cgd #define HAE_MEM_REG2_START(x) (((u_int32_t)(x) & 0x0000f800UL) << 16)
203 1.6 cgd #define HAE_MEM_REG2_MASK 0x07ffffffUL
204 1.7 cgd #define HAE_MEM_REG3_START(x) (((u_int32_t)(x) & 0x000000fcUL) << 24)
205 1.6 cgd #define HAE_MEM_REG3_MASK 0x03ffffffUL
206 1.2 cgd
207 1.2 cgd #define CIA_CSR_HAE_IO (CIA_CSRS + 0x440)
208 1.3 cgd
209 1.6 cgd #define HAE_IO_REG1_START(x) 0UL
210 1.6 cgd #define HAE_IO_REG1_MASK 0x01ffffffUL
211 1.6 cgd #define HAE_IO_REG2_START(x) (((u_int32_t)(x) & 0xfe000000UL) << 0)
212 1.6 cgd #define HAE_IO_REG2_MASK 0x01ffffffUL
213 1.7.2.4 cgd
214 1.7.2.4 cgd #define CIA_CSR_CFG (CIA_CSRS + 0x480)
215 1.7.2.4 cgd
216 1.7.2.4 cgd #define CIA_CSR_CACK_EN (CIA_CSRS + 0x600)
217 1.7 cgd
218 1.7 cgd #define CIA_CSR_CIA_ERR (CIA_CSRS + 0x8200)
219