tx39biureg.h revision 1.5.76.1 1 1.5.76.1 yamt /* $NetBSD: tx39biureg.h,v 1.5.76.1 2008/05/18 12:32:04 yamt Exp $ */
2 1.1 uch
3 1.3 uch /*-
4 1.3 uch * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
5 1.1 uch * All rights reserved.
6 1.1 uch *
7 1.3 uch * This code is derived from software contributed to The NetBSD Foundation
8 1.3 uch * by UCHIYAMA Yasushi.
9 1.3 uch *
10 1.1 uch * Redistribution and use in source and binary forms, with or without
11 1.1 uch * modification, are permitted provided that the following conditions
12 1.1 uch * are met:
13 1.1 uch * 1. Redistributions of source code must retain the above copyright
14 1.1 uch * notice, this list of conditions and the following disclaimer.
15 1.3 uch * 2. Redistributions in binary form must reproduce the above copyright
16 1.3 uch * notice, this list of conditions and the following disclaimer in the
17 1.3 uch * documentation and/or other materials provided with the distribution.
18 1.1 uch *
19 1.3 uch * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 1.3 uch * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.3 uch * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.3 uch * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 1.3 uch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.3 uch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.3 uch * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.3 uch * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.3 uch * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.3 uch * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.3 uch * POSSIBILITY OF SUCH DAMAGE.
30 1.1 uch */
31 1.1 uch /*
32 1.1 uch * Toshiba TX3912/3922 BIU module (Bus Interface Unit)
33 1.1 uch */
34 1.1 uch
35 1.1 uch /*
36 1.1 uch * System Address Map
37 1.1 uch */
38 1.1 uch #define TX39_SYSADDR_DRAMBANK0CS1 0x00000000
39 1.1 uch #define TX39_SYSADDR_DRAMBANK1CS1 0x02000000
40 1.1 uch #define TX39_SYSADDR_DRAMBANK0 0x04000000
41 1.1 uch #define TX39_SYSADDR_DRAMBANK1 0x06000000
42 1.1 uch #define TX39_SYSADDR_DRAMBANK_LEN 0x02000000
43 1.1 uch
44 1.1 uch #define TX39_SYSADDR_CARD1 0x08000000
45 1.1 uch #define TX39_SYSADDR_CARD2 0x0C000000
46 1.1 uch /* 64MByte */
47 1.1 uch #define TX39_SYSADDR_CARD_SIZE 0x04000000
48 1.1 uch
49 1.1 uch #define TX39_SYSADDR_CS1 0x10000000
50 1.1 uch #define TX39_SYSADDR_CS2 0x10400000
51 1.1 uch #define TX39_SYSADDR_CS3 0x10800000
52 1.1 uch /* 4MByte */
53 1.1 uch #define TX39_SYSADDR_CS_SIZE 0x00400000
54 1.1 uch
55 1.1 uch #define TX39_SYSADDR_CONFIG_REG 0x10c00000
56 1.1 uch #define TX39_SYSADDR_CONFIG_REG_LEN 0x00200000
57 1.1 uch
58 1.1 uch #define TX39_SYSADDR_SDRAMBANK0MODE_REG 0x10e00000
59 1.1 uch #define TX39_SYSADDR_SDRAMBANK1MODE_REG 0x10f00000
60 1.1 uch #define TX39_SYSADDR_CS0 0x11000000
61 1.1 uch #define TX39_SYSADDR_KUSEG_DRAMBANK0CS1 0x40000000
62 1.1 uch #define TX39_SYSADDR_KUSEG_DRAMBANK1CS1 0x42000000
63 1.1 uch #define TX39_SYSADDR_KUSEG_DRAMBANK0 0x44000000
64 1.1 uch #define TX39_SYSADDR_KUSEG_DRAMBANK1 0x46000000
65 1.1 uch #define TX39_SYSADDR_KUSEG_CS0 0x50000000
66 1.1 uch #define TX39_SYSADDR_KUSEG_CS1 0x58000000
67 1.1 uch #define TX39_SYSADDR_KUSEG_CS2 0x5c000000
68 1.1 uch #define TX39_SYSADDR_KUSEG_CS3 0x60000000
69 1.4 nakayama /* 64MByte */
70 1.4 nakayama #define TX39_SYSADDR_KUCS_SIZE 0x04000000
71 1.4 nakayama
72 1.1 uch #define TX39_SYSADDR_CARD1MEM 0x64000000
73 1.1 uch #define TX39_SYSADDR_CARD2MEM 0x68000000
74 1.1 uch #define TX39_SYSADDR_MCS0 0x6c000000
75 1.1 uch #define TX39_SYSADDR_MCS1 0x70000000
76 1.1 uch #ifdef TX391X
77 1.1 uch #define TX39_SYSADDR_MCS2 0x74000000
78 1.2 uch #define TX39_SYSADDR_MCS3 0x78000000
79 1.1 uch #endif /* TX391X */
80 1.1 uch /* 64MByte */
81 1.1 uch #define TX39_SYSADDR_MCS_SIZE 0x04000000
82 1.1 uch
83 1.1 uch /*
84 1.1 uch * BIU module registers.
85 1.1 uch */
86 1.1 uch #define TX39_MEMCONFIG0_REG 0x00
87 1.1 uch #define TX39_MEMCONFIG1_REG 0x04
88 1.1 uch #define TX39_MEMCONFIG2_REG 0x08
89 1.1 uch #define TX39_MEMCONFIG3_REG 0x0C
90 1.1 uch #define TX39_MEMCONFIG4_REG 0x10
91 1.1 uch #define TX39_MEMCONFIG5_REG 0x14
92 1.1 uch #define TX39_MEMCONFIG6_REG 0x18
93 1.1 uch #define TX39_MEMCONFIG7_REG 0x1C
94 1.1 uch #define TX39_MEMCONFIG8_REG 0x20
95 1.1 uch
96 1.1 uch /*
97 1.1 uch * Memory Configuration 0 Register
98 1.1 uch */
99 1.1 uch /* R/W */
100 1.1 uch #define TX39_MEMCONFIG0_ENDCLKOUTTRI 0x40000000
101 1.1 uch #define TX39_MEMCONFIG0_DISDQMINIT 0x20000000
102 1.1 uch #define TX39_MEMCONFIG0_ENSDRAMPD 0x10000000
103 1.1 uch #define TX39_MEMCONFIG0_SHOWDINO 0x08000000
104 1.1 uch #define TX39_MEMCONFIG0_ENRMAP2 0x04000000
105 1.1 uch #define TX39_MEMCONFIG0_ENRMAP1 0x02000000
106 1.1 uch #define TX39_MEMCONFIG0_ENWRINPAGE 0x01000000
107 1.1 uch #define TX39_MEMCONFIG0_ENCS3USER 0x00800000
108 1.1 uch #define TX39_MEMCONFIG0_ENCS2USER 0x00400000
109 1.1 uch #define TX39_MEMCONFIG0_ENCS1USER 0x00200000
110 1.1 uch #define TX39_MEMCONFIG0_ENCS1DRAM 0x00100000
111 1.1 uch
112 1.1 uch #define TX39_MEMCONFIG0_BANK1CONF_SHIFT 18
113 1.1 uch #define TX39_MEMCONFIG0_BANK1CONF_MASK 0x3
114 1.3 uch #define TX39_MEMCONFIG0_BANK1CONF(cr) \
115 1.3 uch (((cr) >> TX39_MEMCONFIG0_BANK1CONF_SHIFT) & \
116 1.1 uch TX39_MEMCONFIG0_BANK1CONF_MASK)
117 1.3 uch #define TX39_MEMCONFIG0_BANK1CONF_SET(cr, val) \
118 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG0_BANK1CONF_SHIFT) & \
119 1.1 uch (TX39_MEMCONFIG0_BANK1CONF_MASK << TX39_MEMCONFIG0_BANK1CONF_SHIFT)))
120 1.1 uch #define TX39_MEMCONFIG0_BANK0CONF_SHIFT 16
121 1.1 uch #define TX39_MEMCONFIG0_BANK0CONF_MASK 0x3
122 1.3 uch #define TX39_MEMCONFIG0_BANK0CONF(cr) \
123 1.3 uch (((cr) >> TX39_MEMCONFIG0_BANK0CONF_SHIFT) & \
124 1.1 uch TX39_MEMCONFIG0_BANK0CONF_MASK)
125 1.3 uch #define TX39_MEMCONFIG0_BANK0CONF_SET(cr, val) \
126 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG0_BANK0CONF_SHIFT) & \
127 1.1 uch (TX39_MEMCONFIG0_BANK0CONF_MASK << TX39_MEMCONFIG0_BANK0CONF_SHIFT)))
128 1.1 uch #define TX39_MEMCONFIG0_BANKCONF_16BITSDRAM 0x3
129 1.1 uch #define TX39_MEMCONFIG0_BANKCONF_8BITSDRAM 0x2
130 1.1 uch #define TX39_MEMCONFIG0_BANKCONF_32BITSDHDRAM 0x1
131 1.1 uch #define TX39_MEMCONFIG0_BANKCONF_16BITSDHDRAM 0x0
132 1.1 uch
133 1.1 uch #define TX39_MEMCONFIG0_ROWSEL1_SHIFT 14
134 1.1 uch #define TX39_MEMCONFIG0_ROWSEL1_MASK 0x3
135 1.3 uch #define TX39_MEMCONFIG0_ROWSEL1(cr) \
136 1.3 uch (((cr) >> TX39_MEMCONFIG0_ROWSEL1_SHIFT) & \
137 1.1 uch TX39_MEMCONFIG0_ROWSEL1_MASK)
138 1.3 uch #define TX39_MEMCONFIG0_ROWSEL1_SET(cr, val) \
139 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG0_ROWSEL1_SHIFT) & \
140 1.1 uch (TX39_MEMCONFIG0_ROWSEL1_MASK << TX39_MEMCONFIG0_ROWSEL1_SHIFT)))
141 1.1 uch #define TX39_MEMCONFIG0_ROWSEL0_SHIFT 12
142 1.1 uch #define TX39_MEMCONFIG0_ROWSEL0_MASK 0x3
143 1.3 uch #define TX39_MEMCONFIG0_ROWSEL0(cr) \
144 1.3 uch (((cr) >> TX39_MEMCONFIG0_ROWSEL0_SHIFT) & \
145 1.1 uch TX39_MEMCONFIG0_ROWSEL0_MASK)
146 1.3 uch #define TX39_MEMCONFIG0_ROWSEL0_SET(cr, val) \
147 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG0_ROWSEL0_SHIFT) & \
148 1.1 uch (TX39_MEMCONFIG0_ROWSEL0_MASK << TX39_MEMCONFIG0_ROWSEL0_SHIFT)))
149 1.1 uch
150 1.1 uch #define TX39_MEMCONFIG0_COLSEL1_SHIFT 8
151 1.1 uch #define TX39_MEMCONFIG0_COLSEL1_MASK 0xf
152 1.3 uch #define TX39_MEMCONFIG0_COLSEL1(cr) \
153 1.3 uch (((cr) >> TX39_MEMCONFIG0_COLSEL1_SHIFT) & \
154 1.1 uch TX39_MEMCONFIG0_COLSEL1_MASK)
155 1.3 uch #define TX39_MEMCONFIG0_COLSEL1_SET(cr, val) \
156 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG0_COLSEL1_SHIFT) & \
157 1.1 uch (TX39_MEMCONFIG0_COLSEL1_MASK << TX39_MEMCONFIG0_COLSEL1_SHIFT)))
158 1.1 uch #define TX39_MEMCONFIG0_COLSEL0_SHIFT 4
159 1.1 uch #define TX39_MEMCONFIG0_COLSEL0_MASK 0xf
160 1.3 uch #define TX39_MEMCONFIG0_COLSEL0(cr) \
161 1.3 uch (((cr) >> TX39_MEMCONFIG0_COLSEL0_SHIFT) & \
162 1.1 uch TX39_MEMCONFIG0_COLSEL0_MASK)
163 1.3 uch #define TX39_MEMCONFIG0_COLSEL0_SET(cr, val) \
164 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG0_COLSEL0_SHIFT) & \
165 1.1 uch (TX39_MEMCONFIG0_COLSEL0_MASK << TX39_MEMCONFIG0_COLSEL0_SHIFT)))
166 1.1 uch
167 1.1 uch #define TX39_MEMCONFIG0_CS3SIZE 0x00000008
168 1.1 uch #define TX39_MEMCONFIG0_CS2SIZE 0x00000004
169 1.1 uch #define TX39_MEMCONFIG0_CS1SIZE 0x00000002
170 1.1 uch #define TX39_MEMCONFIG0_CS0SIZE 0x00000001
171 1.1 uch
172 1.1 uch /*
173 1.1 uch * Memory Configuration 1 Register
174 1.1 uch */
175 1.1 uch #ifdef TX391X
176 1.1 uch #define TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT 28
177 1.1 uch #define TX39_MEMCONFIG1_MCS3ACCVAL1_MASK 0xf
178 1.3 uch #define TX39_MEMCONFIG1_MCS3ACCVAL1(cr) \
179 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT) & \
180 1.1 uch TX39_MEMCONFIG1_MCS3ACCVAL1_MASK)
181 1.3 uch #define TX39_MEMCONFIG1_MCS3ACCVAL1_SET(cr, val) \
182 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT) & \
183 1.3 uch (TX39_MEMCONFIG1_MCS3ACCVAL1_MASK << \
184 1.3 uch TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT)))
185 1.1 uch
186 1.1 uch #define TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT 24
187 1.1 uch #define TX39_MEMCONFIG1_MCS3ACCVAL2_MASK 0xf
188 1.3 uch #define TX39_MEMCONFIG1_MCS3ACCVAL2(cr) \
189 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT) & \
190 1.1 uch TX39_MEMCONFIG1_MCS3ACCVAL2_MASK)
191 1.3 uch #define TX39_MEMCONFIG1_MCS3ACCVAL2_SET(cr, val) \
192 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT) & \
193 1.3 uch (TX39_MEMCONFIG1_MCS3ACCVAL2_MASK << \
194 1.3 uch TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT)))
195 1.1 uch
196 1.1 uch #define TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT 20
197 1.1 uch #define TX39_MEMCONFIG1_MCS2ACCVAL1_MASK 0xf
198 1.3 uch #define TX39_MEMCONFIG1_MCS2ACCVAL1(cr) \
199 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT) & \
200 1.1 uch TX39_MEMCONFIG1_MCS2ACCVAL1_MASK)
201 1.3 uch #define TX39_MEMCONFIG1_MCS2ACCVAL1_SET(cr, val) \
202 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT) & \
203 1.3 uch (TX39_MEMCONFIG1_MCS2ACCVAL1_MASK << \
204 1.3 uch TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT)))
205 1.1 uch
206 1.1 uch #define TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT 16
207 1.1 uch #define TX39_MEMCONFIG1_MCS2ACCVAL2_MASK 0xf
208 1.3 uch #define TX39_MEMCONFIG1_MCS2ACCVAL2(cr) \
209 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT) & \
210 1.1 uch TX39_MEMCONFIG1_MCS2ACCVAL2_MASK)
211 1.3 uch #define TX39_MEMCONFIG1_MCS2ACCVAL2_SET(cr, val) \
212 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT) & \
213 1.3 uch (TX39_MEMCONFIG1_MCS2ACCVAL2_MASK << \
214 1.3 uch TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT)))
215 1.1 uch #endif /* TX391X */
216 1.1 uch #ifdef TX392X
217 1.1 uch #define TX39_MEMCONFIG1_C48MPLLON 0x40000000
218 1.1 uch #define TX39_MEMCONFIG1_ENMCS1BE 0x20000000
219 1.1 uch #define TX39_MEMCONFIG1_ENMCS0BE 0x10000000
220 1.1 uch #define TX39_MEMCONFIG1_ENMCS1ACC 0x08000000
221 1.1 uch #define TX39_MEMCONFIG1_ENMCS0ACC 0x04000000
222 1.1 uch #define TX39_MEMCONFIG1_BCLKDIV_SHIFT 23
223 1.1 uch #define TX39_MEMCONFIG1_BCLKDIV_MASK 0x7
224 1.3 uch #define TX39_MEMCONFIG1_BCLKDIV(cr) \
225 1.3 uch (((cr) >> TX39_MEMCONFIG1_BCLKDIV_SHIFT) & \
226 1.1 uch TX39_MEMCONFIG1_BCLKDIV_MASK)
227 1.3 uch #define TX39_MEMCONFIG1_BCLKDIV_SET(cr, val) \
228 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_BCLKDIV_SHIFT) & \
229 1.1 uch (TX39_MEMCONFIG1_BCLKDIV_MASK << TX39_MEMCONFIG1_BCLKDIV_SHIFT)))
230 1.1 uch #define TX39_MEMCONFIG1_ENBCLK 0x00400000
231 1.1 uch #define TX39_MEMCONFIG1_ENMCS1PAGE 0x00200000
232 1.1 uch #define TX39_MEMCONFIG1_ENMCS0PAGE 0x00100000
233 1.1 uch #define TX39_MEMCONFIG1_ENMCS1WAIT 0x00080000
234 1.1 uch #define TX39_MEMCONFIG1_ENMCS0WAIT 0x00040000
235 1.1 uch #define TX39_MEMCONFIG1_MCS1_32 0x00020000
236 1.1 uch #define TX39_MEMCONFIG1_MCS0_32 0x00010000
237 1.1 uch #endif /* TX392X */
238 1.1 uch
239 1.1 uch #define TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT 12
240 1.1 uch #define TX39_MEMCONFIG1_MCS1ACCVAL1_MASK 0xf
241 1.3 uch #define TX39_MEMCONFIG1_MCS1ACCVAL1(cr) \
242 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT) & \
243 1.1 uch TX39_MEMCONFIG1_MCS1ACCVAL1_MASK)
244 1.3 uch #define TX39_MEMCONFIG1_MCS1ACCVAL1_SET(cr, val) \
245 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT) & \
246 1.3 uch (TX39_MEMCONFIG1_MCS1ACCVAL1_MASK << \
247 1.3 uch TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT)))
248 1.1 uch
249 1.1 uch #define TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT 8
250 1.1 uch #define TX39_MEMCONFIG1_MCS1ACCVAL2_MASK 0xf
251 1.3 uch #define TX39_MEMCONFIG1_MCS1ACCVAL2(cr) \
252 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT) & \
253 1.1 uch TX39_MEMCONFIG1_MCS1ACCVAL2_MASK)
254 1.3 uch #define TX39_MEMCONFIG1_MCS1ACCVAL2_SET(cr, val) \
255 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT) & \
256 1.3 uch (TX39_MEMCONFIG1_MCS1ACCVAL2_MASK << \
257 1.3 uch TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT)))
258 1.1 uch
259 1.1 uch #define TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT 4
260 1.1 uch #define TX39_MEMCONFIG1_MCS0ACCVAL1_MASK 0xf
261 1.3 uch #define TX39_MEMCONFIG1_MCS0ACCVAL1(cr) \
262 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT) & \
263 1.1 uch TX39_MEMCONFIG1_MCS0ACCVAL1_MASK)
264 1.3 uch #define TX39_MEMCONFIG1_MCS0ACCVAL1_SET(cr, val) \
265 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT) & \
266 1.3 uch (TX39_MEMCONFIG1_MCS0ACCVAL1_MASK << \
267 1.3 uch TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT)))
268 1.1 uch
269 1.1 uch #define TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT 0
270 1.1 uch #define TX39_MEMCONFIG1_MCS0ACCVAL2_MASK 0xf
271 1.3 uch #define TX39_MEMCONFIG1_MCS0ACCVAL2(cr) \
272 1.3 uch (((cr) >> TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT) & \
273 1.1 uch TX39_MEMCONFIG1_MCS0ACCVAL2_MASK)
274 1.3 uch #define TX39_MEMCONFIG1_MCS0ACCVAL2_SET(cr, val) \
275 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT) & \
276 1.3 uch (TX39_MEMCONFIG1_MCS0ACCVAL2_MASK << \
277 1.3 uch TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT)))
278 1.1 uch
279 1.1 uch /*
280 1.1 uch * Memory Configuration 2 Register
281 1.1 uch */
282 1.1 uch /* Define access timing. not required yet */
283 1.1 uch #define TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT 28
284 1.3 uch #define TX39_MEMCONFIG2_CS3ACCVAL1_MASK 0xf
285 1.3 uch #define TX39_MEMCONFIG2_CS3ACCVAL1(cr) \
286 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT) & \
287 1.1 uch TX39_MEMCONFIG2_CS3ACCVAL1_MASK)
288 1.3 uch #define TX39_MEMCONFIG2_CS3ACCVAL1_SET(cr, val) \
289 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT) & \
290 1.1 uch (TX39_MEMCONFIG2_CS3ACCVAL1_MASK << TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT)))
291 1.1 uch
292 1.1 uch #define TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT 24
293 1.3 uch #define TX39_MEMCONFIG2_CS3ACCVAL2_MASK 0xf
294 1.3 uch #define TX39_MEMCONFIG2_CS3ACCVAL2(cr) \
295 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT) & \
296 1.1 uch TX39_MEMCONFIG2_CS3ACCVAL2_MASK)
297 1.3 uch #define TX39_MEMCONFIG2_CS3ACCVAL2_SET(cr, val) \
298 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT) & \
299 1.1 uch (TX39_MEMCONFIG2_CS3ACCVAL2_MASK << TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT)))
300 1.1 uch
301 1.1 uch #define TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT 20
302 1.3 uch #define TX39_MEMCONFIG2_CS2ACCVAL1_MASK 0xf
303 1.3 uch #define TX39_MEMCONFIG2_CS2ACCVAL1(cr) \
304 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT) & \
305 1.1 uch TX39_MEMCONFIG2_CS2ACCVAL1_MASK)
306 1.3 uch #define TX39_MEMCONFIG2_CS2ACCVAL1_SET(cr, val) \
307 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT) & \
308 1.1 uch (TX39_MEMCONFIG2_CS2ACCVAL1_MASK << TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT)))
309 1.1 uch
310 1.1 uch #define TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT 16
311 1.3 uch #define TX39_MEMCONFIG2_CS2ACCVAL2_MASK 0xf
312 1.3 uch #define TX39_MEMCONFIG2_CS2ACCVAL2(cr) \
313 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT) & \
314 1.1 uch TX39_MEMCONFIG2_CS2ACCVAL2_MASK)
315 1.3 uch #define TX39_MEMCONFIG2_CS2ACCVAL2_SET(cr, val) \
316 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT) & \
317 1.1 uch (TX39_MEMCONFIG2_CS2ACCVAL2_MASK << TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT)))
318 1.1 uch
319 1.1 uch #define TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT 12
320 1.3 uch #define TX39_MEMCONFIG2_CS1ACCVAL1_MASK 0xf
321 1.3 uch #define TX39_MEMCONFIG2_CS1ACCVAL1(cr) \
322 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT) & \
323 1.1 uch TX39_MEMCONFIG2_CS1ACCVAL1_MASK)
324 1.3 uch #define TX39_MEMCONFIG2_CS1ACCVAL1_SET(cr, val) \
325 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT) & \
326 1.1 uch (TX39_MEMCONFIG2_CS1ACCVAL1_MASK << TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT)))
327 1.1 uch
328 1.1 uch #define TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT 8
329 1.3 uch #define TX39_MEMCONFIG2_CS1ACCVAL2_MASK 0xf
330 1.3 uch #define TX39_MEMCONFIG2_CS1ACCVAL2(cr) \
331 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT) & \
332 1.1 uch TX39_MEMCONFIG2_CS1ACCVAL2_MASK)
333 1.3 uch #define TX39_MEMCONFIG2_CS1ACCVAL2_SET(cr, val) \
334 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT) & \
335 1.1 uch (TX39_MEMCONFIG2_CS1ACCVAL2_MASK << TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT)))
336 1.1 uch
337 1.1 uch #define TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT 4
338 1.3 uch #define TX39_MEMCONFIG2_CS0ACCVAL1_MASK 0xf
339 1.3 uch #define TX39_MEMCONFIG2_CS0ACCVAL1(cr) \
340 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT) & \
341 1.1 uch TX39_MEMCONFIG2_CS0ACCVAL1_MASK)
342 1.3 uch #define TX39_MEMCONFIG2_CS0ACCVAL1_SET(cr, val) \
343 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT) & \
344 1.1 uch (TX39_MEMCONFIG2_CS0ACCVAL1_MASK << TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT)))
345 1.1 uch
346 1.1 uch #define TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT 0
347 1.3 uch #define TX39_MEMCONFIG2_CS0ACCVAL2_MASK 0xf
348 1.3 uch #define TX39_MEMCONFIG2_CS0ACCVAL2(cr) \
349 1.3 uch (((cr) >> TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT) & \
350 1.1 uch TX39_MEMCONFIG2_CS0ACCVAL2_MASK)
351 1.3 uch #define TX39_MEMCONFIG2_CS0ACCVAL2_SET(cr, val) \
352 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT) & \
353 1.1 uch (TX39_MEMCONFIG2_CS0ACCVAL2_MASK << TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT)))
354 1.1 uch
355 1.1 uch /*
356 1.1 uch * Memory Configuration 3 Register
357 1.1 uch */
358 1.1 uch /* Define access timing, enable read page mode, PC-Card. */
359 1.1 uch #define TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT 28
360 1.1 uch #define TX39_MEMCONFIG3_CARD2ACCVAL_MASK 0xf
361 1.3 uch #define TX39_MEMCONFIG3_CARD2ACCVAL(cr) \
362 1.3 uch (((cr) >> TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT) & \
363 1.1 uch TX39_MEMCONFIG3_CARD2ACCVAL_MASK)
364 1.3 uch #define TX39_MEMCONFIG3_CARD2ACCVAL_SET(cr, val) \
365 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT) & \
366 1.3 uch (TX39_MEMCONFIG3_CARD2ACCVAL_MASK << \
367 1.3 uch TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT)))
368 1.1 uch
369 1.1 uch #define TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT 24
370 1.1 uch #define TX39_MEMCONFIG3_CARD1ACCVAL_MASK 0xf
371 1.3 uch #define TX39_MEMCONFIG3_CARD1ACCVAL(cr) \
372 1.3 uch (((cr) >> TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT) & \
373 1.1 uch TX39_MEMCONFIG3_CARD1ACCVAL_MASK)
374 1.3 uch #define TX39_MEMCONFIG3_CARD1ACCVAL_SET(cr, val) \
375 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT) & \
376 1.3 uch (TX39_MEMCONFIG3_CARD1ACCVAL_MASK << \
377 1.3 uch TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT)))
378 1.1 uch
379 1.1 uch #define TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT 20
380 1.1 uch #define TX39_MEMCONFIG3_CARD2IOACCVAL_MASK 0xf
381 1.3 uch #define TX39_MEMCONFIG3_CARD2IOACCVAL(cr) \
382 1.3 uch (((cr) >> TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT) & \
383 1.1 uch TX39_MEMCONFIG3_CARD2IOACCVAL_MASK)
384 1.3 uch #define TX39_MEMCONFIG3_CARD2IOACCVAL_SET(cr, val) \
385 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT) & \
386 1.3 uch (TX39_MEMCONFIG3_CARD2IOACCVAL_MASK << \
387 1.3 uch TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT)))
388 1.1 uch
389 1.1 uch #define TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT 16
390 1.1 uch #define TX39_MEMCONFIG3_CARD1IOACCVAL_MASK 0xf
391 1.3 uch #define TX39_MEMCONFIG3_CARD1IOACCVAL(cr) \
392 1.3 uch (((cr) >> TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT) & \
393 1.1 uch TX39_MEMCONFIG3_CARD1IOACCVAL_MASK)
394 1.3 uch #define TX39_MEMCONFIG3_CARD1IOACCVAL_SET(cr, val) \
395 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT) & \
396 1.3 uch (TX39_MEMCONFIG3_CARD1IOACCVAL_MASK << \
397 1.3 uch TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT)))
398 1.1 uch #ifdef TX391X
399 1.3 uch #define TX39_MEMCONFIG3_ENMCS3PAGE 0x00008000
400 1.3 uch #define TX39_MEMCONFIG3_ENMCS2PAGE 0x00004000
401 1.3 uch #define TX39_MEMCONFIG3_ENMCS1PAGE 0x00002000
402 1.3 uch #define TX39_MEMCONFIG3_ENMCS0PAGE 0x00001000
403 1.1 uch #endif /* TX391X */
404 1.3 uch #define TX39_MEMCONFIG3_ENCS3PAGE 0x00000800
405 1.3 uch #define TX39_MEMCONFIG3_ENCS2PAGE 0x00000400
406 1.3 uch #define TX39_MEMCONFIG3_ENCS1PAGE 0x00000200
407 1.3 uch #define TX39_MEMCONFIG3_ENCS0PAGE 0x00000100
408 1.3 uch #define TX39_MEMCONFIG3_CARD2WAITEN 0x00000080
409 1.3 uch #define TX39_MEMCONFIG3_CARD1WAITEN 0x00000040
410 1.3 uch #define TX39_MEMCONFIG3_CARD2IOEN 0x00000020
411 1.3 uch #define TX39_MEMCONFIG3_CARD1IOEN 0x00000010
412 1.1 uch #ifdef TX391X
413 1.3 uch #define TX39_MEMCONFIG3_PORT8SEL 0x00000008
414 1.1 uch #endif /* TX391X */
415 1.1 uch #ifdef TX392X
416 1.3 uch #define TX39_MEMCONFIG3_CARD2_8SEL 0x00000008
417 1.3 uch #define TX39_MEMCONFIG3_CARD1_8SEL 0x00000004
418 1.1 uch #endif /* TX392X */
419 1.1 uch /*
420 1.1 uch * Memory Configuration 4 Register
421 1.1 uch */
422 1.1 uch /* DMA */
423 1.1 uch #define TX39_MEMCONFIG4_ENBANK1HDRAM 0x80000000
424 1.1 uch #define TX39_MEMCONFIG4_ENBANK0HDRAM 0x40000000
425 1.1 uch #define TX39_MEMCONFIG4_ENARB 0x20000000
426 1.1 uch #define TX39_MEMCONFIG4_DISSNOOP 0x10000000
427 1.1 uch #define TX39_MEMCONFIG4_CLRWRBUSERRINT 0x08000000
428 1.1 uch #define TX39_MEMCONFIG4_ENBANK1OPT 0x04000000
429 1.1 uch #define TX39_MEMCONFIG4_ENBANK0OPT 0x02000000
430 1.1 uch #define TX39_MEMCONFIG4_ENWATCH 0x01000000
431 1.1 uch
432 1.1 uch /*
433 1.1 uch * WatchDogTimerRate = (WATCHTIME[3:0] + 1) * 64 / 36.864MHz
434 1.1 uch */
435 1.1 uch #define TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT 20
436 1.1 uch #define TX39_MEMCONFIG4_WATCHTIMEVAL_MASK 0xf
437 1.3 uch #define TX39_MEMCONFIG4_WATCHTIMEVAL(cr) \
438 1.3 uch (((cr) >> TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT) & \
439 1.1 uch TX39_MEMCONFIG4_WATCHTIMEVAL_MASK)
440 1.3 uch #define TX39_MEMCONFIG4_WATCHTIMEVAL_SET(cr, val) \
441 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT) & \
442 1.3 uch (TX39_MEMCONFIG4_WATCHTIMEVAL_MASK << \
443 1.3 uch TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT)))
444 1.1 uch
445 1.1 uch
446 1.1 uch #define TX39_MEMCONFIG4_MEMPOWERDOWN 0x00010000
447 1.1 uch #define TX39_MEMCONFIG4_ENRFSH1 0x00008000
448 1.1 uch #define TX39_MEMCONFIG4_ENRFSH0 0x00004000
449 1.1 uch
450 1.1 uch #define TX39_MEMCONFIG4_RFSHVAL1_SHIFT 8
451 1.1 uch #define TX39_MEMCONFIG4_RFSHVAL1_MASK 0x3f
452 1.3 uch #define TX39_MEMCONFIG4_RFSHVAL1(cr) \
453 1.3 uch (((cr) >> TX39_MEMCONFIG4_RFSHVAL1_SHIFT) & \
454 1.1 uch TX39_MEMCONFIG4_RFSHVAL1_MASK)
455 1.3 uch #define TX39_MEMCONFIG4_RFSHVAL1_SET(cr, val) \
456 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG4_RFSHVAL1_SHIFT) & \
457 1.1 uch (TX39_MEMCONFIG4_RFSHVAL1_MASK << TX39_MEMCONFIG4_RFSHVAL1_SHIFT)))
458 1.1 uch
459 1.1 uch #define TX39_MEMCONFIG4_RFSHVAL0_SHIFT 0
460 1.1 uch #define TX39_MEMCONFIG4_RFSHVAL0_MASK 0x3f
461 1.3 uch #define TX39_MEMCONFIG4_RFSHVAL0(cr) \
462 1.3 uch (((cr) >> TX39_MEMCONFIG4_RFSHVAL0_SHIFT) & \
463 1.1 uch TX39_MEMCONFIG4_RFSHVAL0_MASK)
464 1.3 uch #define TX39_MEMCONFIG4_RFSHVAL0_SET(cr, val) \
465 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG4_RFSHVAL0_SHIFT) & \
466 1.1 uch (TX39_MEMCONFIG4_RFSHVAL0_MASK << TX39_MEMCONFIG4_RFSHVAL0_SHIFT)))
467 1.1 uch
468 1.1 uch /*
469 1.1 uch * Memory Configuration 5 Register
470 1.1 uch */
471 1.1 uch /* Address remap region 2 */
472 1.1 uch #define TX39_MEMCONFIG5_STARTVAL2_SHIFT 9
473 1.1 uch #define TX39_MEMCONFIG5_STARTVAL2_MASK 0x007fffff
474 1.3 uch #define TX39_MEMCONFIG5_STARTVAL2(cr) \
475 1.3 uch (((cr) >> TX39_MEMCONFIG5_STARTVAL2_SHIFT) & \
476 1.1 uch TX39_MEMCONFIG5_STARTVAL2_MASK)
477 1.3 uch #define TX39_MEMCONFIG5_STARTVAL2_SET(cr, val) \
478 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG5_STARTVAL2_SHIFT) & \
479 1.1 uch (TX39_MEMCONFIG5_STARTVAL2_MASK << TX39_MEMCONFIG5_STARTVAL2_SHIFT)))
480 1.1 uch
481 1.1 uch #define TX39_MEMCONFIG5_MASK2_SHIFT 0
482 1.1 uch #define TX39_MEMCONFIG5_MASK2_MASK 0xf
483 1.3 uch #define TX39_MEMCONFIG5_MASK2(cr) \
484 1.3 uch (((cr) >> TX39_MEMCONFIG5_MASK2_SHIFT) & \
485 1.1 uch TX39_MEMCONFIG5_MASK2_MASK)
486 1.3 uch #define TX39_MEMCONFIG5_MASK2_SET(cr, val) \
487 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG5_MASK2_SHIFT) & \
488 1.1 uch (TX39_MEMCONFIG5_MASK2_MASK << TX39_MEMCONFIG5_MASK2_SHIFT)))
489 1.1 uch
490 1.1 uch /*
491 1.1 uch * Memory Configuration 6 Register
492 1.1 uch */
493 1.1 uch /* Address remap region 1 */
494 1.1 uch #define TX39_MEMCONFIG6_STARTVAL1_SHIFT 9
495 1.1 uch #define TX39_MEMCONFIG6_STARTVAL1_MASK 0x007fffff
496 1.3 uch #define TX39_MEMCONFIG6_STARTVAL1(cr) \
497 1.3 uch (((cr) >> TX39_MEMCONFIG6_STARTVAL1_SHIFT) & \
498 1.1 uch TX39_MEMCONFIG6_STARTVAL1_MASK)
499 1.3 uch #define TX39_MEMCONFIG6_STARTVAL1_SET(cr, val) \
500 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG6_STARTVAL1_SHIFT) & \
501 1.1 uch (TX39_MEMCONFIG6_STARTVAL1_MASK << TX39_MEMCONFIG6_STARTVAL1_SHIFT)))
502 1.1 uch
503 1.1 uch #define TX39_MEMCONFIG6_MASK1_SHIFT 0
504 1.1 uch #define TX39_MEMCONFIG6_MASK1_MASK 0xf
505 1.3 uch #define TX39_MEMCONFIG6_MASK1(cr) \
506 1.3 uch (((cr) >> TX39_MEMCONFIG6_MASK1_SHIFT) & \
507 1.1 uch TX39_MEMCONFIG6_MASK1_MASK)
508 1.3 uch #define TX39_MEMCONFIG6_MASK1_SET(cr, val) \
509 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG6_MASK1_SHIFT) & \
510 1.1 uch (TX39_MEMCONFIG6_MASK1_MASK << TX39_MEMCONFIG6_MASK1_SHIFT)))
511 1.1 uch
512 1.1 uch /*
513 1.1 uch * Memory Configuration 7 Register
514 1.1 uch */
515 1.1 uch /* Address remap region 2 */
516 1.1 uch #define TX39_MEMCONFIG7_RMAPADD2_SHIFT 9
517 1.1 uch #define TX39_MEMCONFIG7_RMAPADD2_MASK 0x007fffff
518 1.3 uch #define TX39_MEMCONFIG7_RMAPADD2(cr) \
519 1.3 uch (((cr) >> TX39_MEMCONFIG7_RMAPADD2_SHIFT) & \
520 1.1 uch TX39_MEMCONFIG7_RMAPADD2_MASK)
521 1.3 uch #define TX39_MEMCONFIG7_RMAPADD2_SET(cr, val) \
522 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG7_RMAPADD2_SHIFT) & \
523 1.1 uch (TX39_MEMCONFIG7_RMAPADD2_MASK << TX39_MEMCONFIG7_RMAPADD2_SHIFT)))
524 1.1 uch
525 1.1 uch /*
526 1.1 uch * Memory Configuration 8 Register
527 1.1 uch */
528 1.1 uch /* Address remap region 1 */
529 1.1 uch #define TX39_MEMCONFIG8_RMAPADD1_SHIFT 9
530 1.1 uch #define TX39_MEMCONFIG8_RMAPADD1_MASK 0x007fffff
531 1.3 uch #define TX39_MEMCONFIG8_RMAPADD1(cr) \
532 1.3 uch (((cr) >> TX39_MEMCONFIG8_RMAPADD1_SHIFT) & \
533 1.1 uch TX39_MEMCONFIG8_RMAPADD1_MASK)
534 1.3 uch #define TX39_MEMCONFIG8_RMAPADD1_SET(cr, val) \
535 1.3 uch ((cr) | (((val) << TX39_MEMCONFIG8_RMAPADD1_SHIFT) & \
536 1.1 uch (TX39_MEMCONFIG8_RMAPADD1_MASK << TX39_MEMCONFIG8_RMAPADD1_SHIFT)))
537