blob: 6b196de355a5f7ad6b0f86d9b9f131a5cb31f439 [file] [log] [blame]
wdenk359733b2003-03-31 17:27:09 +00001/*
2 * Copyright (C) 1998 Dan Malek <dmalek@jlc.net>
3 * Copyright (C) 1999 Magnus Damm <kieraypc01.p.y.kie.era.ericsson.se>
4 * Copyright (C) 2000, 2001, 2002 Wolfgang Denk <wd@denx.de>
5 * Copyright (C) 2003 Martin Winistoerfer, martinwinistoerfer@gmx.ch.
wdenk57b2d802003-06-27 21:31:46 +00006 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
wdenk359733b2003-03-31 17:27:09 +00008 */
9
10/*
11 * File: start.S
wdenk57b2d802003-06-27 21:31:46 +000012 *
wdenk359733b2003-03-31 17:27:09 +000013 * Discription: startup code
14 *
15 */
16
Wolfgang Denk0191e472010-10-26 14:34:52 +020017#include <asm-offsets.h>
wdenk359733b2003-03-31 17:27:09 +000018#include <config.h>
19#include <mpc5xx.h>
20#include <version.h>
21
wdenk359733b2003-03-31 17:27:09 +000022#include <ppc_asm.tmpl>
23#include <ppc_defs.h>
wdenk57b2d802003-06-27 21:31:46 +000024
wdenk57b2d802003-06-27 21:31:46 +000025#include <asm/processor.h>
Peter Tyser3a1362d2010-10-14 23:33:24 -050026#include <asm/u-boot.h>
wdenk359733b2003-03-31 17:27:09 +000027
wdenk359733b2003-03-31 17:27:09 +000028/* We don't have a MMU.
29*/
30#undef MSR_KERNEL
31#define MSR_KERNEL ( MSR_ME | MSR_RI ) /* Machine Check and Recoverable Interr. */
32
33/*
34 * Set up GOT: Global Offset Table
35 *
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +010036 * Use r12 to access the GOT
wdenk359733b2003-03-31 17:27:09 +000037 */
38 START_GOT
39 GOT_ENTRY(_GOT2_TABLE_)
40 GOT_ENTRY(_FIXUP_TABLE_)
41
42 GOT_ENTRY(_start)
43 GOT_ENTRY(_start_of_vectors)
44 GOT_ENTRY(_end_of_vectors)
45 GOT_ENTRY(transfer_to_handler)
46
wdenkb9a83a92003-05-30 12:48:29 +000047 GOT_ENTRY(__init_end)
Simon Glassed70c8f2013-03-14 06:54:53 +000048 GOT_ENTRY(__bss_end)
wdenkbf2f8c92003-05-22 22:52:13 +000049 GOT_ENTRY(__bss_start)
wdenk359733b2003-03-31 17:27:09 +000050 END_GOT
51
52/*
53 * r3 - 1st arg to board_init(): IMMP pointer
54 * r4 - 2nd arg to board_init(): boot flag
55 */
56 .text
57 .long 0x27051956 /* U-Boot Magic Number */
58 .globl version_string
59version_string:
Andreas Bießmann61d01952011-07-18 20:24:04 +020060 .ascii U_BOOT_VERSION_STRING, "\0"
wdenk359733b2003-03-31 17:27:09 +000061
62 . = EXC_OFF_SYS_RESET
63 .globl _start
64_start:
65 mfspr r3, 638
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020066 li r4, CONFIG_SYS_ISB /* Set ISB bit */
wdenk57b2d802003-06-27 21:31:46 +000067 or r3, r3, r4
wdenk359733b2003-03-31 17:27:09 +000068 mtspr 638, r3
wdenk359733b2003-03-31 17:27:09 +000069
70 /* Initialize machine status; enable machine check interrupt */
71 /*----------------------------------------------------------------------*/
72 li r3, MSR_KERNEL /* Set ME, RI flags */
73 mtmsr r3
74 mtspr SRR1, r3 /* Make SRR1 match MSR */
75
76 /* Initialize debug port registers */
77 /*----------------------------------------------------------------------*/
78 xor r0, r0, r0 /* Clear R0 */
79 mtspr LCTRL1, r0 /* Initialize debug port regs */
80 mtspr LCTRL2, r0
81 mtspr COUNTA, r0
82 mtspr COUNTB, r0
83
wdenkbc01dd52004-01-02 16:05:07 +000084#if defined(CONFIG_PATI)
85 /* the external flash access on PATI fails if programming the PLL to 40MHz.
86 * Copy the PLL programming code to the internal RAM and execute it
87 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020088 lis r3, CONFIG_SYS_MONITOR_BASE@h
89 ori r3, r3, CONFIG_SYS_MONITOR_BASE@l
wdenkbc01dd52004-01-02 16:05:07 +000090 addi r3, r3, pll_prog_code_start - _start + EXC_OFF_SYS_RESET
91
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020092 lis r4, CONFIG_SYS_INIT_RAM_ADDR@h
93 ori r4, r4, CONFIG_SYS_INIT_RAM_ADDR@l
wdenkbc01dd52004-01-02 16:05:07 +000094 mtlr r4
95 addis r5,0,0x0
96 ori r5,r5,((pll_prog_code_end - pll_prog_code_start) >>2)
97 mtctr r5
98 addi r3, r3, -4
99 addi r4, r4, -4
1000:
101 lwzu r0,4(r3)
102 stwu r0,4(r4)
103 bdnz 0b /* copy loop */
104 blrl
105#endif
106
wdenk359733b2003-03-31 17:27:09 +0000107 /*
108 * Calculate absolute address in FLASH and jump there
109 *----------------------------------------------------------------------*/
110
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200111 lis r3, CONFIG_SYS_MONITOR_BASE@h
112 ori r3, r3, CONFIG_SYS_MONITOR_BASE@l
wdenk359733b2003-03-31 17:27:09 +0000113 addi r3, r3, in_flash - _start + EXC_OFF_SYS_RESET
114 mtlr r3
115 blr
116
117in_flash:
118
119 /* Initialize some SPRs that are hard to access from C */
120 /*----------------------------------------------------------------------*/
wdenk57b2d802003-06-27 21:31:46 +0000121
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200122 lis r3, CONFIG_SYS_IMMR@h /* Pass IMMR as arg1 to C routine */
123 lis r2, CONFIG_SYS_INIT_SP_ADDR@h
124 ori r1, r2, CONFIG_SYS_INIT_SP_ADDR@l /* Set up the stack in internal SRAM */
wdenk359733b2003-03-31 17:27:09 +0000125 /* Note: R0 is still 0 here */
126 stwu r0, -4(r1) /* Clear final stack frame so that */
127 stwu r0, -4(r1) /* stack backtraces terminate cleanly */
128
129 /*
130 * Disable serialized ifetch and show cycles
131 * (i.e. set processor to normal mode) for maximum
132 * performance.
133 */
134
135 li r2, 0x0007
136 mtspr ICTRL, r2
137
138 /* Set up debug mode entry */
139
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200140 lis r2, CONFIG_SYS_DER@h
141 ori r2, r2, CONFIG_SYS_DER@l
wdenk359733b2003-03-31 17:27:09 +0000142 mtspr DER, r2
143
144 /* Let the C-code set up the rest */
145 /* */
146 /* Be careful to keep code relocatable ! */
147 /*----------------------------------------------------------------------*/
148
149 GET_GOT /* initialize GOT access */
Wolfgang Denkb2d36ea2011-04-20 22:11:21 +0200150
wdenk359733b2003-03-31 17:27:09 +0000151 /* r3: IMMR */
152 bl cpu_init_f /* run low-level CPU init code (from Flash) */
153
wdenk359733b2003-03-31 17:27:09 +0000154 bl board_init_f /* run 1st part of board init code (from Flash) */
155
Peter Tyser0c44caf2010-09-14 19:13:53 -0500156 /* NOTREACHED - board_init_f() does not return */
157
wdenk359733b2003-03-31 17:27:09 +0000158
wdenk359733b2003-03-31 17:27:09 +0000159 .globl _start_of_vectors
160_start_of_vectors:
161
162/* Machine check */
163 STD_EXCEPTION(0x200, MachineCheck, MachineCheckException)
164
165/* Data Storage exception. "Never" generated on the 860. */
166 STD_EXCEPTION(0x300, DataStorage, UnknownException)
167
168/* Instruction Storage exception. "Never" generated on the 860. */
169 STD_EXCEPTION(0x400, InstStorage, UnknownException)
170
171/* External Interrupt exception. */
172 STD_EXCEPTION(0x500, ExtInterrupt, external_interrupt)
173
174/* Alignment exception. */
175 . = 0x600
176Alignment:
Rafal Jaworowski06244e42007-06-22 14:58:04 +0200177 EXCEPTION_PROLOG(SRR0, SRR1)
wdenk359733b2003-03-31 17:27:09 +0000178 mfspr r4,DAR
179 stw r4,_DAR(r21)
180 mfspr r5,DSISR
181 stw r5,_DSISR(r21)
182 addi r3,r1,STACK_FRAME_OVERHEAD
Joakim Tjernlund4ff6bc02010-01-19 14:41:55 +0100183 EXC_XFER_TEMPLATE(Alignment, AlignmentException, MSR_KERNEL, COPY_EE)
wdenk359733b2003-03-31 17:27:09 +0000184
185/* Program check exception */
186 . = 0x700
187ProgramCheck:
Rafal Jaworowski06244e42007-06-22 14:58:04 +0200188 EXCEPTION_PROLOG(SRR0, SRR1)
wdenk359733b2003-03-31 17:27:09 +0000189 addi r3,r1,STACK_FRAME_OVERHEAD
Joakim Tjernlund4ff6bc02010-01-19 14:41:55 +0100190 EXC_XFER_TEMPLATE(ProgramCheck, ProgramCheckException,
191 MSR_KERNEL, COPY_EE)
wdenk359733b2003-03-31 17:27:09 +0000192
193 /* FPU on MPC5xx available. We will use it later.
194 */
195 STD_EXCEPTION(0x800, FPUnavailable, UnknownException)
196
197 /* I guess we could implement decrementer, and may have
198 * to someday for timekeeping.
199 */
200 STD_EXCEPTION(0x900, Decrementer, timer_interrupt)
201 STD_EXCEPTION(0xa00, Trap_0a, UnknownException)
202 STD_EXCEPTION(0xb00, Trap_0b, UnknownException)
wdenk874ac262003-07-24 23:38:38 +0000203 STD_EXCEPTION(0xc00, SystemCall, UnknownException)
wdenk359733b2003-03-31 17:27:09 +0000204 STD_EXCEPTION(0xd00, SingleStep, UnknownException)
205
206 STD_EXCEPTION(0xe00, Trap_0e, UnknownException)
207 STD_EXCEPTION(0xf00, Trap_0f, UnknownException)
208
209 /* On the MPC8xx, this is a software emulation interrupt. It occurs
210 * for all unimplemented and illegal instructions.
211 */
212 STD_EXCEPTION(0x1000, SoftEmu, SoftEmuException)
213 STD_EXCEPTION(0x1100, InstructionTLBMiss, UnknownException)
214 STD_EXCEPTION(0x1200, DataTLBMiss, UnknownException)
215 STD_EXCEPTION(0x1300, InstructionTLBError, UnknownException)
216 STD_EXCEPTION(0x1400, DataTLBError, UnknownException)
217
218 STD_EXCEPTION(0x1500, Reserved5, UnknownException)
219 STD_EXCEPTION(0x1600, Reserved6, UnknownException)
220 STD_EXCEPTION(0x1700, Reserved7, UnknownException)
221 STD_EXCEPTION(0x1800, Reserved8, UnknownException)
222 STD_EXCEPTION(0x1900, Reserved9, UnknownException)
223 STD_EXCEPTION(0x1a00, ReservedA, UnknownException)
224 STD_EXCEPTION(0x1b00, ReservedB, UnknownException)
225
226 STD_EXCEPTION(0x1c00, DataBreakpoint, UnknownException)
227 STD_EXCEPTION(0x1d00, InstructionBreakpoint, DebugException)
228 STD_EXCEPTION(0x1e00, PeripheralBreakpoint, UnknownException)
229 STD_EXCEPTION(0x1f00, DevPortBreakpoint, UnknownException)
230
231
232 .globl _end_of_vectors
233_end_of_vectors:
234
235
236 . = 0x2000
237
238/*
239 * This code finishes saving the registers to the exception frame
240 * and jumps to the appropriate handler for the exception.
241 * Register r21 is pointer into trap frame, r1 has new stack pointer.
242 */
243 .globl transfer_to_handler
244transfer_to_handler:
245 stw r22,_NIP(r21)
246 lis r22,MSR_POW@h
247 andc r23,r23,r22
248 stw r23,_MSR(r21)
249 SAVE_GPR(7, r21)
250 SAVE_4GPRS(8, r21)
251 SAVE_8GPRS(12, r21)
252 SAVE_8GPRS(24, r21)
253 mflr r23
254 andi. r24,r23,0x3f00 /* get vector offset */
255 stw r24,TRAP(r21)
256 li r22,0
257 stw r22,RESULT(r21)
258 mtspr SPRG2,r22 /* r1 is now kernel sp */
259 lwz r24,0(r23) /* virtual address of handler */
260 lwz r23,4(r23) /* where to go when done */
261 mtspr SRR0,r24
262 mtspr SRR1,r20
263 mtlr r23
264 SYNC
265 rfi /* jump to handler, enable MMU */
266
267int_return:
268 mfmsr r28 /* Disable interrupts */
269 li r4,0
270 ori r4,r4,MSR_EE
271 andc r28,r28,r4
272 SYNC /* Some chip revs need this... */
273 mtmsr r28
274 SYNC
275 lwz r2,_CTR(r1)
276 lwz r0,_LINK(r1)
277 mtctr r2
278 mtlr r0
279 lwz r2,_XER(r1)
280 lwz r0,_CCR(r1)
281 mtspr XER,r2
282 mtcrf 0xFF,r0
283 REST_10GPRS(3, r1)
284 REST_10GPRS(13, r1)
285 REST_8GPRS(23, r1)
286 REST_GPR(31, r1)
287 lwz r2,_NIP(r1) /* Restore environment */
288 lwz r0,_MSR(r1)
289 mtspr SRR0,r2
290 mtspr SRR1,r0
291 lwz r0,GPR0(r1)
292 lwz r2,GPR2(r1)
293 lwz r1,GPR1(r1)
294 SYNC
295 rfi
296
wdenk57b2d802003-06-27 21:31:46 +0000297
wdenk359733b2003-03-31 17:27:09 +0000298/*
299 * unsigned int get_immr (unsigned int mask)
300 *
301 * return (mask ? (IMMR & mask) : IMMR);
302 */
303 .globl get_immr
304get_immr:
305 mr r4,r3 /* save mask */
306 mfspr r3, IMMR /* IMMR */
307 cmpwi 0,r4,0 /* mask != 0 ? */
308 beq 4f
309 and r3,r3,r4 /* IMMR & mask */
3104:
311 blr
312
313 .globl get_pvr
314get_pvr:
315 mfspr r3, PVR
316 blr
317
318
319/*------------------------------------------------------------------------------*/
320
321/*
322 * void relocate_code (addr_sp, gd, addr_moni)
323 *
324 * This "function" does not return, instead it continues in RAM
325 * after relocating the monitor code.
326 *
327 * r3 = dest
328 * r4 = src
329 * r5 = length in bytes
330 * r6 = cachelinesize
331 */
332 .globl relocate_code
333relocate_code:
334 mr r1, r3 /* Set new stack pointer in SRAM */
335 mr r9, r4 /* Save copy of global data pointer in SRAM */
336 mr r10, r5 /* Save copy of monitor destination Address in SRAM */
337
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100338 GET_GOT
wdenk359733b2003-03-31 17:27:09 +0000339 mr r3, r5 /* Destination Address */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200340 lis r4, CONFIG_SYS_MONITOR_BASE@h /* Source Address */
341 ori r4, r4, CONFIG_SYS_MONITOR_BASE@l
wdenkb9a83a92003-05-30 12:48:29 +0000342 lwz r5, GOT(__init_end)
343 sub r5, r5, r4
wdenk359733b2003-03-31 17:27:09 +0000344
345 /*
346 * Fix GOT pointer:
347 *
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200348 * New GOT-PTR = (old GOT-PTR - CONFIG_SYS_MONITOR_BASE) + Destination Address
wdenk359733b2003-03-31 17:27:09 +0000349 *
350 * Offset:
351 */
352 sub r15, r10, r4
353
354 /* First our own GOT */
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100355 add r12, r12, r15
wdenk359733b2003-03-31 17:27:09 +0000356 /* the the one used by the C code */
357 add r30, r30, r15
358
359 /*
360 * Now relocate code
361 */
362
363 cmplw cr1,r3,r4
364 addi r0,r5,3
365 srwi. r0,r0,2
366 beq cr1,4f /* In place copy is not necessary */
367 beq 4f /* Protect against 0 count */
368 mtctr r0
369 bge cr1,2f
370
371 la r8,-4(r4)
372 la r7,-4(r3)
3731: lwzu r0,4(r8)
374 stwu r0,4(r7)
375 bdnz 1b
376 b 4f
377
3782: slwi r0,r0,2
379 add r8,r4,r0
380 add r7,r3,r0
3813: lwzu r0,-4(r8)
382 stwu r0,-4(r7)
383 bdnz 3b
384
wdenk57b2d802003-06-27 21:31:46 +00003854: sync
wdenk359733b2003-03-31 17:27:09 +0000386 isync
387
388/*
389 * We are done. Do not return, instead branch to second part of board
390 * initialization, now running from RAM.
391 */
392
393 addi r0, r10, in_ram - _start + EXC_OFF_SYS_RESET
394 mtlr r0
395 blr
396
397in_ram:
398
399 /*
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100400 * Relocation Function, r12 point to got2+0x8000
wdenk359733b2003-03-31 17:27:09 +0000401 *
wdenk57b2d802003-06-27 21:31:46 +0000402 * Adjust got2 pointers, no need to check for 0, this code
403 * already puts a few entries in the table.
wdenk359733b2003-03-31 17:27:09 +0000404 */
405 li r0,__got2_entries@sectoff@l
406 la r3,GOT(_GOT2_TABLE_)
407 lwz r11,GOT(_GOT2_TABLE_)
408 mtctr r0
409 sub r11,r3,r11
410 addi r3,r3,-4
4111: lwzu r0,4(r3)
Joakim Tjernlund4f2fdac2009-10-08 02:03:51 +0200412 cmpwi r0,0
413 beq- 2f
wdenk359733b2003-03-31 17:27:09 +0000414 add r0,r0,r11
415 stw r0,0(r3)
Joakim Tjernlund4f2fdac2009-10-08 02:03:51 +02004162: bdnz 1b
wdenk359733b2003-03-31 17:27:09 +0000417
418 /*
wdenk57b2d802003-06-27 21:31:46 +0000419 * Now adjust the fixups and the pointers to the fixups
wdenk359733b2003-03-31 17:27:09 +0000420 * in case we need to move ourselves again.
421 */
Joakim Tjernlund4f2fdac2009-10-08 02:03:51 +0200422 li r0,__fixup_entries@sectoff@l
wdenk359733b2003-03-31 17:27:09 +0000423 lwz r3,GOT(_FIXUP_TABLE_)
424 cmpwi r0,0
425 mtctr r0
426 addi r3,r3,-4
427 beq 4f
4283: lwzu r4,4(r3)
429 lwzux r0,r4,r11
Joakim Tjernlundc61b25a2010-10-14 11:51:44 +0200430 cmpwi r0,0
wdenk359733b2003-03-31 17:27:09 +0000431 add r0,r0,r11
Joakim Tjernlund401b5922010-11-04 19:02:00 +0100432 stw r4,0(r3)
Joakim Tjernlundc61b25a2010-10-14 11:51:44 +0200433 beq- 5f
wdenk359733b2003-03-31 17:27:09 +0000434 stw r0,0(r4)
Joakim Tjernlundc61b25a2010-10-14 11:51:44 +02004355: bdnz 3b
wdenk359733b2003-03-31 17:27:09 +00004364:
437clear_bss:
438 /*
439 * Now clear BSS segment
440 */
wdenkbf2f8c92003-05-22 22:52:13 +0000441 lwz r3,GOT(__bss_start)
Simon Glassed70c8f2013-03-14 06:54:53 +0000442 lwz r4,GOT(__bss_end)
wdenk359733b2003-03-31 17:27:09 +0000443 cmplw 0, r3, r4
444 beq 6f
445
446 li r0, 0
4475:
448 stw r0, 0(r3)
449 addi r3, r3, 4
450 cmplw 0, r3, r4
451 bne 5b
4526:
453
454 mr r3, r9 /* Global Data pointer */
455 mr r4, r10 /* Destination Address */
456 bl board_init_r
457
wdenk359733b2003-03-31 17:27:09 +0000458 /*
459 * Copy exception vector code to low memory
460 *
461 * r3: dest_addr
462 * r7: source address, r8: end address, r9: target address
463 */
464 .globl trap_init
465trap_init:
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100466 mflr r4 /* save link register */
467 GET_GOT
wdenk359733b2003-03-31 17:27:09 +0000468 lwz r7, GOT(_start)
469 lwz r8, GOT(_end_of_vectors)
470
wdenk4e112c12003-06-03 23:54:09 +0000471 li r9, 0x100 /* reset vector always at 0x100 */
wdenk359733b2003-03-31 17:27:09 +0000472
473 cmplw 0, r7, r8
474 bgelr /* return if r7>=r8 - just in case */
wdenk359733b2003-03-31 17:27:09 +00004751:
476 lwz r0, 0(r7)
477 stw r0, 0(r9)
478 addi r7, r7, 4
479 addi r9, r9, 4
480 cmplw 0, r7, r8
481 bne 1b
482
483 /*
484 * relocate `hdlr' and `int_return' entries
485 */
486 li r7, .L_MachineCheck - _start + EXC_OFF_SYS_RESET
487 li r8, Alignment - _start + EXC_OFF_SYS_RESET
4882:
489 bl trap_reloc
490 addi r7, r7, 0x100 /* next exception vector */
491 cmplw 0, r7, r8
492 blt 2b
493
494 li r7, .L_Alignment - _start + EXC_OFF_SYS_RESET
495 bl trap_reloc
496
497 li r7, .L_ProgramCheck - _start + EXC_OFF_SYS_RESET
498 bl trap_reloc
499
500 li r7, .L_FPUnavailable - _start + EXC_OFF_SYS_RESET
501 li r8, SystemCall - _start + EXC_OFF_SYS_RESET
5023:
503 bl trap_reloc
504 addi r7, r7, 0x100 /* next exception vector */
505 cmplw 0, r7, r8
506 blt 3b
507
508 li r7, .L_SingleStep - _start + EXC_OFF_SYS_RESET
509 li r8, _end_of_vectors - _start + EXC_OFF_SYS_RESET
5104:
511 bl trap_reloc
512 addi r7, r7, 0x100 /* next exception vector */
513 cmplw 0, r7, r8
514 blt 4b
515
516 mtlr r4 /* restore link register */
517 blr
518
wdenkbc01dd52004-01-02 16:05:07 +0000519#if defined(CONFIG_PATI)
520/* Program the PLL */
521pll_prog_code_start:
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200522 lis r4, (CONFIG_SYS_IMMR + 0x002fc384)@h
523 ori r4, r4, (CONFIG_SYS_IMMR + 0x002fc384)@l
wdenkbc01dd52004-01-02 16:05:07 +0000524 lis r3, (0x55ccaa33)@h
525 ori r3, r3, (0x55ccaa33)@l
526 stw r3, 0(r4)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200527 lis r4, (CONFIG_SYS_IMMR + 0x002fc284)@h
528 ori r4, r4, (CONFIG_SYS_IMMR + 0x002fc284)@l
529 lis r3, CONFIG_SYS_PLPRCR@h
530 ori r3, r3, CONFIG_SYS_PLPRCR@l
wdenkbc01dd52004-01-02 16:05:07 +0000531 stw r3, 0(r4)
532 addis r3,0,0x0
533 ori r3,r3,0xA000
534 mtctr r3
535..spinlp:
536 bdnz ..spinlp /* spin loop */
537 blr
538pll_prog_code_end:
539 nop
540 blr
541#endif