1 |
1275 |
phoenix |
/*
|
2 |
|
|
* Carsten Langgaard, carstenl@mips.com
|
3 |
|
|
* Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
|
4 |
|
|
*
|
5 |
|
|
* Copyright 2001 MontaVista Software Inc.
|
6 |
|
|
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
|
7 |
|
|
*
|
8 |
|
|
* This program is free software; you can distribute it and/or modify it
|
9 |
|
|
* under the terms of the GNU General Public License (Version 2) as
|
10 |
|
|
* published by the Free Software Foundation.
|
11 |
|
|
*
|
12 |
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
13 |
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
14 |
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
15 |
|
|
* for more details.
|
16 |
|
|
*
|
17 |
|
|
* You should have received a copy of the GNU General Public License along
|
18 |
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
19 |
|
|
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
20 |
|
|
*/
|
21 |
|
|
#ifndef _ASM_GT64120_GT64120_H
|
22 |
|
|
#define _ASM_GT64120_GT64120_H
|
23 |
|
|
|
24 |
|
|
#include <linux/config.h>
|
25 |
|
|
#include <asm/addrspace.h>
|
26 |
|
|
#include <asm/byteorder.h>
|
27 |
|
|
|
28 |
|
|
#define MSK(n) ((1 << (n)) - 1)
|
29 |
|
|
|
30 |
|
|
/*
|
31 |
|
|
* Register offset addresses
|
32 |
|
|
*/
|
33 |
|
|
#define GT_CPU_OFS 0x000
|
34 |
|
|
|
35 |
|
|
/*
|
36 |
|
|
* Interrupt Registers
|
37 |
|
|
*/
|
38 |
|
|
#define GT_SCS10LD_OFS 0x008
|
39 |
|
|
#define GT_SCS10HD_OFS 0x010
|
40 |
|
|
#define GT_SCS32LD_OFS 0x018
|
41 |
|
|
#define GT_SCS32HD_OFS 0x020
|
42 |
|
|
#define GT_CS20LD_OFS 0x028
|
43 |
|
|
#define GT_CS20HD_OFS 0x030
|
44 |
|
|
#define GT_CS3BOOTLD_OFS 0x038
|
45 |
|
|
#define GT_CS3BOOTHD_OFS 0x040
|
46 |
|
|
#define GT_PCI0IOLD_OFS 0x048
|
47 |
|
|
#define GT_PCI0IOHD_OFS 0x050
|
48 |
|
|
#define GT_PCI0M0LD_OFS 0x058
|
49 |
|
|
#define GT_PCI0M0HD_OFS 0x060
|
50 |
|
|
#define GT_ISD_OFS 0x068
|
51 |
|
|
#define GT_PCI0M1LD_OFS 0x080
|
52 |
|
|
#define GT_PCI0M1HD_OFS 0x088
|
53 |
|
|
#define GT_PCI1IOLD_OFS 0x090
|
54 |
|
|
#define GT_PCI1IOHD_OFS 0x098
|
55 |
|
|
#define GT_PCI1M0LD_OFS 0x0a0
|
56 |
|
|
#define GT_PCI1M0HD_OFS 0x0a8
|
57 |
|
|
#define GT_PCI1M1LD_OFS 0x0b0
|
58 |
|
|
#define GT_PCI1M1HD_OFS 0x0b8
|
59 |
|
|
|
60 |
|
|
/*
|
61 |
|
|
* GT64120A only
|
62 |
|
|
*/
|
63 |
|
|
#define GT_PCI0IOREMAP_OFS 0x0f0
|
64 |
|
|
#define GT_PCI0M0REMAP_OFS 0x0f8
|
65 |
|
|
#define GT_PCI0M1REMAP_OFS 0x100
|
66 |
|
|
#define GT_PCI1IOREMAP_OFS 0x108
|
67 |
|
|
#define GT_PCI1M0REMAP_OFS 0x110
|
68 |
|
|
#define GT_PCI1M1REMAP_OFS 0x118
|
69 |
|
|
|
70 |
|
|
#define GT_SCS0LD_OFS 0x400
|
71 |
|
|
#define GT_SCS0HD_OFS 0x404
|
72 |
|
|
#define GT_SCS1LD_OFS 0x408
|
73 |
|
|
#define GT_SCS1HD_OFS 0x40c
|
74 |
|
|
#define GT_SCS2LD_OFS 0x410
|
75 |
|
|
#define GT_SCS2HD_OFS 0x414
|
76 |
|
|
#define GT_SCS3LD_OFS 0x418
|
77 |
|
|
#define GT_SCS3HD_OFS 0x41c
|
78 |
|
|
#define GT_CS0LD_OFS 0x420
|
79 |
|
|
#define GT_CS0HD_OFS 0x424
|
80 |
|
|
#define GT_CS1LD_OFS 0x428
|
81 |
|
|
#define GT_CS1HD_OFS 0x42c
|
82 |
|
|
#define GT_CS2LD_OFS 0x430
|
83 |
|
|
#define GT_CS2HD_OFS 0x434
|
84 |
|
|
#define GT_CS3LD_OFS 0x438
|
85 |
|
|
#define GT_CS3HD_OFS 0x43c
|
86 |
|
|
#define GT_BOOTLD_OFS 0x440
|
87 |
|
|
#define GT_BOOTHD_OFS 0x444
|
88 |
|
|
|
89 |
|
|
#define GT_SDRAM_B0_OFS 0x44c
|
90 |
|
|
#define GT_SDRAM_CFG_OFS 0x448
|
91 |
|
|
#define GT_SDRAM_B2_OFS 0x454
|
92 |
|
|
#define GT_SDRAM_OPMODE_OFS 0x474
|
93 |
|
|
#define GT_SDRAM_BM_OFS 0x478
|
94 |
|
|
#define GT_SDRAM_ADDRDECODE_OFS 0x47c
|
95 |
|
|
|
96 |
|
|
#define GT_PCI0_CMD_OFS 0xc00 /* GT64120A only */
|
97 |
|
|
#define GT_PCI0_TOR_OFS 0xc04
|
98 |
|
|
#define GT_PCI0_BS_SCS10_OFS 0xc08
|
99 |
|
|
#define GT_PCI0_BS_SCS32_OFS 0xc0c
|
100 |
|
|
#define GT_INTRCAUSE_OFS 0xc18
|
101 |
|
|
#define GT_INTRMASK_OFS 0xc1c /* GT64120A only */
|
102 |
|
|
#define GT_PCI0_IACK_OFS 0xc34
|
103 |
|
|
#define GT_PCI0_BARE_OFS 0xc3c
|
104 |
|
|
#define GT_HINTRCAUSE_OFS 0xc98 /* GT64120A only */
|
105 |
|
|
#define GT_HINTRMASK_OFS 0xc9c /* GT64120A only */
|
106 |
|
|
#define GT_PCI1_CFGADDR_OFS 0xcf0 /* GT64120A only */
|
107 |
|
|
#define GT_PCI1_CFGDATA_OFS 0xcf4 /* GT64120A only */
|
108 |
|
|
#define GT_PCI0_CFGADDR_OFS 0xcf8
|
109 |
|
|
#define GT_PCI0_CFGDATA_OFS 0xcfc
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
/*
|
113 |
|
|
* Timer/Counter. GT64120A only.
|
114 |
|
|
*/
|
115 |
|
|
#define GT_TC0_OFS 0x850
|
116 |
|
|
#define GT_TC1_OFS 0x854
|
117 |
|
|
#define GT_TC2_OFS 0x858
|
118 |
|
|
#define GT_TC3_OFS 0x85C
|
119 |
|
|
#define GT_TC_CONTROL_OFS 0x864
|
120 |
|
|
|
121 |
|
|
/*
|
122 |
|
|
* I2O Support Registers
|
123 |
|
|
*/
|
124 |
|
|
#define INBOUND_MESSAGE_REGISTER0_PCI_SIDE 0x010
|
125 |
|
|
#define INBOUND_MESSAGE_REGISTER1_PCI_SIDE 0x014
|
126 |
|
|
#define OUTBOUND_MESSAGE_REGISTER0_PCI_SIDE 0x018
|
127 |
|
|
#define OUTBOUND_MESSAGE_REGISTER1_PCI_SIDE 0x01c
|
128 |
|
|
#define INBOUND_DOORBELL_REGISTER_PCI_SIDE 0x020
|
129 |
|
|
#define INBOUND_INTERRUPT_CAUSE_REGISTER_PCI_SIDE 0x024
|
130 |
|
|
#define INBOUND_INTERRUPT_MASK_REGISTER_PCI_SIDE 0x028
|
131 |
|
|
#define OUTBOUND_DOORBELL_REGISTER_PCI_SIDE 0x02c
|
132 |
|
|
#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_PCI_SIDE 0x030
|
133 |
|
|
#define OUTBOUND_INTERRUPT_MASK_REGISTER_PCI_SIDE 0x034
|
134 |
|
|
#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI_SIDE 0x040
|
135 |
|
|
#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_PCI_SIDE 0x044
|
136 |
|
|
#define QUEUE_CONTROL_REGISTER_PCI_SIDE 0x050
|
137 |
|
|
#define QUEUE_BASE_ADDRESS_REGISTER_PCI_SIDE 0x054
|
138 |
|
|
#define INBOUND_FREE_HEAD_POINTER_REGISTER_PCI_SIDE 0x060
|
139 |
|
|
#define INBOUND_FREE_TAIL_POINTER_REGISTER_PCI_SIDE 0x064
|
140 |
|
|
#define INBOUND_POST_HEAD_POINTER_REGISTER_PCI_SIDE 0x068
|
141 |
|
|
#define INBOUND_POST_TAIL_POINTER_REGISTER_PCI_SIDE 0x06c
|
142 |
|
|
#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_PCI_SIDE 0x070
|
143 |
|
|
#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_PCI_SIDE 0x074
|
144 |
|
|
#define OUTBOUND_POST_HEAD_POINTER_REGISTER_PCI_SIDE 0x078
|
145 |
|
|
#define OUTBOUND_POST_TAIL_POINTER_REGISTER_PCI_SIDE 0x07c
|
146 |
|
|
|
147 |
|
|
#define INBOUND_MESSAGE_REGISTER0_CPU_SIDE 0x1c10
|
148 |
|
|
#define INBOUND_MESSAGE_REGISTER1_CPU_SIDE 0x1c14
|
149 |
|
|
#define OUTBOUND_MESSAGE_REGISTER0_CPU_SIDE 0x1c18
|
150 |
|
|
#define OUTBOUND_MESSAGE_REGISTER1_CPU_SIDE 0x1c1c
|
151 |
|
|
#define INBOUND_DOORBELL_REGISTER_CPU_SIDE 0x1c20
|
152 |
|
|
#define INBOUND_INTERRUPT_CAUSE_REGISTER_CPU_SIDE 0x1c24
|
153 |
|
|
#define INBOUND_INTERRUPT_MASK_REGISTER_CPU_SIDE 0x1c28
|
154 |
|
|
#define OUTBOUND_DOORBELL_REGISTER_CPU_SIDE 0x1c2c
|
155 |
|
|
#define OUTBOUND_INTERRUPT_CAUSE_REGISTER_CPU_SIDE 0x1c30
|
156 |
|
|
#define OUTBOUND_INTERRUPT_MASK_REGISTER_CPU_SIDE 0x1c34
|
157 |
|
|
#define INBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU_SIDE 0x1c40
|
158 |
|
|
#define OUTBOUND_QUEUE_PORT_VIRTUAL_REGISTER_CPU_SIDE 0x1c44
|
159 |
|
|
#define QUEUE_CONTROL_REGISTER_CPU_SIDE 0x1c50
|
160 |
|
|
#define QUEUE_BASE_ADDRESS_REGISTER_CPU_SIDE 0x1c54
|
161 |
|
|
#define INBOUND_FREE_HEAD_POINTER_REGISTER_CPU_SIDE 0x1c60
|
162 |
|
|
#define INBOUND_FREE_TAIL_POINTER_REGISTER_CPU_SIDE 0x1c64
|
163 |
|
|
#define INBOUND_POST_HEAD_POINTER_REGISTER_CPU_SIDE 0x1c68
|
164 |
|
|
#define INBOUND_POST_TAIL_POINTER_REGISTER_CPU_SIDE 0x1c6c
|
165 |
|
|
#define OUTBOUND_FREE_HEAD_POINTER_REGISTER_CPU_SIDE 0x1c70
|
166 |
|
|
#define OUTBOUND_FREE_TAIL_POINTER_REGISTER_CPU_SIDE 0x1c74
|
167 |
|
|
#define OUTBOUND_POST_HEAD_POINTER_REGISTER_CPU_SIDE 0x1c78
|
168 |
|
|
#define OUTBOUND_POST_TAIL_POINTER_REGISTER_CPU_SIDE 0x1c7c
|
169 |
|
|
|
170 |
|
|
/*
|
171 |
|
|
* Register encodings
|
172 |
|
|
*/
|
173 |
|
|
#define GT_CPU_ENDIAN_SHF 12
|
174 |
|
|
#define GT_CPU_ENDIAN_MSK (MSK(1) << GT_CPU_ENDIAN_SHF)
|
175 |
|
|
#define GT_CPU_ENDIAN_BIT GT_CPU_ENDIAN_MSK
|
176 |
|
|
#define GT_CPU_WR_SHF 16
|
177 |
|
|
#define GT_CPU_WR_MSK (MSK(1) << GT_CPU_WR_SHF)
|
178 |
|
|
#define GT_CPU_WR_BIT GT_CPU_WR_MSK
|
179 |
|
|
#define GT_CPU_WR_DXDXDXDX 0
|
180 |
|
|
#define GT_CPU_WR_DDDD 1
|
181 |
|
|
|
182 |
|
|
|
183 |
|
|
#define GT_CFGADDR_CFGEN_SHF 31
|
184 |
|
|
#define GT_CFGADDR_CFGEN_MSK (MSK(1) << GT_CFGADDR_CFGEN_SHF)
|
185 |
|
|
#define GT_CFGADDR_CFGEN_BIT GT_CFGADDR_CFGEN_MSK
|
186 |
|
|
|
187 |
|
|
#define GT_CFGADDR_BUSNUM_SHF 16
|
188 |
|
|
#define GT_CFGADDR_BUSNUM_MSK (MSK(8) << GT_CFGADDR_BUSNUM_SHF)
|
189 |
|
|
|
190 |
|
|
#define GT_CFGADDR_DEVNUM_SHF 11
|
191 |
|
|
#define GT_CFGADDR_DEVNUM_MSK (MSK(5) << GT_CFGADDR_DEVNUM_SHF)
|
192 |
|
|
|
193 |
|
|
#define GT_CFGADDR_FUNCNUM_SHF 8
|
194 |
|
|
#define GT_CFGADDR_FUNCNUM_MSK (MSK(3) << GT_CFGADDR_FUNCNUM_SHF)
|
195 |
|
|
|
196 |
|
|
#define GT_CFGADDR_REGNUM_SHF 2
|
197 |
|
|
#define GT_CFGADDR_REGNUM_MSK (MSK(6) << GT_CFGADDR_REGNUM_SHF)
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
#define GT_SDRAM_BM_ORDER_SHF 2
|
201 |
|
|
#define GT_SDRAM_BM_ORDER_MSK (MSK(1) << GT_SDRAM_BM_ORDER_SHF)
|
202 |
|
|
#define GT_SDRAM_BM_ORDER_BIT GT_SDRAM_BM_ORDER_MSK
|
203 |
|
|
#define GT_SDRAM_BM_ORDER_SUB 1
|
204 |
|
|
#define GT_SDRAM_BM_ORDER_LIN 0
|
205 |
|
|
|
206 |
|
|
#define GT_SDRAM_BM_RSVD_ALL1 0xffb
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_SHF 0
|
210 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_MSK (MSK(3) << GT_SDRAM_ADDRDECODE_ADDR_SHF)
|
211 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_0 0
|
212 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_1 1
|
213 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_2 2
|
214 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_3 3
|
215 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_4 4
|
216 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_5 5
|
217 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_6 6
|
218 |
|
|
#define GT_SDRAM_ADDRDECODE_ADDR_7 7
|
219 |
|
|
|
220 |
|
|
|
221 |
|
|
#define GT_SDRAM_B0_CASLAT_SHF 0
|
222 |
|
|
#define GT_SDRAM_B0_CASLAT_MSK (MSK(2) << GT_SDRAM_B0__SHF)
|
223 |
|
|
#define GT_SDRAM_B0_CASLAT_2 1
|
224 |
|
|
#define GT_SDRAM_B0_CASLAT_3 2
|
225 |
|
|
|
226 |
|
|
#define GT_SDRAM_B0_FTDIS_SHF 2
|
227 |
|
|
#define GT_SDRAM_B0_FTDIS_MSK (MSK(1) << GT_SDRAM_B0_FTDIS_SHF)
|
228 |
|
|
#define GT_SDRAM_B0_FTDIS_BIT GT_SDRAM_B0_FTDIS_MSK
|
229 |
|
|
|
230 |
|
|
#define GT_SDRAM_B0_SRASPRCHG_SHF 3
|
231 |
|
|
#define GT_SDRAM_B0_SRASPRCHG_MSK (MSK(1) << GT_SDRAM_B0_SRASPRCHG_SHF)
|
232 |
|
|
#define GT_SDRAM_B0_SRASPRCHG_BIT GT_SDRAM_B0_SRASPRCHG_MSK
|
233 |
|
|
#define GT_SDRAM_B0_SRASPRCHG_2 0
|
234 |
|
|
#define GT_SDRAM_B0_SRASPRCHG_3 1
|
235 |
|
|
|
236 |
|
|
#define GT_SDRAM_B0_B0COMPAB_SHF 4
|
237 |
|
|
#define GT_SDRAM_B0_B0COMPAB_MSK (MSK(1) << GT_SDRAM_B0_B0COMPAB_SHF)
|
238 |
|
|
#define GT_SDRAM_B0_B0COMPAB_BIT GT_SDRAM_B0_B0COMPAB_MSK
|
239 |
|
|
|
240 |
|
|
#define GT_SDRAM_B0_64BITINT_SHF 5
|
241 |
|
|
#define GT_SDRAM_B0_64BITINT_MSK (MSK(1) << GT_SDRAM_B0_64BITINT_SHF)
|
242 |
|
|
#define GT_SDRAM_B0_64BITINT_BIT GT_SDRAM_B0_64BITINT_MSK
|
243 |
|
|
#define GT_SDRAM_B0_64BITINT_2 0
|
244 |
|
|
#define GT_SDRAM_B0_64BITINT_4 1
|
245 |
|
|
|
246 |
|
|
#define GT_SDRAM_B0_BW_SHF 6
|
247 |
|
|
#define GT_SDRAM_B0_BW_MSK (MSK(1) << GT_SDRAM_B0_BW_SHF)
|
248 |
|
|
#define GT_SDRAM_B0_BW_BIT GT_SDRAM_B0_BW_MSK
|
249 |
|
|
#define GT_SDRAM_B0_BW_32 0
|
250 |
|
|
#define GT_SDRAM_B0_BW_64 1
|
251 |
|
|
|
252 |
|
|
#define GT_SDRAM_B0_BLODD_SHF 7
|
253 |
|
|
#define GT_SDRAM_B0_BLODD_MSK (MSK(1) << GT_SDRAM_B0_BLODD_SHF)
|
254 |
|
|
#define GT_SDRAM_B0_BLODD_BIT GT_SDRAM_B0_BLODD_MSK
|
255 |
|
|
|
256 |
|
|
#define GT_SDRAM_B0_PAR_SHF 8
|
257 |
|
|
#define GT_SDRAM_B0_PAR_MSK (MSK(1) << GT_SDRAM_B0_PAR_SHF)
|
258 |
|
|
#define GT_SDRAM_B0_PAR_BIT GT_SDRAM_B0_PAR_MSK
|
259 |
|
|
|
260 |
|
|
#define GT_SDRAM_B0_BYPASS_SHF 9
|
261 |
|
|
#define GT_SDRAM_B0_BYPASS_MSK (MSK(1) << GT_SDRAM_B0_BYPASS_SHF)
|
262 |
|
|
#define GT_SDRAM_B0_BYPASS_BIT GT_SDRAM_B0_BYPASS_MSK
|
263 |
|
|
|
264 |
|
|
#define GT_SDRAM_B0_SRAS2SCAS_SHF 10
|
265 |
|
|
#define GT_SDRAM_B0_SRAS2SCAS_MSK (MSK(1) << GT_SDRAM_B0_SRAS2SCAS_SHF)
|
266 |
|
|
#define GT_SDRAM_B0_SRAS2SCAS_BIT GT_SDRAM_B0_SRAS2SCAS_MSK
|
267 |
|
|
#define GT_SDRAM_B0_SRAS2SCAS_2 0
|
268 |
|
|
#define GT_SDRAM_B0_SRAS2SCAS_3 1
|
269 |
|
|
|
270 |
|
|
#define GT_SDRAM_B0_SIZE_SHF 11
|
271 |
|
|
#define GT_SDRAM_B0_SIZE_MSK (MSK(1) << GT_SDRAM_B0_SIZE_SHF)
|
272 |
|
|
#define GT_SDRAM_B0_SIZE_BIT GT_SDRAM_B0_SIZE_MSK
|
273 |
|
|
#define GT_SDRAM_B0_SIZE_16M 0
|
274 |
|
|
#define GT_SDRAM_B0_SIZE_64M 1
|
275 |
|
|
|
276 |
|
|
#define GT_SDRAM_B0_EXTPAR_SHF 12
|
277 |
|
|
#define GT_SDRAM_B0_EXTPAR_MSK (MSK(1) << GT_SDRAM_B0_EXTPAR_SHF)
|
278 |
|
|
#define GT_SDRAM_B0_EXTPAR_BIT GT_SDRAM_B0_EXTPAR_MSK
|
279 |
|
|
|
280 |
|
|
#define GT_SDRAM_B0_BLEN_SHF 13
|
281 |
|
|
#define GT_SDRAM_B0_BLEN_MSK (MSK(1) << GT_SDRAM_B0_BLEN_SHF)
|
282 |
|
|
#define GT_SDRAM_B0_BLEN_BIT GT_SDRAM_B0_BLEN_MSK
|
283 |
|
|
#define GT_SDRAM_B0_BLEN_8 0
|
284 |
|
|
#define GT_SDRAM_B0_BLEN_4 1
|
285 |
|
|
|
286 |
|
|
|
287 |
|
|
#define GT_SDRAM_CFG_REFINT_SHF 0
|
288 |
|
|
#define GT_SDRAM_CFG_REFINT_MSK (MSK(14) << GT_SDRAM_CFG_REFINT_SHF)
|
289 |
|
|
|
290 |
|
|
#define GT_SDRAM_CFG_NINTERLEAVE_SHF 14
|
291 |
|
|
#define GT_SDRAM_CFG_NINTERLEAVE_MSK (MSK(1) << GT_SDRAM_CFG_NINTERLEAVE_SHF)
|
292 |
|
|
#define GT_SDRAM_CFG_NINTERLEAVE_BIT GT_SDRAM_CFG_NINTERLEAVE_MSK
|
293 |
|
|
|
294 |
|
|
#define GT_SDRAM_CFG_RMW_SHF 15
|
295 |
|
|
#define GT_SDRAM_CFG_RMW_MSK (MSK(1) << GT_SDRAM_CFG_RMW_SHF)
|
296 |
|
|
#define GT_SDRAM_CFG_RMW_BIT GT_SDRAM_CFG_RMW_MSK
|
297 |
|
|
|
298 |
|
|
#define GT_SDRAM_CFG_NONSTAGREF_SHF 16
|
299 |
|
|
#define GT_SDRAM_CFG_NONSTAGREF_MSK (MSK(1) << GT_SDRAM_CFG_NONSTAGREF_SHF)
|
300 |
|
|
#define GT_SDRAM_CFG_NONSTAGREF_BIT GT_SDRAM_CFG_NONSTAGREF_MSK
|
301 |
|
|
|
302 |
|
|
#define GT_SDRAM_CFG_DUPCNTL_SHF 19
|
303 |
|
|
#define GT_SDRAM_CFG_DUPCNTL_MSK (MSK(1) << GT_SDRAM_CFG_DUPCNTL_SHF)
|
304 |
|
|
#define GT_SDRAM_CFG_DUPCNTL_BIT GT_SDRAM_CFG_DUPCNTL_MSK
|
305 |
|
|
|
306 |
|
|
#define GT_SDRAM_CFG_DUPBA_SHF 20
|
307 |
|
|
#define GT_SDRAM_CFG_DUPBA_MSK (MSK(1) << GT_SDRAM_CFG_DUPBA_SHF)
|
308 |
|
|
#define GT_SDRAM_CFG_DUPBA_BIT GT_SDRAM_CFG_DUPBA_MSK
|
309 |
|
|
|
310 |
|
|
#define GT_SDRAM_CFG_DUPEOT0_SHF 21
|
311 |
|
|
#define GT_SDRAM_CFG_DUPEOT0_MSK (MSK(1) << GT_SDRAM_CFG_DUPEOT0_SHF)
|
312 |
|
|
#define GT_SDRAM_CFG_DUPEOT0_BIT GT_SDRAM_CFG_DUPEOT0_MSK
|
313 |
|
|
|
314 |
|
|
#define GT_SDRAM_CFG_DUPEOT1_SHF 22
|
315 |
|
|
#define GT_SDRAM_CFG_DUPEOT1_MSK (MSK(1) << GT_SDRAM_CFG_DUPEOT1_SHF)
|
316 |
|
|
#define GT_SDRAM_CFG_DUPEOT1_BIT GT_SDRAM_CFG_DUPEOT1_MSK
|
317 |
|
|
|
318 |
|
|
#define GT_SDRAM_OPMODE_OP_SHF 0
|
319 |
|
|
#define GT_SDRAM_OPMODE_OP_MSK (MSK(3) << GT_SDRAM_OPMODE_OP_SHF)
|
320 |
|
|
#define GT_SDRAM_OPMODE_OP_NORMAL 0
|
321 |
|
|
#define GT_SDRAM_OPMODE_OP_NOP 1
|
322 |
|
|
#define GT_SDRAM_OPMODE_OP_PRCHG 2
|
323 |
|
|
#define GT_SDRAM_OPMODE_OP_MODE 3
|
324 |
|
|
#define GT_SDRAM_OPMODE_OP_CBR 4
|
325 |
|
|
|
326 |
|
|
|
327 |
|
|
#define GT_PCI0_BARE_SWSCS3BOOTDIS_SHF 0
|
328 |
|
|
#define GT_PCI0_BARE_SWSCS3BOOTDIS_MSK (MSK(1) << GT_PCI0_BARE_SWSCS3BOOTDIS_SHF)
|
329 |
|
|
#define GT_PCI0_BARE_SWSCS3BOOTDIS_BIT GT_PCI0_BARE_SWSCS3BOOTDIS_MSK
|
330 |
|
|
|
331 |
|
|
#define GT_PCI0_BARE_SWSCS32DIS_SHF 1
|
332 |
|
|
#define GT_PCI0_BARE_SWSCS32DIS_MSK (MSK(1) << GT_PCI0_BARE_SWSCS32DIS_SHF)
|
333 |
|
|
#define GT_PCI0_BARE_SWSCS32DIS_BIT GT_PCI0_BARE_SWSCS32DIS_MSK
|
334 |
|
|
|
335 |
|
|
#define GT_PCI0_BARE_SWSCS10DIS_SHF 2
|
336 |
|
|
#define GT_PCI0_BARE_SWSCS10DIS_MSK (MSK(1) << GT_PCI0_BARE_SWSCS10DIS_SHF)
|
337 |
|
|
#define GT_PCI0_BARE_SWSCS10DIS_BIT GT_PCI0_BARE_SWSCS10DIS_MSK
|
338 |
|
|
|
339 |
|
|
#define GT_PCI0_BARE_INTIODIS_SHF 3
|
340 |
|
|
#define GT_PCI0_BARE_INTIODIS_MSK (MSK(1) << GT_PCI0_BARE_INTIODIS_SHF)
|
341 |
|
|
#define GT_PCI0_BARE_INTIODIS_BIT GT_PCI0_BARE_INTIODIS_MSK
|
342 |
|
|
|
343 |
|
|
#define GT_PCI0_BARE_INTMEMDIS_SHF 4
|
344 |
|
|
#define GT_PCI0_BARE_INTMEMDIS_MSK (MSK(1) << GT_PCI0_BARE_INTMEMDIS_SHF)
|
345 |
|
|
#define GT_PCI0_BARE_INTMEMDIS_BIT GT_PCI0_BARE_INTMEMDIS_MSK
|
346 |
|
|
|
347 |
|
|
#define GT_PCI0_BARE_CS3BOOTDIS_SHF 5
|
348 |
|
|
#define GT_PCI0_BARE_CS3BOOTDIS_MSK (MSK(1) << GT_PCI0_BARE_CS3BOOTDIS_SHF)
|
349 |
|
|
#define GT_PCI0_BARE_CS3BOOTDIS_BIT GT_PCI0_BARE_CS3BOOTDIS_MSK
|
350 |
|
|
|
351 |
|
|
#define GT_PCI0_BARE_CS20DIS_SHF 6
|
352 |
|
|
#define GT_PCI0_BARE_CS20DIS_MSK (MSK(1) << GT_PCI0_BARE_CS20DIS_SHF)
|
353 |
|
|
#define GT_PCI0_BARE_CS20DIS_BIT GT_PCI0_BARE_CS20DIS_MSK
|
354 |
|
|
|
355 |
|
|
#define GT_PCI0_BARE_SCS32DIS_SHF 7
|
356 |
|
|
#define GT_PCI0_BARE_SCS32DIS_MSK (MSK(1) << GT_PCI0_BARE_SCS32DIS_SHF)
|
357 |
|
|
#define GT_PCI0_BARE_SCS32DIS_BIT GT_PCI0_BARE_SCS32DIS_MSK
|
358 |
|
|
|
359 |
|
|
#define GT_PCI0_BARE_SCS10DIS_SHF 8
|
360 |
|
|
#define GT_PCI0_BARE_SCS10DIS_MSK (MSK(1) << GT_PCI0_BARE_SCS10DIS_SHF)
|
361 |
|
|
#define GT_PCI0_BARE_SCS10DIS_BIT GT_PCI0_BARE_SCS10DIS_MSK
|
362 |
|
|
|
363 |
|
|
|
364 |
|
|
#define GT_INTRCAUSE_MASABORT0_SHF 18
|
365 |
|
|
#define GT_INTRCAUSE_MASABORT0_MSK (MSK(1) << GT_INTRCAUSE_MASABORT0_SHF)
|
366 |
|
|
#define GT_INTRCAUSE_MASABORT0_BIT GT_INTRCAUSE_MASABORT0_MSK
|
367 |
|
|
|
368 |
|
|
#define GT_INTRCAUSE_TARABORT0_SHF 19
|
369 |
|
|
#define GT_INTRCAUSE_TARABORT0_MSK (MSK(1) << GT_INTRCAUSE_TARABORT0_SHF)
|
370 |
|
|
#define GT_INTRCAUSE_TARABORT0_BIT GT_INTRCAUSE_TARABORT0_MSK
|
371 |
|
|
|
372 |
|
|
|
373 |
|
|
#define GT_PCI0_CFGADDR_REGNUM_SHF 2
|
374 |
|
|
#define GT_PCI0_CFGADDR_REGNUM_MSK (MSK(6) << GT_PCI0_CFGADDR_REGNUM_SHF)
|
375 |
|
|
#define GT_PCI0_CFGADDR_FUNCTNUM_SHF 8
|
376 |
|
|
#define GT_PCI0_CFGADDR_FUNCTNUM_MSK (MSK(3) << GT_PCI0_CFGADDR_FUNCTNUM_SHF)
|
377 |
|
|
#define GT_PCI0_CFGADDR_DEVNUM_SHF 11
|
378 |
|
|
#define GT_PCI0_CFGADDR_DEVNUM_MSK (MSK(5) << GT_PCI0_CFGADDR_DEVNUM_SHF)
|
379 |
|
|
#define GT_PCI0_CFGADDR_BUSNUM_SHF 16
|
380 |
|
|
#define GT_PCI0_CFGADDR_BUSNUM_MSK (MSK(8) << GT_PCI0_CFGADDR_BUSNUM_SHF)
|
381 |
|
|
#define GT_PCI0_CFGADDR_CONFIGEN_SHF 31
|
382 |
|
|
#define GT_PCI0_CFGADDR_CONFIGEN_MSK (MSK(1) << GT_PCI0_CFGADDR_CONFIGEN_SHF)
|
383 |
|
|
#define GT_PCI0_CFGADDR_CONFIGEN_BIT GT_PCI0_CFGADDR_CONFIGEN_MSK
|
384 |
|
|
|
385 |
|
|
#define GT_PCI0_CMD_MBYTESWAP_SHF 0
|
386 |
|
|
#define GT_PCI0_CMD_MBYTESWAP_MSK (MSK(1) << GT_PCI0_CMD_MBYTESWAP_SHF)
|
387 |
|
|
#define GT_PCI0_CMD_MBYTESWAP_BIT GT_PCI0_CMD_MBYTESWAP_MSK
|
388 |
|
|
#define GT_PCI0_CMD_MWORDSWAP_SHF 10
|
389 |
|
|
#define GT_PCI0_CMD_MWORDSWAP_MSK (MSK(1) << GT_PCI0_CMD_MWORDSWAP_SHF)
|
390 |
|
|
#define GT_PCI0_CMD_MWORDSWAP_BIT GT_PCI0_CMD_MWORDSWAP_MSK
|
391 |
|
|
#define GT_PCI0_CMD_SBYTESWAP_SHF 16
|
392 |
|
|
#define GT_PCI0_CMD_SBYTESWAP_MSK (MSK(1) << GT_PCI0_CMD_SBYTESWAP_SHF)
|
393 |
|
|
#define GT_PCI0_CMD_SBYTESWAP_BIT GT_PCI0_CMD_SBYTESWAP_MSK
|
394 |
|
|
#define GT_PCI0_CMD_SWORDSWAP_SHF 11
|
395 |
|
|
#define GT_PCI0_CMD_SWORDSWAP_MSK (MSK(1) << GT_PCI0_CMD_SWORDSWAP_SHF)
|
396 |
|
|
#define GT_PCI0_CMD_SWORDSWAP_BIT GT_PCI0_CMD_SWORDSWAP_MSK
|
397 |
|
|
|
398 |
|
|
/*
|
399 |
|
|
* Misc base addresses
|
400 |
|
|
*/
|
401 |
|
|
#define GT_DEF_PCI0_IO_BASE 0x10000000UL
|
402 |
|
|
#define GT_DEF_PCI0_IO_SIZE 0x02000000UL
|
403 |
|
|
#define GT_DEF_PCI0_MEM0_BASE 0x12000000UL
|
404 |
|
|
#define GT_DEF_PCI0_MEM0_SIZE 0x02000000UL
|
405 |
|
|
#define GT_DEF_BASE 0x14000000UL
|
406 |
|
|
|
407 |
|
|
#define GT_MAX_BANKSIZE (256 * 1024 * 1024) /* Max 256MB bank */
|
408 |
|
|
#define GT_LATTIM_MIN 6 /* Minimum lat */
|
409 |
|
|
|
410 |
|
|
/*
|
411 |
|
|
* The gt64120_dep.h file must define the following macros
|
412 |
|
|
*
|
413 |
|
|
* GT_READ(ofs, data_pointer)
|
414 |
|
|
* GT_WRITE(ofs, data) - read/write GT64120 registers in 32bit
|
415 |
|
|
*
|
416 |
|
|
* TIMER - gt64120 timer irq, temporary solution until
|
417 |
|
|
* full gt64120 cascade interrupt support is in place
|
418 |
|
|
*/
|
419 |
|
|
|
420 |
|
|
#ifdef CONFIG_LASAT
|
421 |
|
|
#include <asm/gt64120/lasat/gt64120_dep.h>
|
422 |
|
|
#endif
|
423 |
|
|
|
424 |
|
|
#ifdef CONFIG_MIPS_ATLAS
|
425 |
|
|
#include <asm/gt64120/mips-boards/gt64120_dep.h>
|
426 |
|
|
#endif
|
427 |
|
|
|
428 |
|
|
#ifdef CONFIG_MIPS_EV64120
|
429 |
|
|
#include <asm/gt64120/ev64120/ev64120.h>
|
430 |
|
|
#endif
|
431 |
|
|
|
432 |
|
|
#ifdef CONFIG_MIPS_EV96100
|
433 |
|
|
#include <asm/gt64120/ev96100/gt64120_dep.h>
|
434 |
|
|
#endif
|
435 |
|
|
|
436 |
|
|
#ifdef CONFIG_MIPS_MALTA
|
437 |
|
|
#include <asm/gt64120/mips-boards/gt64120_dep.h>
|
438 |
|
|
#endif
|
439 |
|
|
|
440 |
|
|
#ifdef CONFIG_MOMENCO_OCELOT
|
441 |
|
|
#include <asm/gt64120/momenco_ocelot/gt64120_dep.h>
|
442 |
|
|
#endif
|
443 |
|
|
|
444 |
|
|
/*
|
445 |
|
|
* Because of an error/peculiarity in the Galileo chip, we need to swap the
|
446 |
|
|
* bytes when running bigendian. We also provide non-swapping versions.
|
447 |
|
|
*/
|
448 |
|
|
#define __GT_READ(ofs) \
|
449 |
|
|
(*(volatile u32 *)(GT64120_BASE+(ofs)))
|
450 |
|
|
#define __GT_WRITE(ofs, data) \
|
451 |
|
|
do { *(volatile u32 *)(GT64120_BASE+(ofs)) = (data); } while (0)
|
452 |
|
|
#define GT_READ(ofs) le32_to_cpu(__GT_READ(ofs))
|
453 |
|
|
#define GT_WRITE(ofs, data) __GT_WRITE(ofs, cpu_to_le32(data))
|
454 |
|
|
|
455 |
|
|
/*
|
456 |
|
|
* Board-dependent functions, which must be defined in
|
457 |
|
|
* arch/mips/gt64120/<board>/pci.c file.
|
458 |
|
|
*
|
459 |
|
|
* This function is called by pcibios_fixup_bus(bus), which in turn is
|
460 |
|
|
* invoked a bus is scanned. You typically fixes IRQ numbers in this routine.
|
461 |
|
|
*/
|
462 |
|
|
struct pci_bus;
|
463 |
|
|
|
464 |
|
|
extern void gt64120_board_pcibios_fixup_bus(struct pci_bus *bus);
|
465 |
|
|
|
466 |
|
|
#endif /* _ASM_GT64120_GT64120_H */
|