blob: e4ed7a66c97322119cb373f7ba7c53f65b04761a [file] [log] [blame]
Heiko Schocherf5e0d032006-06-19 11:02:41 +02001/*
2 * init.S
3 * ------
4 *
5 * Wind River PPMC 7xx/74xx init code.
6 *
7 * By Richard Danter (richard.danter@windriver.com)
8 * Copyright (C) 2005 Wind River Systems
9 *
10 * NOTE: The following code was generated automatically by Workbench
11 * from the ppmc7400_107.reg register file.
12 */
13
14#include <ppc_asm.tmpl>
15
16
17.globl board_asm_init
18board_asm_init:
19
20 lis r4,0xFEC0
21 ori r4,r4,0x0000
22 lis r5,0xFEE0
23 ori r5,r5,0x0000
24 lis r3,0x8000 # ADDR_00
25 ori r3,r3,0x0000
26 stwbrx r3,0,r4
27 li r3,0x1057 # VENDOR
28 li r8, 0x0
29 sthbrx r3,r8,r5
30 lis r3,0x8000 # ADDR_02
31 ori r3,r3,0x0002
32 stwbrx r3,0,r4
33 li r3,0x0004 # ID
34 li r8, 0x2
35 sthbrx r3,r8,r5
36 lis r3,0x8000 # ADDR_04
37 ori r3,r3,0x0004
38 stwbrx r3,0,r4
39 li r3,0x0006 # PCICMD
40 li r8, 0x0
41 sthbrx r3,r8,r5
42 lis r3,0x8000 # ADDR_06
43 ori r3,r3,0x0006
44 stwbrx r3,0,r4
45 li r3,0x00A0 # PCISTAT
46 li r8, 0x2
47 sthbrx r3,r8,r5
48 lis r3,0x8000 # ADDR_08
49 ori r3,r3,0x0008
50 stwbrx r3,0,r4
51 li r3,0x10 # REVID
52 stb r3,0x0(r5)
53 lis r3,0x8000 # ADDR_09
54 ori r3,r3,0x0009
55 stwbrx r3,0,r4
56 li r3,0x00 # PROGIR
57 stb r3,0x1(r5)
58 lis r3,0x8000 # ADDR_0A
59 ori r3,r3,0x000A
60 stwbrx r3,0,r4
61 li r3,0x00 # SUBCCODE
62 stb r3,0x2(r5)
63 lis r3,0x8000 # ADDR_0B
64 ori r3,r3,0x000B
65 stwbrx r3,0,r4
66 li r3,0x06 # PBCCR
67 stb r3,0x3(r5)
68 lis r3,0x8000 # ADDR_0C
69 ori r3,r3,0x000C
70 stwbrx r3,0,r4
71 li r3,0x08 # PCLSR
72 stb r3,0x0(r5)
73 lis r3,0x8000 # ADDR_0D
74 ori r3,r3,0x000D
75 stwbrx r3,0,r4
76 li r3,0x00 # PLTR
77 stb r3,0x1(r5)
78 lis r3,0x8000 # ADDR_0E
79 ori r3,r3,0x000E
80 stwbrx r3,0,r4
81 li r3,0x00 # HEADTYPE
82 stb r3,0x2(r5)
83 lis r3,0x8000 # ADDR_0F
84 ori r3,r3,0x000F
85 stwbrx r3,0,r4
86 li r3,0x00 # BISTCTRL
87 stb r3,0x3(r5)
88 lis r3,0x8000 # ADDR_10
89 ori r3,r3,0x0010
90 stwbrx r3,0,r4
91 lis r3,0x0000 # LMBAR
92 ori r3,r3,0x0008
93 li r8, 0x0
94 stwbrx r3,r8,r5
95 lis r3,0x8000 # ADDR_14
96 ori r3,r3,0x0014
97 stwbrx r3,0,r4
98 lis r3,0xF000 # PCSRBAR
99 ori r3,r3,0x0000
100 li r8, 0x0
101 stwbrx r3,r8,r5
102 lis r3,0x8000 # ADDR_3C
103 ori r3,r3,0x003C
104 stwbrx r3,0,r4
105 li r3,0x00 # ILR
106 stb r3,0x0(r5)
107 lis r3,0x8000 # ADDR_3D
108 ori r3,r3,0x003D
109 stwbrx r3,0,r4
110 li r3,0x01 # INTPIN
111 stb r3,0x1(r5)
112 lis r3,0x8000 # ADDR_3E
113 ori r3,r3,0x003E
114 stwbrx r3,0,r4
115 li r3,0x00 # MIN_GNT
116 stb r3,0x2(r5)
117 lis r3,0x8000 # ADDR_3F
118 ori r3,r3,0x003F
119 stwbrx r3,0,r4
120 li r3,0x00 # MAX_LAT
121 stb r3,0x3(r5)
122 lis r3,0x8000 # ADDR_40
123 ori r3,r3,0x0040
124 stwbrx r3,0,r4
125 li r3,0x00 # BUSNB
126 stb r3,0x0(r5)
127 lis r3,0x8000 # ADDR_41
128 ori r3,r3,0x0041
129 stwbrx r3,0,r4
130 li r3,0x00 # SBUSNB
131 stb r3,0x1(r5)
132 lis r3,0x8000 # ADDR_46
133 ori r3,r3,0x0046
134 stwbrx r3,0,r4
135# li r3,0xE080 # PCIARB
136 li r3,-0x1F80 # PCIARB
137 li r8, 0x2
138 sthbrx r3,r8,r5
139 lis r3,0x8000 # ADDR_70
140 ori r3,r3,0x0070
141 stwbrx r3,0,r4
142 li r3,0x0000 # PMCR1
143 li r8, 0x0
144 sthbrx r3,r8,r5
145 lis r3,0x8000 # ADDR_72
146 ori r3,r3,0x0072
147 stwbrx r3,0,r4
148 li r3,0xC0 # PMCR2
149 stb r3,0x2(r5)
150 lis r3,0x8000 # ADDR_73
151 ori r3,r3,0x0073
152 stwbrx r3,0,r4
153 li r3,0xEF # ODCR
154 stb r3,0x3(r5)
155 lis r3,0x8000 # ADDR_74
156 ori r3,r3,0x0074
157 stwbrx r3,0,r4
158 li r3,0x7D00 # CLKDCR
159 li r8, 0x0
160 sthbrx r3,r8,r5
161 lis r3,0x8000 # ADDR_76
162 ori r3,r3,0x0076
163 stwbrx r3,0,r4
164 li r3,0x00 # MDCR
165 stb r3,0x2(r5)
166 lis r6,0xFCE0
167 ori r6,r6,0x0000 # r6 is the EUMBAR Base Address
168 lis r3,0x8000 # ADDR_78
169 ori r3,r3,0x0078
170 stwbrx r3,0,r4
171 lis r3,0xFCE0 # EUMBBAR
172 ori r3,r3,0x0000
173 li r8, 0x0
174 stwbrx r3,r8,r5
175 lis r3,0x8000 # ADDR_80
176 ori r3,r3,0x0080
177 stwbrx r3,0,r4
178 lis r3,0xFFFF # MSADDR1
179 ori r3,r3,0x4000
180 li r8, 0x0
181 stwbrx r3,r8,r5
182 lis r3,0x8000 # ADDR_84
183 ori r3,r3,0x0084
184 stwbrx r3,0,r4
185 lis r3,0xFFFF # MSADDR2
186 ori r3,r3,0xFFFF
187 li r8, 0x0
188 stwbrx r3,r8,r5
189 lis r3,0x8000 # ADDR_88
190 ori r3,r3,0x0088
191 stwbrx r3,0,r4
192 lis r3,0x0303 # EMSADDR1
193 ori r3,r3,0x0000
194 li r8, 0x0
195 stwbrx r3,r8,r5
196 lis r3,0x8000 # ADDR_8C
197 ori r3,r3,0x008C
198 stwbrx r3,0,r4
199 lis r3,0x0303 # EMSADDR2
200 ori r3,r3,0x0303
201 li r8, 0x0
202 stwbrx r3,r8,r5
203 lis r3,0x8000 # ADDR_90
204 ori r3,r3,0x0090
205 stwbrx r3,0,r4
206 lis r3,0xFFFF # EMEADDR1
207 ori r3,r3,0x7F3F
208 li r8, 0x0
209 stwbrx r3,r8,r5
210 lis r3,0x8000 # ADDR_94
211 ori r3,r3,0x0094
212 stwbrx r3,0,r4
213 lis r3,0xFFFF # EMEADDR2
214 ori r3,r3,0xFFFF
215 li r8, 0x0
216 stwbrx r3,r8,r5
217 lis r3,0x8000 # ADDR_98
218 ori r3,r3,0x0098
219 stwbrx r3,0,r4
220 lis r3,0x0303 # EXTEMEM1
221 ori r3,r3,0x0000
222 li r8, 0x0
223 stwbrx r3,r8,r5
224 lis r3,0x8000 # ADDR_9C
225 ori r3,r3,0x009C
226 stwbrx r3,0,r4
227 lis r3,0x0303 # EXTEMEM2
228 ori r3,r3,0x0303
229 li r8, 0x0
230 stwbrx r3,r8,r5
231 lis r3,0x8000 # ADDR_A0
232 ori r3,r3,0x00A0
233 stwbrx r3,0,r4
234 li r3,0x03 # MEMBNKEN
235 stb r3,0x0(r5)
236 lis r3,0x8000 # ADDR_A3
237 ori r3,r3,0x00A3
238 stwbrx r3,0,r4
239 li r3,0x00 # MEMPMODE
240 stb r3,0x3(r5)
241 lis r3,0x8000 # ADDR_B8
242 ori r3,r3,0x00B8
243 stwbrx r3,0,r4
244 li r3,0x00 # ECCCNT
245 stb r3,0x0(r5)
246 lis r3,0x8000 # ADDR_B9
247 ori r3,r3,0x00B9
248 stwbrx r3,0,r4
249 li r3,0x00 # ECCTRG
250 stb r3,0x1(r5)
251 lis r3,0x8000 # ADDR_C0
252 ori r3,r3,0x00C0
253 stwbrx r3,0,r4
254 li r3,0xFF # ERRENR1
255 stb r3,0x0(r5)
256 lis r3,0x8000 # ADDR_C1
257 ori r3,r3,0x00C1
258 stwbrx r3,0,r4
259 li r3,0x00 # ERRDR1
260 stb r3,0x1(r5)
261 lis r3,0x8000 # ADDR_C3
262 ori r3,r3,0x00C3
263 stwbrx r3,0,r4
264 li r3,0x50 # IPBESR
265 stb r3,0x3(r5)
266 lis r3,0x8000 # ADDR_C4
267 ori r3,r3,0x00C4
268 stwbrx r3,0,r4
269 li r3,0xBF # ERRENR2
270 stb r3,0x0(r5)
271 lis r3,0x8000 # ADDR_C5
272 ori r3,r3,0x00C5
273 stwbrx r3,0,r4
274 li r3,0x00 # ERRDR2
275 stb r3,0x1(r5)
276 lis r3,0x8000 # ADDR_C7
277 ori r3,r3,0x00C7
278 stwbrx r3,0,r4
279 li r3,0x00 # PCIBESR
280 stb r3,0x3(r5)
281 lis r3,0x8000 # ADDR_C8
282 ori r3,r3,0x00C8
283 stwbrx r3,0,r4
284 lis r3,0x0000 # BERRADDR
285 ori r3,r3,0xE0FE
286 li r8, 0x0
287 stwbrx r3,r8,r5
288 lis r3,0x8000 # ADDR_E0
289 ori r3,r3,0x00E0
290 stwbrx r3,0,r4
291 li r3,0xC0 # AMBOR
292 stb r3,0x0(r5)
293 lis r3,0x8000 # ADDR_F4
294 ori r3,r3,0x00F4
295 stwbrx r3,0,r4
296 lis r3,0x0000 # MCCR2
297 ori r3,r3,0x020C
298 li r8, 0x0
299 stwbrx r3,r8,r5
300 lis r3,0x8000 # ADDR_F8
301 ori r3,r3,0x00F8
302 stwbrx r3,0,r4
303 lis r3,0x0230 # MCCR3
304 ori r3,r3,0x0000
305 li r8, 0x0
306 stwbrx r3,r8,r5
307 lis r3,0x8000 # ADDR_FC
308 ori r3,r3,0x00FC
309 stwbrx r3,0,r4
310 lis r3,0x2532 # MCCR4
311 ori r3,r3,0x2220
312 li r8, 0x0
313 stwbrx r3,r8,r5
314 lis r3,0x8000 # ADDR_F0
315 ori r3,r3,0x00F0
316 stwbrx r3,0,r4
317 lis r3,0xFFC8 # MCCR1
318 ori r3,r3,0x0000
319 li r8, 0x0
320 stwbrx r3,r8,r5
321 lis r3,0x8000 # ADDR_A8
322 ori r3,r3,0x00A8
323 stwbrx r3,0,r4
324 lis r3,0xFF14 # PICR1
325 ori r3,r3,0x1CC8
326 li r8, 0x0
327 stwbrx r3,r8,r5
328 lis r3,0x8000 # ADDR_AC
329 ori r3,r3,0x00AC
330 stwbrx r3,0,r4
331 lis r3,0x0000 # PICR2
332 ori r3,r3,0x0000
333 li r8, 0x0
334 stwbrx r3,r8,r5
335
336 blr