1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#include <common.h>
25#include <board/cogent/dipsw.h>
26#include <board/cogent/lcd.h>
27#include <board/cogent/rtc.h>
28#include <board/cogent/par.h>
29#include <board/cogent/pci.h>
30
31
32
33#if defined(CONFIG_8260)
34
35#include <ioports.h>
36
37
38
39
40
41
42
43
44const iop_conf_t iop_conf_tab[4][32] = {
45
46
47 {
48 {0, 0, 0, 0, 0, 0},
49 {0, 0, 0, 0, 0, 0},
50 {0, 0, 0, 0, 0, 0},
51 {0, 0, 0, 0, 0, 0},
52 {0, 0, 0, 0, 0, 0},
53 {0, 0, 0, 0, 0, 0},
54 {0, 0, 0, 0, 0, 0},
55 {0, 0, 0, 0, 0, 0},
56 {0, 0, 0, 0, 0, 0},
57 {0, 0, 0, 0, 0, 0},
58 {0, 0, 0, 0, 0, 0},
59 {0, 0, 0, 0, 0, 0},
60 {0, 0, 0, 0, 0, 0},
61 {0, 0, 0, 0, 0, 0},
62 {0, 0, 0, 0, 0, 0},
63 {0, 0, 0, 0, 0, 0},
64 {0, 0, 0, 0, 0, 0},
65 {0, 0, 0, 0, 0, 0},
66 {0, 0, 0, 0, 0, 0},
67 {0, 0, 0, 0, 0, 0},
68 {0, 0, 0, 0, 0, 0},
69 {0, 0, 0, 0, 0, 0},
70 {1, 1, 0, 1, 0, 0},
71
72 {1, 1, 0, 0, 0, 0},
73
74 {0, 0, 0, 0, 0, 0},
75 {0, 0, 0, 0, 0, 0},
76 {0, 0, 0, 0, 0, 0},
77 {0, 0, 0, 0, 0, 0},
78 {0, 0, 0, 0, 0, 0},
79 {0, 0, 0, 0, 0, 0},
80 {0, 0, 0, 0, 0, 0},
81 {0, 0, 0, 0, 0, 0}
82 },
83
84
85 {
86 {0, 0, 0, 0, 0, 0},
87 {0, 0, 0, 0, 0, 0},
88 {0, 0, 0, 0, 0, 0},
89 {0, 0, 0, 0, 0, 0},
90 {0, 0, 0, 0, 0, 0},
91 {0, 0, 0, 0, 0, 0},
92 {0, 0, 0, 0, 0, 0},
93 {0, 0, 0, 0, 0, 0},
94 {0, 0, 0, 0, 0, 0},
95 {0, 0, 0, 0, 0, 0},
96 {0, 0, 0, 0, 0, 0},
97 {0, 0, 0, 0, 0, 0},
98 {0, 0, 0, 0, 0, 0},
99 {0, 0, 0, 0, 0, 0},
100 {0, 0, 0, 0, 0, 0},
101 {0, 0, 0, 0, 0, 0},
102 {0, 0, 0, 0, 0, 0},
103 {0, 0, 0, 0, 0, 0},
104 {0, 0, 0, 0, 0, 0},
105 {0, 0, 0, 0, 0, 0},
106 {0, 0, 0, 0, 0, 0},
107 {0, 0, 0, 0, 0, 0},
108 {0, 0, 0, 0, 0, 0},
109 {0, 0, 0, 0, 0, 0},
110 {0, 0, 0, 0, 0, 0},
111 {0, 0, 0, 0, 0, 0},
112 {0, 0, 0, 0, 0, 0},
113 {0, 0, 0, 0, 0, 0},
114 {0, 0, 0, 0, 0, 0},
115
116 {0, 0, 0, 0, 0, 0},
117
118 {0, 0, 0, 0, 0, 0},
119
120 {0, 0, 0, 0, 0, 0}
121
122 },
123
124
125 {
126 {0, 0, 0, 0, 0, 0},
127 {0, 0, 0, 0, 0, 0},
128 {0, 0, 0, 0, 0, 0},
129 {0, 0, 0, 0, 0, 0},
130 {0, 0, 0, 0, 0, 0},
131 {0, 0, 0, 0, 0, 0},
132 {0, 0, 0, 0, 0, 0},
133 {0, 0, 0, 0, 0, 0},
134 {0, 0, 0, 0, 0, 0},
135 {0, 0, 0, 0, 0, 0},
136 {0, 0, 0, 0, 0, 0},
137 {0, 0, 0, 0, 0, 0},
138 {0, 0, 0, 0, 0, 0},
139 {0, 0, 0, 0, 0, 0},
140 {0, 0, 0, 0, 0, 0},
141 {0, 0, 0, 0, 0, 0},
142 {0, 0, 0, 0, 0, 0},
143 {0, 0, 0, 0, 0, 0},
144 {0, 0, 0, 0, 0, 0},
145 {0, 0, 0, 0, 0, 0},
146 {0, 0, 0, 0, 0, 0},
147 {0, 0, 0, 0, 0, 0},
148 {0, 0, 0, 0, 0, 0},
149 {0, 0, 0, 0, 0, 0},
150 {0, 0, 0, 0, 0, 0},
151 {0, 0, 0, 0, 0, 0},
152 {0, 0, 0, 0, 0, 0},
153 {0, 0, 0, 0, 0, 0},
154 {0, 0, 0, 0, 0, 0},
155 {0, 0, 0, 0, 0, 0},
156 {0, 0, 0, 0, 0, 0},
157 {0, 0, 0, 0, 0, 0}
158 },
159
160
161 {
162 {0, 0, 0, 0, 0, 0},
163 {0, 0, 0, 0, 0, 0},
164 {0, 0, 0, 0, 0, 0},
165 {0, 0, 0, 0, 0, 0},
166 {0, 0, 0, 0, 0, 0},
167 {0, 0, 0, 0, 0, 0},
168 {0, 0, 0, 0, 0, 0},
169 {0, 0, 0, 0, 0, 0},
170 {0, 0, 0, 0, 0, 0},
171 {0, 0, 0, 0, 0, 0},
172 {0, 0, 0, 0, 0, 0},
173 {0, 0, 0, 0, 0, 0},
174 {0, 0, 0, 0, 0, 0},
175 {0, 0, 0, 0, 0, 0},
176 {0, 0, 0, 0, 0, 0},
177 {0, 0, 0, 0, 0, 0},
178 {1, 1, 1, 0, 0, 0},
179
180 {1, 1, 1, 0, 0, 0},
181
182 {0, 0, 0, 0, 0, 0},
183 {0, 0, 0, 0, 0, 0},
184 {0, 0, 0, 0, 0, 0},
185 {0, 0, 0, 0, 0, 0},
186 {1, 1, 0, 1, 0, 0},
187
188 {1, 1, 0, 0, 0, 0},
189
190 {0, 0, 0, 0, 0, 0},
191 {0, 0, 0, 0, 0, 0},
192 {0, 0, 0, 0, 0, 0},
193 {0, 0, 0, 0, 0, 0},
194 {0, 0, 0, 0, 0, 0},
195
196 {0, 0, 0, 0, 0, 0},
197
198 {0, 0, 0, 0, 0, 0},
199
200 {0, 0, 0, 0, 0, 0}
201
202 }
203};
204
205#endif
206
207
208
209
210
211
212
213int checkboard (void)
214{
215 puts ("Board: Cogent " COGENT_MOTHERBOARD " motherboard with a "
216 COGENT_CPU_MODULE " CPU Module\n");
217 return (0);
218}
219
220
221
222
223
224
225
226
227int misc_init_f (void)
228{
229 printf ("DIPSW: ");
230 dipsw_init ();
231 return (0);
232}
233
234
235
236phys_size_t initdram (int board_type)
237{
238#ifdef CONFIG_CMA111
239 return (32L * 1024L * 1024L);
240#else
241 unsigned char dipsw_val;
242 int dual, size0, size1;
243 long int memsize;
244
245 dipsw_val = dipsw_cooked ();
246
247 dual = dipsw_val & 0x01;
248 size0 = (dipsw_val & 0x08) >> 3;
249 size1 = (dipsw_val & 0x04) >> 2;
250
251 if (size0)
252 if (size1)
253 memsize = 16L * 1024L * 1024L;
254 else
255 memsize = 1L * 1024L * 1024L;
256 else if (size1)
257 memsize = 4L * 1024L * 1024L;
258 else {
259 printf ("[Illegal dip switch settings - assuming 16Mbyte SIMMs] ");
260 memsize = 16L * 1024L * 1024L;
261 }
262
263 if (dual)
264 memsize *= 2L;
265
266 return (memsize);
267#endif
268}
269
270
271
272
273
274
275
276
277int misc_init_r (void)
278{
279 printf ("LCD: ");
280 lcd_init ();
281
282#if 0
283 printf ("RTC: ");
284 rtc_init ();
285
286 printf ("PAR: ");
287 par_init ();
288
289 printf ("KBM: ");
290 kbm_init ();
291
292 printf ("PCI: ");
293 pci_init ();
294#endif
295 return (0);
296}
297