1menu "BATS setup"
2
3menuconfig BAT0
4	bool "BAT0"
5
6if BAT0
7
8config BAT0_NAME
9	string "Identifier"
10
11config BAT0_BASE
12	hex "Base"
13
14choice
15	prompt "Block length"
16
17config BAT0_LENGTH_128_KBYTES
18	bool "128 kb"
19
20config BAT0_LENGTH_256_KBYTES
21	bool "256 kb"
22
23config BAT0_LENGTH_512_KBYTES
24	bool "512 kb"
25
26config BAT0_LENGTH_1_MBYTES
27	bool "1 mb"
28
29config BAT0_LENGTH_2_MBYTES
30	bool "2 mb"
31
32config BAT0_LENGTH_4_MBYTES
33	bool "4 mb"
34
35config BAT0_LENGTH_8_MBYTES
36	bool "8 mb"
37
38config BAT0_LENGTH_16_MBYTES
39	bool "16 mb"
40
41config BAT0_LENGTH_32_MBYTES
42	bool "32 mb"
43
44config BAT0_LENGTH_64_MBYTES
45	bool "64 mb"
46
47config BAT0_LENGTH_128_MBYTES
48	bool "128 mb"
49
50config BAT0_LENGTH_256_MBYTES
51	bool "256 mb"
52endchoice
53
54choice
55	prompt "Protection mode"
56
57config BAT0_ACCESS_NONE
58	bool "No access"
59
60config BAT0_ACCESS_RO
61	bool "Read-only"
62
63config BAT0_ACCESS_RW
64	bool "Read-write"
65
66endchoice
67
68config BAT0_ICACHE_WRITETHROUGH
69	bool "I-cache Write-through"
70
71config BAT0_ICACHE_INHIBITED
72	bool "I-cache Inhibited"
73
74config BAT0_ICACHE_MEMORYCOHERENCE
75	bool "I-cache Memory coherence"
76
77config BAT0_ICACHE_GUARDED
78	bool "I-cache Guarded"
79
80config BAT0_DCACHE_WRITETHROUGH
81	bool "D-cache Write-through"
82
83config BAT0_DCACHE_INHIBITED
84	bool "D-cache Inhibited"
85
86config BAT0_DCACHE_MEMORYCOHERENCE
87	bool "D-cache Memory coherence"
88
89config BAT0_DCACHE_GUARDED
90	bool "D-cache Guarded"
91
92config BAT0_USER_MODE_VALID
93	bool "User mode valid"
94
95config BAT0_SUPERVISOR_MODE_VALID
96	bool "Supervisor mode valid"
97
98endif
99
100config BAT0_LENGTH
101	hex
102	default 0x00000000 if BAT0_LENGTH_128_KBYTES
103	default 0x00000004 if BAT0_LENGTH_256_KBYTES
104	default 0x0000000c if BAT0_LENGTH_512_KBYTES
105	default 0x0000001c if BAT0_LENGTH_1_MBYTES
106	default 0x0000003c if BAT0_LENGTH_2_MBYTES
107	default 0x0000007c if BAT0_LENGTH_4_MBYTES
108	default 0x000000fc if BAT0_LENGTH_8_MBYTES
109	default 0x000001fc if BAT0_LENGTH_16_MBYTES
110	default 0x000003fc if BAT0_LENGTH_32_MBYTES
111	default 0x000007fc if BAT0_LENGTH_64_MBYTES
112	default 0x00000ffc if BAT0_LENGTH_128_MBYTES
113	default 0x00001ffc if BAT0_LENGTH_256_MBYTES
114
115config BAT0_PAGE_PROTECTION
116	hex
117	default 0x0 if BAT0_ACCESS_NONE
118	default 0x1 if BAT0_ACCESS_RO
119	default 0x2 if BAT0_ACCESS_RW
120
121config BAT0_WIMG_ICACHE
122	hex
123	default 0x0 if !BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
124	default 0x8 if !BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
125	default 0x10 if !BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
126	default 0x18 if !BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
127	default 0x20 if !BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
128	default 0x28 if !BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
129	default 0x30 if !BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
130	default 0x38 if !BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
131	default 0x40 if BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
132	default 0x48 if BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
133	default 0x50 if BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
134	default 0x58 if BAT0_ICACHE_WRITETHROUGH && !BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
135	default 0x60 if BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
136	default 0x68 if BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && !BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
137	default 0x70 if BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && !BAT0_ICACHE_GUARDED
138	default 0x78 if BAT0_ICACHE_WRITETHROUGH && BAT0_ICACHE_INHIBITED && BAT0_ICACHE_MEMORYCOHERENCE && BAT0_ICACHE_GUARDED
139
140config BAT0_WIMG_DCACHE
141	hex
142	default 0x0 if !BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
143	default 0x8 if !BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
144	default 0x10 if !BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
145	default 0x18 if !BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
146	default 0x20 if !BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
147	default 0x28 if !BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
148	default 0x30 if !BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
149	default 0x38 if !BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
150	default 0x40 if BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
151	default 0x48 if BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
152	default 0x50 if BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
153	default 0x58 if BAT0_DCACHE_WRITETHROUGH && !BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
154	default 0x60 if BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
155	default 0x68 if BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && !BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
156	default 0x70 if BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && !BAT0_DCACHE_GUARDED
157	default 0x78 if BAT0_DCACHE_WRITETHROUGH && BAT0_DCACHE_INHIBITED && BAT0_DCACHE_MEMORYCOHERENCE && BAT0_DCACHE_GUARDED
158
159config BAT0_VALID_BITS
160	hex
161	default 0x0 if !BAT0_SUPERVISOR_MODE_VALID && !BAT0_USER_MODE_VALID
162	default 0x1 if !BAT0_SUPERVISOR_MODE_VALID && BAT0_USER_MODE_VALID
163	default 0x2 if BAT0_SUPERVISOR_MODE_VALID && !BAT0_USER_MODE_VALID
164	default 0x3 if BAT0_SUPERVISOR_MODE_VALID && BAT0_USER_MODE_VALID
165
166menuconfig BAT1
167	bool "BAT1"
168
169if BAT1
170
171config BAT1_NAME
172	string "Identifier"
173
174config BAT1_BASE
175	hex "Base"
176
177choice
178	prompt "Block length"
179
180config BAT1_LENGTH_128_KBYTES
181	bool "128 kb"
182
183config BAT1_LENGTH_256_KBYTES
184	bool "256 kb"
185
186config BAT1_LENGTH_512_KBYTES
187	bool "512 kb"
188
189config BAT1_LENGTH_1_MBYTES
190	bool "1 mb"
191
192config BAT1_LENGTH_2_MBYTES
193	bool "2 mb"
194
195config BAT1_LENGTH_4_MBYTES
196	bool "4 mb"
197
198config BAT1_LENGTH_8_MBYTES
199	bool "8 mb"
200
201config BAT1_LENGTH_16_MBYTES
202	bool "16 mb"
203
204config BAT1_LENGTH_32_MBYTES
205	bool "32 mb"
206
207config BAT1_LENGTH_64_MBYTES
208	bool "64 mb"
209
210config BAT1_LENGTH_128_MBYTES
211	bool "128 mb"
212
213config BAT1_LENGTH_256_MBYTES
214	bool "256 mb"
215endchoice
216
217choice
218	prompt "Protection mode"
219
220config BAT1_ACCESS_NONE
221	bool "No access"
222
223config BAT1_ACCESS_RO
224	bool "Read-only"
225
226config BAT1_ACCESS_RW
227	bool "Read-write"
228
229endchoice
230
231config BAT1_ICACHE_WRITETHROUGH
232	bool "I-cache Write-through"
233
234config BAT1_ICACHE_INHIBITED
235	bool "I-cache Inhibited"
236
237config BAT1_ICACHE_MEMORYCOHERENCE
238	bool "I-cache Memory coherence"
239
240config BAT1_ICACHE_GUARDED
241	bool "I-cache Guarded"
242
243config BAT1_DCACHE_WRITETHROUGH
244	bool "D-cache Write-through"
245
246config BAT1_DCACHE_INHIBITED
247	bool "D-cache Inhibited"
248
249config BAT1_DCACHE_MEMORYCOHERENCE
250	bool "D-cache Memory coherence"
251
252config BAT1_DCACHE_GUARDED
253	bool "D-cache Guarded"
254
255config BAT1_USER_MODE_VALID
256	bool "User mode valid"
257
258config BAT1_SUPERVISOR_MODE_VALID
259	bool "Supervisor mode valid"
260
261endif
262
263config BAT1_LENGTH
264	hex
265	default 0x00000000 if BAT1_LENGTH_128_KBYTES
266	default 0x00000004 if BAT1_LENGTH_256_KBYTES
267	default 0x0000000c if BAT1_LENGTH_512_KBYTES
268	default 0x0000001c if BAT1_LENGTH_1_MBYTES
269	default 0x0000003c if BAT1_LENGTH_2_MBYTES
270	default 0x0000007c if BAT1_LENGTH_4_MBYTES
271	default 0x000000fc if BAT1_LENGTH_8_MBYTES
272	default 0x000001fc if BAT1_LENGTH_16_MBYTES
273	default 0x000003fc if BAT1_LENGTH_32_MBYTES
274	default 0x000007fc if BAT1_LENGTH_64_MBYTES
275	default 0x00000ffc if BAT1_LENGTH_128_MBYTES
276	default 0x00001ffc if BAT1_LENGTH_256_MBYTES
277
278config BAT1_PAGE_PROTECTION
279	hex
280	default 0x0 if BAT1_ACCESS_NONE
281	default 0x1 if BAT1_ACCESS_RO
282	default 0x2 if BAT1_ACCESS_RW
283
284config BAT1_WIMG_ICACHE
285	hex
286	default 0x0 if !BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
287	default 0x8 if !BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
288	default 0x10 if !BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
289	default 0x18 if !BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
290	default 0x20 if !BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
291	default 0x28 if !BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
292	default 0x30 if !BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
293	default 0x38 if !BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
294	default 0x40 if BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
295	default 0x48 if BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
296	default 0x50 if BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
297	default 0x58 if BAT1_ICACHE_WRITETHROUGH && !BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
298	default 0x60 if BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
299	default 0x68 if BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && !BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
300	default 0x70 if BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && !BAT1_ICACHE_GUARDED
301	default 0x78 if BAT1_ICACHE_WRITETHROUGH && BAT1_ICACHE_INHIBITED && BAT1_ICACHE_MEMORYCOHERENCE && BAT1_ICACHE_GUARDED
302
303config BAT1_WIMG_DCACHE
304	hex
305	default 0x0 if !BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
306	default 0x8 if !BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
307	default 0x10 if !BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
308	default 0x18 if !BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
309	default 0x20 if !BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
310	default 0x28 if !BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
311	default 0x30 if !BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
312	default 0x38 if !BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
313	default 0x40 if BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
314	default 0x48 if BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
315	default 0x50 if BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
316	default 0x58 if BAT1_DCACHE_WRITETHROUGH && !BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
317	default 0x60 if BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
318	default 0x68 if BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && !BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
319	default 0x70 if BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && !BAT1_DCACHE_GUARDED
320	default 0x78 if BAT1_DCACHE_WRITETHROUGH && BAT1_DCACHE_INHIBITED && BAT1_DCACHE_MEMORYCOHERENCE && BAT1_DCACHE_GUARDED
321
322config BAT1_VALID_BITS
323	hex
324	default 0x0 if !BAT1_SUPERVISOR_MODE_VALID && !BAT1_USER_MODE_VALID
325	default 0x1 if !BAT1_SUPERVISOR_MODE_VALID && BAT1_USER_MODE_VALID
326	default 0x2 if BAT1_SUPERVISOR_MODE_VALID && !BAT1_USER_MODE_VALID
327	default 0x3 if BAT1_SUPERVISOR_MODE_VALID && BAT1_USER_MODE_VALID
328
329menuconfig BAT2
330	bool "BAT2"
331
332if BAT2
333
334config BAT2_NAME
335	string "Identifier"
336
337config BAT2_BASE
338	hex "Base"
339
340choice
341	prompt "Block length"
342
343config BAT2_LENGTH_128_KBYTES
344	bool "128 kb"
345
346config BAT2_LENGTH_256_KBYTES
347	bool "256 kb"
348
349config BAT2_LENGTH_512_KBYTES
350	bool "512 kb"
351
352config BAT2_LENGTH_1_MBYTES
353	bool "1 mb"
354
355config BAT2_LENGTH_2_MBYTES
356	bool "2 mb"
357
358config BAT2_LENGTH_4_MBYTES
359	bool "4 mb"
360
361config BAT2_LENGTH_8_MBYTES
362	bool "8 mb"
363
364config BAT2_LENGTH_16_MBYTES
365	bool "16 mb"
366
367config BAT2_LENGTH_32_MBYTES
368	bool "32 mb"
369
370config BAT2_LENGTH_64_MBYTES
371	bool "64 mb"
372
373config BAT2_LENGTH_128_MBYTES
374	bool "128 mb"
375
376config BAT2_LENGTH_256_MBYTES
377	bool "256 mb"
378endchoice
379
380choice
381	prompt "Protection mode"
382
383config BAT2_ACCESS_NONE
384	bool "No access"
385
386config BAT2_ACCESS_RO
387	bool "Read-only"
388
389config BAT2_ACCESS_RW
390	bool "Read-write"
391
392endchoice
393
394config BAT2_ICACHE_WRITETHROUGH
395	bool "I-cache Write-through"
396
397config BAT2_ICACHE_INHIBITED
398	bool "I-cache Inhibited"
399
400config BAT2_ICACHE_MEMORYCOHERENCE
401	bool "I-cache Memory coherence"
402
403config BAT2_ICACHE_GUARDED
404	bool "I-cache Guarded"
405
406config BAT2_DCACHE_WRITETHROUGH
407	bool "D-cache Write-through"
408
409config BAT2_DCACHE_INHIBITED
410	bool "D-cache Inhibited"
411
412config BAT2_DCACHE_MEMORYCOHERENCE
413	bool "D-cache Memory coherence"
414
415config BAT2_DCACHE_GUARDED
416	bool "D-cache Guarded"
417
418config BAT2_USER_MODE_VALID
419	bool "User mode valid"
420
421config BAT2_SUPERVISOR_MODE_VALID
422	bool "Supervisor mode valid"
423
424endif
425
426config BAT2_LENGTH
427	hex
428	default 0x00000000 if BAT2_LENGTH_128_KBYTES
429	default 0x00000004 if BAT2_LENGTH_256_KBYTES
430	default 0x0000000c if BAT2_LENGTH_512_KBYTES
431	default 0x0000001c if BAT2_LENGTH_1_MBYTES
432	default 0x0000003c if BAT2_LENGTH_2_MBYTES
433	default 0x0000007c if BAT2_LENGTH_4_MBYTES
434	default 0x000000fc if BAT2_LENGTH_8_MBYTES
435	default 0x000001fc if BAT2_LENGTH_16_MBYTES
436	default 0x000003fc if BAT2_LENGTH_32_MBYTES
437	default 0x000007fc if BAT2_LENGTH_64_MBYTES
438	default 0x00000ffc if BAT2_LENGTH_128_MBYTES
439	default 0x00001ffc if BAT2_LENGTH_256_MBYTES
440
441config BAT2_PAGE_PROTECTION
442	hex
443	default 0x0 if BAT2_ACCESS_NONE
444	default 0x1 if BAT2_ACCESS_RO
445	default 0x2 if BAT2_ACCESS_RW
446
447config BAT2_WIMG_ICACHE
448	hex
449	default 0x0 if !BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
450	default 0x8 if !BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
451	default 0x10 if !BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
452	default 0x18 if !BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
453	default 0x20 if !BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
454	default 0x28 if !BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
455	default 0x30 if !BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
456	default 0x38 if !BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
457	default 0x40 if BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
458	default 0x48 if BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
459	default 0x50 if BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
460	default 0x58 if BAT2_ICACHE_WRITETHROUGH && !BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
461	default 0x60 if BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
462	default 0x68 if BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && !BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
463	default 0x70 if BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && !BAT2_ICACHE_GUARDED
464	default 0x78 if BAT2_ICACHE_WRITETHROUGH && BAT2_ICACHE_INHIBITED && BAT2_ICACHE_MEMORYCOHERENCE && BAT2_ICACHE_GUARDED
465
466config BAT2_WIMG_DCACHE
467	hex
468	default 0x0 if !BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
469	default 0x8 if !BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
470	default 0x10 if !BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
471	default 0x18 if !BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
472	default 0x20 if !BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
473	default 0x28 if !BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
474	default 0x30 if !BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
475	default 0x38 if !BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
476	default 0x40 if BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
477	default 0x48 if BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
478	default 0x50 if BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
479	default 0x58 if BAT2_DCACHE_WRITETHROUGH && !BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
480	default 0x60 if BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
481	default 0x68 if BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && !BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
482	default 0x70 if BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && !BAT2_DCACHE_GUARDED
483	default 0x78 if BAT2_DCACHE_WRITETHROUGH && BAT2_DCACHE_INHIBITED && BAT2_DCACHE_MEMORYCOHERENCE && BAT2_DCACHE_GUARDED
484
485config BAT2_VALID_BITS
486	hex
487	default 0x0 if !BAT2_SUPERVISOR_MODE_VALID && !BAT2_USER_MODE_VALID
488	default 0x1 if !BAT2_SUPERVISOR_MODE_VALID && BAT2_USER_MODE_VALID
489	default 0x2 if BAT2_SUPERVISOR_MODE_VALID && !BAT2_USER_MODE_VALID
490	default 0x3 if BAT2_SUPERVISOR_MODE_VALID && BAT2_USER_MODE_VALID
491
492menuconfig BAT3
493	bool "BAT3"
494
495if BAT3
496
497config BAT3_NAME
498	string "Identifier"
499
500config BAT3_BASE
501	hex "Base"
502
503choice
504	prompt "Block length"
505
506config BAT3_LENGTH_128_KBYTES
507	bool "128 kb"
508
509config BAT3_LENGTH_256_KBYTES
510	bool "256 kb"
511
512config BAT3_LENGTH_512_KBYTES
513	bool "512 kb"
514
515config BAT3_LENGTH_1_MBYTES
516	bool "1 mb"
517
518config BAT3_LENGTH_2_MBYTES
519	bool "2 mb"
520
521config BAT3_LENGTH_4_MBYTES
522	bool "4 mb"
523
524config BAT3_LENGTH_8_MBYTES
525	bool "8 mb"
526
527config BAT3_LENGTH_16_MBYTES
528	bool "16 mb"
529
530config BAT3_LENGTH_32_MBYTES
531	bool "32 mb"
532
533config BAT3_LENGTH_64_MBYTES
534	bool "64 mb"
535
536config BAT3_LENGTH_128_MBYTES
537	bool "128 mb"
538
539config BAT3_LENGTH_256_MBYTES
540	bool "256 mb"
541endchoice
542
543choice
544	prompt "Protection mode"
545
546config BAT3_ACCESS_NONE
547	bool "No access"
548
549config BAT3_ACCESS_RO
550	bool "Read-only"
551
552config BAT3_ACCESS_RW
553	bool "Read-write"
554
555endchoice
556
557config BAT3_ICACHE_WRITETHROUGH
558	bool "I-cache Write-through"
559
560config BAT3_ICACHE_INHIBITED
561	bool "I-cache Inhibited"
562
563config BAT3_ICACHE_MEMORYCOHERENCE
564	bool "I-cache Memory coherence"
565
566config BAT3_ICACHE_GUARDED
567	bool "I-cache Guarded"
568
569config BAT3_DCACHE_WRITETHROUGH
570	bool "D-cache Write-through"
571
572config BAT3_DCACHE_INHIBITED
573	bool "D-cache Inhibited"
574
575config BAT3_DCACHE_MEMORYCOHERENCE
576	bool "D-cache Memory coherence"
577
578config BAT3_DCACHE_GUARDED
579	bool "D-cache Guarded"
580
581config BAT3_USER_MODE_VALID
582	bool "User mode valid"
583
584config BAT3_SUPERVISOR_MODE_VALID
585	bool "Supervisor mode valid"
586
587endif
588
589config BAT3_LENGTH
590	hex
591	default 0x00000000 if BAT3_LENGTH_128_KBYTES
592	default 0x00000004 if BAT3_LENGTH_256_KBYTES
593	default 0x0000000c if BAT3_LENGTH_512_KBYTES
594	default 0x0000001c if BAT3_LENGTH_1_MBYTES
595	default 0x0000003c if BAT3_LENGTH_2_MBYTES
596	default 0x0000007c if BAT3_LENGTH_4_MBYTES
597	default 0x000000fc if BAT3_LENGTH_8_MBYTES
598	default 0x000001fc if BAT3_LENGTH_16_MBYTES
599	default 0x000003fc if BAT3_LENGTH_32_MBYTES
600	default 0x000007fc if BAT3_LENGTH_64_MBYTES
601	default 0x00000ffc if BAT3_LENGTH_128_MBYTES
602	default 0x00001ffc if BAT3_LENGTH_256_MBYTES
603
604config BAT3_PAGE_PROTECTION
605	hex
606	default 0x0 if BAT3_ACCESS_NONE
607	default 0x1 if BAT3_ACCESS_RO
608	default 0x2 if BAT3_ACCESS_RW
609
610config BAT3_WIMG_ICACHE
611	hex
612	default 0x0 if !BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
613	default 0x8 if !BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
614	default 0x10 if !BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
615	default 0x18 if !BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
616	default 0x20 if !BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
617	default 0x28 if !BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
618	default 0x30 if !BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
619	default 0x38 if !BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
620	default 0x40 if BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
621	default 0x48 if BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
622	default 0x50 if BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
623	default 0x58 if BAT3_ICACHE_WRITETHROUGH && !BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
624	default 0x60 if BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
625	default 0x68 if BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && !BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
626	default 0x70 if BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && !BAT3_ICACHE_GUARDED
627	default 0x78 if BAT3_ICACHE_WRITETHROUGH && BAT3_ICACHE_INHIBITED && BAT3_ICACHE_MEMORYCOHERENCE && BAT3_ICACHE_GUARDED
628
629config BAT3_WIMG_DCACHE
630	hex
631	default 0x0 if !BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
632	default 0x8 if !BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
633	default 0x10 if !BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
634	default 0x18 if !BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
635	default 0x20 if !BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
636	default 0x28 if !BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
637	default 0x30 if !BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
638	default 0x38 if !BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
639	default 0x40 if BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
640	default 0x48 if BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
641	default 0x50 if BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
642	default 0x58 if BAT3_DCACHE_WRITETHROUGH && !BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
643	default 0x60 if BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
644	default 0x68 if BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && !BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
645	default 0x70 if BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && !BAT3_DCACHE_GUARDED
646	default 0x78 if BAT3_DCACHE_WRITETHROUGH && BAT3_DCACHE_INHIBITED && BAT3_DCACHE_MEMORYCOHERENCE && BAT3_DCACHE_GUARDED
647
648config BAT3_VALID_BITS
649	hex
650	default 0x0 if !BAT3_SUPERVISOR_MODE_VALID && !BAT3_USER_MODE_VALID
651	default 0x1 if !BAT3_SUPERVISOR_MODE_VALID && BAT3_USER_MODE_VALID
652	default 0x2 if BAT3_SUPERVISOR_MODE_VALID && !BAT3_USER_MODE_VALID
653	default 0x3 if BAT3_SUPERVISOR_MODE_VALID && BAT3_USER_MODE_VALID
654
655if HIGH_BATS
656
657menuconfig BAT4
658	bool "BAT4"
659
660if BAT4
661
662config BAT4_NAME
663	string "Identifier"
664
665config BAT4_BASE
666	hex "Base"
667
668choice
669	prompt "Block length"
670
671config BAT4_LENGTH_128_KBYTES
672	bool "128 kb"
673
674config BAT4_LENGTH_256_KBYTES
675	bool "256 kb"
676
677config BAT4_LENGTH_512_KBYTES
678	bool "512 kb"
679
680config BAT4_LENGTH_1_MBYTES
681	bool "1 mb"
682
683config BAT4_LENGTH_2_MBYTES
684	bool "2 mb"
685
686config BAT4_LENGTH_4_MBYTES
687	bool "4 mb"
688
689config BAT4_LENGTH_8_MBYTES
690	bool "8 mb"
691
692config BAT4_LENGTH_16_MBYTES
693	bool "16 mb"
694
695config BAT4_LENGTH_32_MBYTES
696	bool "32 mb"
697
698config BAT4_LENGTH_64_MBYTES
699	bool "64 mb"
700
701config BAT4_LENGTH_128_MBYTES
702	bool "128 mb"
703
704config BAT4_LENGTH_256_MBYTES
705	bool "256 mb"
706endchoice
707
708choice
709	prompt "Protection mode"
710
711config BAT4_ACCESS_NONE
712	bool "No access"
713
714config BAT4_ACCESS_RO
715	bool "Read-only"
716
717config BAT4_ACCESS_RW
718	bool "Read-write"
719
720endchoice
721
722config BAT4_ICACHE_WRITETHROUGH
723	bool "I-cache Write-through"
724
725config BAT4_ICACHE_INHIBITED
726	bool "I-cache Inhibited"
727
728config BAT4_ICACHE_MEMORYCOHERENCE
729	bool "I-cache Memory coherence"
730
731config BAT4_ICACHE_GUARDED
732	bool "I-cache Guarded"
733
734config BAT4_DCACHE_WRITETHROUGH
735	bool "D-cache Write-through"
736
737config BAT4_DCACHE_INHIBITED
738	bool "D-cache Inhibited"
739
740config BAT4_DCACHE_MEMORYCOHERENCE
741	bool "D-cache Memory coherence"
742
743config BAT4_DCACHE_GUARDED
744	bool "D-cache Guarded"
745
746config BAT4_USER_MODE_VALID
747	bool "User mode valid"
748
749config BAT4_SUPERVISOR_MODE_VALID
750	bool "Supervisor mode valid"
751
752endif
753
754config BAT4_LENGTH
755	hex
756	default 0x00000000 if BAT4_LENGTH_128_KBYTES
757	default 0x00000004 if BAT4_LENGTH_256_KBYTES
758	default 0x0000000c if BAT4_LENGTH_512_KBYTES
759	default 0x0000001c if BAT4_LENGTH_1_MBYTES
760	default 0x0000003c if BAT4_LENGTH_2_MBYTES
761	default 0x0000007c if BAT4_LENGTH_4_MBYTES
762	default 0x000000fc if BAT4_LENGTH_8_MBYTES
763	default 0x000001fc if BAT4_LENGTH_16_MBYTES
764	default 0x000003fc if BAT4_LENGTH_32_MBYTES
765	default 0x000007fc if BAT4_LENGTH_64_MBYTES
766	default 0x00000ffc if BAT4_LENGTH_128_MBYTES
767	default 0x00001ffc if BAT4_LENGTH_256_MBYTES
768
769config BAT4_PAGE_PROTECTION
770	hex
771	default 0x0 if BAT4_ACCESS_NONE
772	default 0x1 if BAT4_ACCESS_RO
773	default 0x2 if BAT4_ACCESS_RW
774
775config BAT4_WIMG_ICACHE
776	hex
777	default 0x0 if !BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
778	default 0x8 if !BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
779	default 0x10 if !BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
780	default 0x18 if !BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
781	default 0x20 if !BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
782	default 0x28 if !BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
783	default 0x30 if !BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
784	default 0x38 if !BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
785	default 0x40 if BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
786	default 0x48 if BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
787	default 0x50 if BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
788	default 0x58 if BAT4_ICACHE_WRITETHROUGH && !BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
789	default 0x60 if BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
790	default 0x68 if BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && !BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
791	default 0x70 if BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && !BAT4_ICACHE_GUARDED
792	default 0x78 if BAT4_ICACHE_WRITETHROUGH && BAT4_ICACHE_INHIBITED && BAT4_ICACHE_MEMORYCOHERENCE && BAT4_ICACHE_GUARDED
793
794config BAT4_WIMG_DCACHE
795	hex
796	default 0x0 if !BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
797	default 0x8 if !BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
798	default 0x10 if !BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
799	default 0x18 if !BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
800	default 0x20 if !BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
801	default 0x28 if !BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
802	default 0x30 if !BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
803	default 0x38 if !BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
804	default 0x40 if BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
805	default 0x48 if BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
806	default 0x50 if BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
807	default 0x58 if BAT4_DCACHE_WRITETHROUGH && !BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
808	default 0x60 if BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
809	default 0x68 if BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && !BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
810	default 0x70 if BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && !BAT4_DCACHE_GUARDED
811	default 0x78 if BAT4_DCACHE_WRITETHROUGH && BAT4_DCACHE_INHIBITED && BAT4_DCACHE_MEMORYCOHERENCE && BAT4_DCACHE_GUARDED
812
813config BAT4_VALID_BITS
814	hex
815	default 0x0 if !BAT4_SUPERVISOR_MODE_VALID && !BAT4_USER_MODE_VALID
816	default 0x1 if !BAT4_SUPERVISOR_MODE_VALID && BAT4_USER_MODE_VALID
817	default 0x2 if BAT4_SUPERVISOR_MODE_VALID && !BAT4_USER_MODE_VALID
818	default 0x3 if BAT4_SUPERVISOR_MODE_VALID && BAT4_USER_MODE_VALID
819
820menuconfig BAT5
821	bool "BAT5"
822
823if BAT5
824
825config BAT5_NAME
826	string "Identifier"
827
828config BAT5_BASE
829	hex "Base"
830
831choice
832	prompt "Block length"
833
834config BAT5_LENGTH_128_KBYTES
835	bool "128 kb"
836
837config BAT5_LENGTH_256_KBYTES
838	bool "256 kb"
839
840config BAT5_LENGTH_512_KBYTES
841	bool "512 kb"
842
843config BAT5_LENGTH_1_MBYTES
844	bool "1 mb"
845
846config BAT5_LENGTH_2_MBYTES
847	bool "2 mb"
848
849config BAT5_LENGTH_4_MBYTES
850	bool "4 mb"
851
852config BAT5_LENGTH_8_MBYTES
853	bool "8 mb"
854
855config BAT5_LENGTH_16_MBYTES
856	bool "16 mb"
857
858config BAT5_LENGTH_32_MBYTES
859	bool "32 mb"
860
861config BAT5_LENGTH_64_MBYTES
862	bool "64 mb"
863
864config BAT5_LENGTH_128_MBYTES
865	bool "128 mb"
866
867config BAT5_LENGTH_256_MBYTES
868	bool "256 mb"
869endchoice
870
871choice
872	prompt "Protection mode"
873
874config BAT5_ACCESS_NONE
875	bool "No access"
876
877config BAT5_ACCESS_RO
878	bool "Read-only"
879
880config BAT5_ACCESS_RW
881	bool "Read-write"
882
883endchoice
884
885config BAT5_ICACHE_WRITETHROUGH
886	bool "I-cache Write-through"
887
888config BAT5_ICACHE_INHIBITED
889	bool "I-cache Inhibited"
890
891config BAT5_ICACHE_MEMORYCOHERENCE
892	bool "I-cache Memory coherence"
893
894config BAT5_ICACHE_GUARDED
895	bool "I-cache Guarded"
896
897config BAT5_DCACHE_WRITETHROUGH
898	bool "D-cache Write-through"
899
900config BAT5_DCACHE_INHIBITED
901	bool "D-cache Inhibited"
902
903config BAT5_DCACHE_MEMORYCOHERENCE
904	bool "D-cache Memory coherence"
905
906config BAT5_DCACHE_GUARDED
907	bool "D-cache Guarded"
908
909config BAT5_USER_MODE_VALID
910	bool "User mode valid"
911
912config BAT5_SUPERVISOR_MODE_VALID
913	bool "Supervisor mode valid"
914
915endif
916
917config BAT5_LENGTH
918	hex
919	default 0x00000000 if BAT5_LENGTH_128_KBYTES
920	default 0x00000004 if BAT5_LENGTH_256_KBYTES
921	default 0x0000000c if BAT5_LENGTH_512_KBYTES
922	default 0x0000001c if BAT5_LENGTH_1_MBYTES
923	default 0x0000003c if BAT5_LENGTH_2_MBYTES
924	default 0x0000007c if BAT5_LENGTH_4_MBYTES
925	default 0x000000fc if BAT5_LENGTH_8_MBYTES
926	default 0x000001fc if BAT5_LENGTH_16_MBYTES
927	default 0x000003fc if BAT5_LENGTH_32_MBYTES
928	default 0x000007fc if BAT5_LENGTH_64_MBYTES
929	default 0x00000ffc if BAT5_LENGTH_128_MBYTES
930	default 0x00001ffc if BAT5_LENGTH_256_MBYTES
931
932config BAT5_PAGE_PROTECTION
933	hex
934	default 0x0 if BAT5_ACCESS_NONE
935	default 0x1 if BAT5_ACCESS_RO
936	default 0x2 if BAT5_ACCESS_RW
937
938config BAT5_WIMG_ICACHE
939	hex
940	default 0x0 if !BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
941	default 0x8 if !BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
942	default 0x10 if !BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
943	default 0x18 if !BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
944	default 0x20 if !BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
945	default 0x28 if !BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
946	default 0x30 if !BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
947	default 0x38 if !BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
948	default 0x40 if BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
949	default 0x48 if BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
950	default 0x50 if BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
951	default 0x58 if BAT5_ICACHE_WRITETHROUGH && !BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
952	default 0x60 if BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
953	default 0x68 if BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && !BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
954	default 0x70 if BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && !BAT5_ICACHE_GUARDED
955	default 0x78 if BAT5_ICACHE_WRITETHROUGH && BAT5_ICACHE_INHIBITED && BAT5_ICACHE_MEMORYCOHERENCE && BAT5_ICACHE_GUARDED
956
957config BAT5_WIMG_DCACHE
958	hex
959	default 0x0 if !BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
960	default 0x8 if !BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
961	default 0x10 if !BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
962	default 0x18 if !BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
963	default 0x20 if !BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
964	default 0x28 if !BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
965	default 0x30 if !BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
966	default 0x38 if !BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
967	default 0x40 if BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
968	default 0x48 if BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
969	default 0x50 if BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
970	default 0x58 if BAT5_DCACHE_WRITETHROUGH && !BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
971	default 0x60 if BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
972	default 0x68 if BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && !BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
973	default 0x70 if BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && !BAT5_DCACHE_GUARDED
974	default 0x78 if BAT5_DCACHE_WRITETHROUGH && BAT5_DCACHE_INHIBITED && BAT5_DCACHE_MEMORYCOHERENCE && BAT5_DCACHE_GUARDED
975
976config BAT5_VALID_BITS
977	hex
978	default 0x0 if !BAT5_SUPERVISOR_MODE_VALID && !BAT5_USER_MODE_VALID
979	default 0x1 if !BAT5_SUPERVISOR_MODE_VALID && BAT5_USER_MODE_VALID
980	default 0x2 if BAT5_SUPERVISOR_MODE_VALID && !BAT5_USER_MODE_VALID
981	default 0x3 if BAT5_SUPERVISOR_MODE_VALID && BAT5_USER_MODE_VALID
982
983menuconfig BAT6
984	bool "BAT6"
985
986if BAT6
987
988config BAT6_NAME
989	string "Identifier"
990
991config BAT6_BASE
992	hex "Base"
993
994choice
995	prompt "Block length"
996
997config BAT6_LENGTH_128_KBYTES
998	bool "128 kb"
999
1000config BAT6_LENGTH_256_KBYTES
1001	bool "256 kb"
1002
1003config BAT6_LENGTH_512_KBYTES
1004	bool "512 kb"
1005
1006config BAT6_LENGTH_1_MBYTES
1007	bool "1 mb"
1008
1009config BAT6_LENGTH_2_MBYTES
1010	bool "2 mb"
1011
1012config BAT6_LENGTH_4_MBYTES
1013	bool "4 mb"
1014
1015config BAT6_LENGTH_8_MBYTES
1016	bool "8 mb"
1017
1018config BAT6_LENGTH_16_MBYTES
1019	bool "16 mb"
1020
1021config BAT6_LENGTH_32_MBYTES
1022	bool "32 mb"
1023
1024config BAT6_LENGTH_64_MBYTES
1025	bool "64 mb"
1026
1027config BAT6_LENGTH_128_MBYTES
1028	bool "128 mb"
1029
1030config BAT6_LENGTH_256_MBYTES
1031	bool "256 mb"
1032endchoice
1033
1034choice
1035	prompt "Protection mode"
1036
1037config BAT6_ACCESS_NONE
1038	bool "No access"
1039
1040config BAT6_ACCESS_RO
1041	bool "Read-only"
1042
1043config BAT6_ACCESS_RW
1044	bool "Read-write"
1045
1046endchoice
1047
1048config BAT6_ICACHE_WRITETHROUGH
1049	bool "I-cache Write-through"
1050
1051config BAT6_ICACHE_INHIBITED
1052	bool "I-cache Inhibited"
1053
1054config BAT6_ICACHE_MEMORYCOHERENCE
1055	bool "I-cache Memory coherence"
1056
1057config BAT6_ICACHE_GUARDED
1058	bool "I-cache Guarded"
1059
1060config BAT6_DCACHE_WRITETHROUGH
1061	bool "D-cache Write-through"
1062
1063config BAT6_DCACHE_INHIBITED
1064	bool "D-cache Inhibited"
1065
1066config BAT6_DCACHE_MEMORYCOHERENCE
1067	bool "D-cache Memory coherence"
1068
1069config BAT6_DCACHE_GUARDED
1070	bool "D-cache Guarded"
1071
1072config BAT6_USER_MODE_VALID
1073	bool "User mode valid"
1074
1075config BAT6_SUPERVISOR_MODE_VALID
1076	bool "Supervisor mode valid"
1077
1078endif
1079
1080config BAT6_LENGTH
1081	hex
1082	default 0x00000000 if BAT6_LENGTH_128_KBYTES
1083	default 0x00000004 if BAT6_LENGTH_256_KBYTES
1084	default 0x0000000c if BAT6_LENGTH_512_KBYTES
1085	default 0x0000001c if BAT6_LENGTH_1_MBYTES
1086	default 0x0000003c if BAT6_LENGTH_2_MBYTES
1087	default 0x0000007c if BAT6_LENGTH_4_MBYTES
1088	default 0x000000fc if BAT6_LENGTH_8_MBYTES
1089	default 0x000001fc if BAT6_LENGTH_16_MBYTES
1090	default 0x000003fc if BAT6_LENGTH_32_MBYTES
1091	default 0x000007fc if BAT6_LENGTH_64_MBYTES
1092	default 0x00000ffc if BAT6_LENGTH_128_MBYTES
1093	default 0x00001ffc if BAT6_LENGTH_256_MBYTES
1094
1095config BAT6_PAGE_PROTECTION
1096	hex
1097	default 0x0 if BAT6_ACCESS_NONE
1098	default 0x1 if BAT6_ACCESS_RO
1099	default 0x2 if BAT6_ACCESS_RW
1100
1101config BAT6_WIMG_ICACHE
1102	hex
1103	default 0x0 if !BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1104	default 0x8 if !BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1105	default 0x10 if !BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1106	default 0x18 if !BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1107	default 0x20 if !BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1108	default 0x28 if !BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1109	default 0x30 if !BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1110	default 0x38 if !BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1111	default 0x40 if BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1112	default 0x48 if BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1113	default 0x50 if BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1114	default 0x58 if BAT6_ICACHE_WRITETHROUGH && !BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1115	default 0x60 if BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1116	default 0x68 if BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && !BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1117	default 0x70 if BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && !BAT6_ICACHE_GUARDED
1118	default 0x78 if BAT6_ICACHE_WRITETHROUGH && BAT6_ICACHE_INHIBITED && BAT6_ICACHE_MEMORYCOHERENCE && BAT6_ICACHE_GUARDED
1119
1120config BAT6_WIMG_DCACHE
1121	hex
1122	default 0x0 if !BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1123	default 0x8 if !BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1124	default 0x10 if !BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1125	default 0x18 if !BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1126	default 0x20 if !BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1127	default 0x28 if !BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1128	default 0x30 if !BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1129	default 0x38 if !BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1130	default 0x40 if BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1131	default 0x48 if BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1132	default 0x50 if BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1133	default 0x58 if BAT6_DCACHE_WRITETHROUGH && !BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1134	default 0x60 if BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1135	default 0x68 if BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && !BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1136	default 0x70 if BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && !BAT6_DCACHE_GUARDED
1137	default 0x78 if BAT6_DCACHE_WRITETHROUGH && BAT6_DCACHE_INHIBITED && BAT6_DCACHE_MEMORYCOHERENCE && BAT6_DCACHE_GUARDED
1138
1139config BAT6_VALID_BITS
1140	hex
1141	default 0x0 if !BAT6_SUPERVISOR_MODE_VALID && !BAT6_USER_MODE_VALID
1142	default 0x1 if !BAT6_SUPERVISOR_MODE_VALID && BAT6_USER_MODE_VALID
1143	default 0x2 if BAT6_SUPERVISOR_MODE_VALID && !BAT6_USER_MODE_VALID
1144	default 0x3 if BAT6_SUPERVISOR_MODE_VALID && BAT6_USER_MODE_VALID
1145
1146menuconfig BAT7
1147	bool "BAT7"
1148
1149if BAT7
1150
1151config BAT7_NAME
1152	string "Identifier"
1153
1154config BAT7_BASE
1155	hex "Base"
1156
1157choice
1158	prompt "Block length"
1159
1160config BAT7_LENGTH_128_KBYTES
1161	bool "128 kb"
1162
1163config BAT7_LENGTH_256_KBYTES
1164	bool "256 kb"
1165
1166config BAT7_LENGTH_512_KBYTES
1167	bool "512 kb"
1168
1169config BAT7_LENGTH_1_MBYTES
1170	bool "1 mb"
1171
1172config BAT7_LENGTH_2_MBYTES
1173	bool "2 mb"
1174
1175config BAT7_LENGTH_4_MBYTES
1176	bool "4 mb"
1177
1178config BAT7_LENGTH_8_MBYTES
1179	bool "8 mb"
1180
1181config BAT7_LENGTH_16_MBYTES
1182	bool "16 mb"
1183
1184config BAT7_LENGTH_32_MBYTES
1185	bool "32 mb"
1186
1187config BAT7_LENGTH_64_MBYTES
1188	bool "64 mb"
1189
1190config BAT7_LENGTH_128_MBYTES
1191	bool "128 mb"
1192
1193config BAT7_LENGTH_256_MBYTES
1194	bool "256 mb"
1195endchoice
1196
1197choice
1198	prompt "Protection mode"
1199
1200config BAT7_ACCESS_NONE
1201	bool "No access"
1202
1203config BAT7_ACCESS_RO
1204	bool "Read-only"
1205
1206config BAT7_ACCESS_RW
1207	bool "Read-write"
1208
1209endchoice
1210
1211config BAT7_ICACHE_WRITETHROUGH
1212	bool "I-cache Write-through"
1213
1214config BAT7_ICACHE_INHIBITED
1215	bool "I-cache Inhibited"
1216
1217config BAT7_ICACHE_MEMORYCOHERENCE
1218	bool "I-cache Memory coherence"
1219
1220config BAT7_ICACHE_GUARDED
1221	bool "I-cache Guarded"
1222
1223config BAT7_DCACHE_WRITETHROUGH
1224	bool "D-cache Write-through"
1225
1226config BAT7_DCACHE_INHIBITED
1227	bool "D-cache Inhibited"
1228
1229config BAT7_DCACHE_MEMORYCOHERENCE
1230	bool "D-cache Memory coherence"
1231
1232config BAT7_DCACHE_GUARDED
1233	bool "D-cache Guarded"
1234
1235config BAT7_USER_MODE_VALID
1236	bool "User mode valid"
1237
1238config BAT7_SUPERVISOR_MODE_VALID
1239	bool "Supervisor mode valid"
1240
1241endif
1242
1243config BAT7_LENGTH
1244	hex
1245	default 0x00000000 if BAT7_LENGTH_128_KBYTES
1246	default 0x00000004 if BAT7_LENGTH_256_KBYTES
1247	default 0x0000000c if BAT7_LENGTH_512_KBYTES
1248	default 0x0000001c if BAT7_LENGTH_1_MBYTES
1249	default 0x0000003c if BAT7_LENGTH_2_MBYTES
1250	default 0x0000007c if BAT7_LENGTH_4_MBYTES
1251	default 0x000000fc if BAT7_LENGTH_8_MBYTES
1252	default 0x000001fc if BAT7_LENGTH_16_MBYTES
1253	default 0x000003fc if BAT7_LENGTH_32_MBYTES
1254	default 0x000007fc if BAT7_LENGTH_64_MBYTES
1255	default 0x00000ffc if BAT7_LENGTH_128_MBYTES
1256	default 0x00001ffc if BAT7_LENGTH_256_MBYTES
1257
1258config BAT7_PAGE_PROTECTION
1259	hex
1260	default 0x0 if BAT7_ACCESS_NONE
1261	default 0x1 if BAT7_ACCESS_RO
1262	default 0x2 if BAT7_ACCESS_RW
1263
1264config BAT7_WIMG_ICACHE
1265	hex
1266	default 0x0 if !BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1267	default 0x8 if !BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1268	default 0x10 if !BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1269	default 0x18 if !BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1270	default 0x20 if !BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1271	default 0x28 if !BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1272	default 0x30 if !BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1273	default 0x38 if !BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1274	default 0x40 if BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1275	default 0x48 if BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1276	default 0x50 if BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1277	default 0x58 if BAT7_ICACHE_WRITETHROUGH && !BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1278	default 0x60 if BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1279	default 0x68 if BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && !BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1280	default 0x70 if BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && !BAT7_ICACHE_GUARDED
1281	default 0x78 if BAT7_ICACHE_WRITETHROUGH && BAT7_ICACHE_INHIBITED && BAT7_ICACHE_MEMORYCOHERENCE && BAT7_ICACHE_GUARDED
1282
1283config BAT7_WIMG_DCACHE
1284	hex
1285	default 0x0 if !BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1286	default 0x8 if !BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1287	default 0x10 if !BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1288	default 0x18 if !BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1289	default 0x20 if !BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1290	default 0x28 if !BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1291	default 0x30 if !BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1292	default 0x38 if !BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1293	default 0x40 if BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1294	default 0x48 if BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1295	default 0x50 if BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1296	default 0x58 if BAT7_DCACHE_WRITETHROUGH && !BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1297	default 0x60 if BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1298	default 0x68 if BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && !BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1299	default 0x70 if BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && !BAT7_DCACHE_GUARDED
1300	default 0x78 if BAT7_DCACHE_WRITETHROUGH && BAT7_DCACHE_INHIBITED && BAT7_DCACHE_MEMORYCOHERENCE && BAT7_DCACHE_GUARDED
1301
1302config BAT7_VALID_BITS
1303	hex
1304	default 0x0 if !BAT7_SUPERVISOR_MODE_VALID && !BAT7_USER_MODE_VALID
1305	default 0x1 if !BAT7_SUPERVISOR_MODE_VALID && BAT7_USER_MODE_VALID
1306	default 0x2 if BAT7_SUPERVISOR_MODE_VALID && !BAT7_USER_MODE_VALID
1307	default 0x3 if BAT7_SUPERVISOR_MODE_VALID && BAT7_USER_MODE_VALID
1308
1309endif
1310
1311endmenu
1312