i80312reg.h revision 1.3 1 /* $NetBSD: i80312reg.h,v 1.3 2001/11/04 01:16:01 thorpej Exp $ */
2
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas <matt (at) 3am-software.com>.
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 _ARM_XSCALE_I80312REG_H_
40 #define _ARM_XSCALE_I80312REG_H_
41
42 /*
43 * Physical addresses 0x1000..0x1fff are used by the Periphial Memory
44 * Mapped Registers.
45 */
46
47 #define I80312_PMMR_BASE 0x00001000
48 #define I80312_PMMR_SIZE 0x00001000
49
50 /*
51 * PCI-to-PCI Bridge Unit
52 */
53 #define I80312_PPB_BASE (I80312_PMMR_BASE)
54 #define I80312_PPB_SIZE 0x100
55 /*
56 * Performance Monitoring Unit
57 */
58 #define I80312_PMU_BASE (I80312_PPB_BASE + I80312_PPB_SIZE) /* 0x100 */
59 #define I80312_PMU_SIZE 0x100
60 /*
61 * Address Translation Unit
62 */
63 #define I80312_ATU_BASE (I80312_PMU_BASE + I80312_PMU_SIZE) /* 0x200 */
64 #define I80312_ATU_SIZE 0x100
65 /*
66 * Messaging Unit
67 */
68 #define I80312_MSG_BASE (I80312_ATU_BASE + I80312_ATU_SIZE) /* 0x300 */
69 #define I80312_MSG_SIZE 0x100
70 /*
71 * DMA Controller
72 */
73 #define I80312_DMA_BASE (I80312_MSG_BASE + I80312_MSG_SIZE) /* 0x400 */
74 #define I80312_DMA_SIZE 0x100
75 /*
76 * Memory Controller
77 */
78 #define I80312_MEM_BASE (I80312_DMA_BASE + I80312_DMA_SIZE) /* 0x500 */
79 #define I80312_MEM_SIZE 0x100
80 /*
81 * Internal Arbitration Unit
82 */
83 #define I80312_IARB_BASE (I80312_MEM_BASE + I80312_MEM_SIZE) /* 0x600 */
84 #define I80312_IARB_SIZE 0x040
85 /*
86 * Bus Interface Unit
87 */
88 #define I80312_BUS_BASE (I80312_IARB_BASE + I80312_IARB_SIZE)/* 0x640 */
89 #define I80312_BUS_SIZE 0x040
90 /*
91 * I2C Unit
92 */
93 #define I80312_IIC_BASE (I80312_BUS_BASE + I80312_BUS_SIZE) /* 0x680 */
94 #define I80312_IIC_SIZE 0x080
95 /*
96 * Interrupt Controller
97 */
98 #define I80312_INTC_BASE (I80312_IIC_BASE + I80312_IIC_SIZE) /* 0x700 */
99 #define I80312_INTC_SIZE 0x100
100 /*
101 * Application Accelerator Unit
102 */
103 #define I80312_AAU_BASE (I80312_INTC_BASE + I80312_INTC_SIZE)/* 0x800 */
104 #define I80312_AAU_SIZE 0x100
105
106 /*
107 * Performance Monitoring Unit
108 */
109 #define I80312_PMU_GTMR (I80312_PMU_BASE + 0x00)
110 #define I80312_PMU_ESR (I80312_PMU_BASE + 0x04)
111 #define I80312_PMU_EMISR (I80312_PMU_BASE + 0x08)
112 #define I80312_PMU_GTSR (I80312_PMU_BASE + 0x10)
113 #define I80312_PMU_PECR1 (I80312_PMU_BASE + 0x14)
114 #define I80312_PMU_PECR2 (I80312_PMU_BASE + 0x18)
115 #define I80312_PMU_PECR3 (I80312_PMU_BASE + 0x1c)
116 #define I80312_PMU_PECR4 (I80312_PMU_BASE + 0x20)
117 #define I80312_PMU_PECR5 (I80312_PMU_BASE + 0x24)
118 #define I80312_PMU_PECR6 (I80312_PMU_BASE + 0x28)
119 #define I80312_PMU_PECR7 (I80312_PMU_BASE + 0x2c)
120 #define I80312_PMU_PECR8 (I80312_PMU_BASE + 0x30)
121 #define I80312_PMU_PECR9 (I80312_PMU_BASE + 0x34)
122 #define I80312_PMU_PECR10 (I80312_PMU_BASE + 0x38)
123 #define I80312_PMU_PECR11 (I80312_PMU_BASE + 0x3c)
124 #define I80312_PMU_PECR12 (I80312_PMU_BASE + 0x40)
125 #define I80312_PMU_PECR13 (I80312_PMU_BASE + 0x44)
126 #define I80312_PMU_PECR14 (I80312_PMU_BASE + 0x48)
127
128 /*
129 * The first 64 bytes are identical to a PCI device's config space.
130 */
131 #define I80312_ATU_PIAL 0x40 /* Pri. Inbound ATU Limit */
132 #define I80312_ATU_PIATV 0x44 /* Pri. Inbound ATU Translate Value */
133 #define I80312_ATU_SIAM 0x48 /* Sec. Inbound ATU Base Address */
134 #define I80312_ATU_SIAL 0x4c /* Sec. Inbound ATU Limit */
135 #define I80312_ATU_SIATV 0x50 /* Sec. Inbound ATU Translate Value */
136 #define I80312_ATU_POMWV 0x54 /* Pri. Outbound Memory Window Value */
137 /* not used 0x58 */
138 #define I80312_ATU_POIOWV 0x5c /* Pri. Outbound I/O Window Value */
139 #define I80312_ATU_PODACWVL 0x60 /* Pri. Outbound DAC Window Value (Lo)*/
140 #define I80312_ATU_PODACWVH 0x64 /* Pri. Outbound DAC Window Value (Hi)*/
141 #define I80312_ATU_SOMWV 0x68 /* Sec. Outbound Memory Window Value */
142 #define I80312_ATU_SOIOWV 0x6c /* Sec. Outbound I/O Window Value */
143 /* not used 0x70 */
144 #define I80312_ATU_ERL 0x74 /* Expansion ROM Limit */
145 #define I80312_ATU_ERTV 0x78 /* Expansion ROM Translate Value */
146 /* not used 0x7c */
147 #define I80312_ATU_ACI 0x74 /* ATU Capability Identifier */
148 #define I80312_ATU_ATNIP 0x78 /* ATU Next Item Pointer */
149 #define I80312_ATU_APM 0x7c /* ATU Power Management */
150 /* not used 0x84 */
151 #define I80312_ATU_ACR 0x88 /* ATU Configuration */
152 /* not used 0x8c */
153 #define I80312_ATU_PAIS 0x90 /* Pri. ATU Interrupt Status */
154 #define I80312_ATU_SAIS 0x94 /* Sec. ATU Interrupt Status */
155 #define I80312_ATU_SACS 0x98 /* Sec. ATU Command/Status */
156 #define I80312_ATU_SODACWVL 0x9c /* Sec. Outbound DAC Window Value (lo)*/
157 #define I80312_ATU_SODACWVH 0xa0 /* Sec. Outbound DAC Window Value (hi)*/
158 #define I80312_ATU_POCCA 0xa4 /* Pri. Outbound Config Address Data */
159 #define I80312_ATU_SOCCA 0xa8 /* Sec. Outbound Config Address Data */
160 #define I80312_ATU_POCCD 0xac /* Pri. Outbound Config Cycle Data */
161 #define I80312_ATU_SOCCD 0xb0 /* Sec. Outbound Config Cycle Data */
162 #define I80312_ATU_PAQC 0xb4 /* Pri. ATU Queue Control */
163 #define I80312_ATU_SAQC 0xb8 /* Sec. ATU Queue Control */
164 #define I80312_ATU_PAIM 0xbc /* Pri. ATU Interrupt Mask */
165 #define I80312_ATU_SAIM 0xc0 /* Sec. ATU Interrupt Mask */
166 /* not used 0xc4 .. 0xfc */
167
168 /* not used 0x00 .. 0x0c */
169 #define I80312_MSG_IM0 0x10 /* Inbound Message 0 */
170 #define I80312_MSG_IM1 0x14 /* Inbound Message 1 */
171 #define I80312_MSG_OM0 0x18 /* Outbound Message 0 */
172 #define I80312_MSG_OM1 0x1c /* Outbound Message 1 */
173 #define I80312_MSG_ID 0x20 /* Inbound Doorbell */
174 #define I80312_MSG_IIS 0x24 /* Inbound Interrupt Status */
175 #define I80312_MSG_IIM 0x28 /* Inbound Interrupt Mask */
176 #define I80312_MSG_OD 0x2c /* Outbound Doorbell */
177 #define I80312_MSG_OIS 0x30 /* Outbound Interrupt Status */
178 #define I80312_MSG_OIM 0x34 /* Outbound Interrupt Mask */
179 /* not used 0x38 .. 0x4c */
180 #define I80312_MSG_MC 0x50 /* MU Configuration */
181 #define I80312_MSG_QBA 0x54 /* Queue Base Address */
182 /* not used 0x58 .. 0x5c */
183 #define I80312_MSG_IFHP 0x60 /* Inbound Free Head Pointer */
184 #define I80312_MSG_IFTP 0x64 /* Inbound Free Tail Pointer */
185 #define I80312_MSG_IPHP 0x68 /* Inbound Post Head Pointer */
186 #define I80312_MSG_IPTP 0x6c /* Inbound Post Tail Pointer */
187 #define I80312_MSG_OFHP 0x70 /* Outbound Free Head Pointer */
188 #define I80312_MSG_OFTP 0x74 /* Outbound Free Tail Pointer */
189 #define I80312_MSG_OPHP 0x78 /* Outbound Post Head Pointer */
190 #define I80312_MSG_OPTP 0x7c /* Outbound Post Tail Pointer */
191 #define I80312_MSG_IA 0x80 /* Index Address */
192 /* not used 0x84 .. 0xfc */
193
194 /*
195 * DMA Controller
196 */
197 #define I80312_DMA_CHAN0 0x00 /* Channel 0 */
198 #define I80312_DMA_CHAN1 0x40 /* Channel 1 */
199 #define I80312_DMA_CHAN2 0x80 /* Channel 2 */
200 /* not used 0xc0 .. 0xfc */
201
202 #define I80312_DMA_CC 0x00 /* Channel Control */
203 #define I80312_DMA_CS 0x04 /* Channel Status */
204 /* not used 0x08 */
205 #define I80312_DMA_DA 0x0c /* Descriptor Address */
206 #define I80312_DMA_NDA 0x10 /* Next Descriptor Address */
207 #define I80312_DMA_PA 0x14 /* PCI Address */
208 #define I80312_DMA_PUA 0x18 /* PCI Upper Address */
209 #define I80312_DMA_IBA 0x1c /* Internal Bus Address */
210 #define I80312_DMA_BC 0x20 /* Byte Count */
211 #define I80312_DMA_DC 0x24 /* Descriptor Control */
212 /* not used 0x28 .. 0x3c */
213
214 /*
215 * Memory Controller
216 */
217 #define I80312_MEM_SI 0x00 /* SDRAM Initialization */
218 #define I80312_MEM_SC 0x04 /* SDRAM Control */
219 #define I80312_MEM_SB 0x08 /* SDRAM Base */
220 #define I80312_MEM_SB0 0x0c /* SDRAM Bank 0 Size */
221 #define I80312_MEM_SB1 0x10 /* SDRAM Bank 1 Size */
222 /* not used 0x14 .. 0x30 */
223 #define I80312_MEM_EC 0x34 /* ECC Control */
224 #define I80312_MEM_EL0 0x38 /* ECC Log 0 */
225 #define I80312_MEM_EL1 0x3c /* ECC Log 1 */
226 #define I80312_MEM_EA0 0x40 /* ECC Address 0 */
227 #define I80312_MEM_EA1 0x44 /* ECC Address 1 */
228 #define I80312_MEM_ET 0x48 /* ECC Test */
229 #define I80312_MEM_FB0 0x4c /* ECC Flash Base 0 */
230 #define I80312_MEM_FB1 0x50 /* ECC Flash Base 1 */
231 #define I80312_MEM_FB0S 0x54 /* ECC Flash Bank 0 Size */
232 #define I80312_MEM_FB1S 0x58 /* ECC Flash Bank 1 Size */
233 #define I80312_MEM_FWS1 0x5c /* ECC Wait State 1 Size */
234 #define I80312_MEM_FWS0 0x60 /* ECC Wait State 0 Size */
235 #define I80312_MEM_IS 0x65 /* ECC Interrupt Status */
236 #define I80312_MEM_RF 0x68 /* ECC Refresh Frequency */
237 #define I80312_MEM_RF 0x68 /* ECC Refresh Frequency */
238 #define I80312_MEM_RF 0x68 /* ECC Refresh Frequency */
239 #define I80312_MEM_RF 0x68 /* ECC Refresh Frequency */
240 /* not used 0x6c .. 0xfc */
241
242 /*
243 * Internal Arbitration Unit
244 */
245 #define I80312_ARB_IAC 0x00 /* Internal Aribtration Control */
246 #define I80312_ARB_MLT 0x04 /* Master Latency Timer */
247 #define I80312_ARB_MTT 0x08 /* Multi-Transaction Timer */
248 /* not used 0x0c .. 0x3c */
249
250 /*
251 * Bus(Core) Interface Unit
252 */
253 /* not used 0x40 */
254 #define I80312_BUS_IS 0x44 /* Interrupt Status */
255 /* not used 0x4c .. 0x7c */
256
257 /*
258 * I2C Bus Interface Unit
259 */
260 #define I80312_IIC_CTL 0x80 /* Control */
261 #define I80312_IIC_STS 0x84 /* Status */
262 #define I80312_IIC_SA 0x88 /* Slave Address */
263 #define I80312_IIC_DB 0x8c /* Data Buffer */
264 #define I80312_IIC_CC 0x90 /* Clock Control */
265 #define I80312_IIC_BM 0x94 /* Bus Monitor */
266 /* not used 0x98 .. 0xfc */
267
268 /*
269 * PCI And Peripheral Interrupt (GPIO) Unit
270 */
271 #define I80312_INTC_IIS 0x00 /* IRQ Interrupt Status */
272 #define I80312_INTC_F2IS 0x04 /* FIQ2 Interrupt Status */
273 #define I80312_INTC_F1IS 0x08 /* FIQ1 Interrupt Status */
274 /* not used 0x0c */
275 #define I80312_INTC_PDI 0x10 /* Processor Device ID */
276 /* not used 0x14 .. 0x18 */
277 #define I80312_INTC_GOE 0x1c /* GPIO Output Enable */
278 #define I80312_INTC_GID 0x20 /* GPIO Input Data */
279 #define I80312_INTC_GOD 0x24 /* GPIO Output Data */
280 /* not used 0x28 .. 0xfc */
281
282 /*
283 * Application Accelerator Registers
284 */
285 #define I80312_AAU_CTL 0x00 /* Control */
286 #define I80312_AAU_STS 0x04 /* Status */
287 #define I80312_AAU_DSCA 0x08 /* Descriptor Address */
288 #define I80312_AAU_NDA 0x0c /* Next Descriptor Address */
289 #define I80312_AAU_SA1 0x10 /* i80200 Source Address 1 */
290 #define I80312_AAU_SA2 0x14 /* i80200 Source Address 2 */
291 #define I80312_AAU_SA3 0x18 /* i80200 Source Address 3 */
292 #define I80312_AAU_SA4 0x1c /* i80200 Source Address 4 */
293 #define I80312_AAU_DSTA 0x20 /* i80200 Destination Address */
294 #define I80312_AAU_ABC 0x24 /* Accelerator Byte Count */
295 #define I80312_AAU_ADC 0x28 /* Accelerator Descriptor Count */
296 #define I80312_AAU_SA5 0x2c /* i80200 Source Address 5 */
297 #define I80312_AAU_SA6 0x30 /* i80200 Source Address 6 */
298 #define I80312_AAU_SA7 0x34 /* i80200 Source Address 7 */
299 #define I80312_AAU_SA8 0x38 /* i80200 Source Address 8 */
300 /* not used 0x3c .. 0xfc */
301
302 #endif /* _ARM_XSCALE_I80312REG_H_ */
303