blob: 4fd9b63e5abe864994a7db286c54982c92eae8db [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 *
wdenk359733b2003-03-31 17:27:09 +00007 * See file CREDITS for list of people who contributed to this
8 * project.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
24 */
25
26/*
27 * File: start.S
wdenk57b2d802003-06-27 21:31:46 +000028 *
wdenk359733b2003-03-31 17:27:09 +000029 * Discription: startup code
30 *
31 */
32
33#include <config.h>
34#include <mpc5xx.h>
Peter Tyser62948502008-11-03 09:30:59 -060035#include <timestamp.h>
wdenk359733b2003-03-31 17:27:09 +000036#include <version.h>
37
38#define CONFIG_5xx 1 /* needed for Linux kernel header files */
39#define _LINUX_CONFIG_H 1 /* avoid reading Linux autoconf.h file */
40
41#include <ppc_asm.tmpl>
42#include <ppc_defs.h>
wdenk57b2d802003-06-27 21:31:46 +000043
wdenk359733b2003-03-31 17:27:09 +000044#include <linux/config.h>
wdenk57b2d802003-06-27 21:31:46 +000045#include <asm/processor.h>
wdenk359733b2003-03-31 17:27:09 +000046
47#ifndef CONFIG_IDENT_STRING
48#define CONFIG_IDENT_STRING ""
49#endif
50
51/* We don't have a MMU.
52*/
53#undef MSR_KERNEL
54#define MSR_KERNEL ( MSR_ME | MSR_RI ) /* Machine Check and Recoverable Interr. */
55
56/*
57 * Set up GOT: Global Offset Table
58 *
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +010059 * Use r12 to access the GOT
wdenk359733b2003-03-31 17:27:09 +000060 */
61 START_GOT
62 GOT_ENTRY(_GOT2_TABLE_)
63 GOT_ENTRY(_FIXUP_TABLE_)
64
65 GOT_ENTRY(_start)
66 GOT_ENTRY(_start_of_vectors)
67 GOT_ENTRY(_end_of_vectors)
68 GOT_ENTRY(transfer_to_handler)
69
wdenkb9a83a92003-05-30 12:48:29 +000070 GOT_ENTRY(__init_end)
wdenk359733b2003-03-31 17:27:09 +000071 GOT_ENTRY(_end)
wdenkbf2f8c92003-05-22 22:52:13 +000072 GOT_ENTRY(__bss_start)
wdenk359733b2003-03-31 17:27:09 +000073 END_GOT
74
75/*
76 * r3 - 1st arg to board_init(): IMMP pointer
77 * r4 - 2nd arg to board_init(): boot flag
78 */
79 .text
80 .long 0x27051956 /* U-Boot Magic Number */
81 .globl version_string
82version_string:
83 .ascii U_BOOT_VERSION
Peter Tyser62948502008-11-03 09:30:59 -060084 .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
wdenk359733b2003-03-31 17:27:09 +000085 .ascii CONFIG_IDENT_STRING, "\0"
86
87 . = EXC_OFF_SYS_RESET
88 .globl _start
89_start:
90 mfspr r3, 638
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020091 li r4, CONFIG_SYS_ISB /* Set ISB bit */
wdenk57b2d802003-06-27 21:31:46 +000092 or r3, r3, r4
wdenk359733b2003-03-31 17:27:09 +000093 mtspr 638, r3
wdenk359733b2003-03-31 17:27:09 +000094
95 /* Initialize machine status; enable machine check interrupt */
96 /*----------------------------------------------------------------------*/
97 li r3, MSR_KERNEL /* Set ME, RI flags */
98 mtmsr r3
99 mtspr SRR1, r3 /* Make SRR1 match MSR */
100
101 /* Initialize debug port registers */
102 /*----------------------------------------------------------------------*/
103 xor r0, r0, r0 /* Clear R0 */
104 mtspr LCTRL1, r0 /* Initialize debug port regs */
105 mtspr LCTRL2, r0
106 mtspr COUNTA, r0
107 mtspr COUNTB, r0
108
wdenkbc01dd52004-01-02 16:05:07 +0000109#if defined(CONFIG_PATI)
110 /* the external flash access on PATI fails if programming the PLL to 40MHz.
111 * Copy the PLL programming code to the internal RAM and execute it
112 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200113 lis r3, CONFIG_SYS_MONITOR_BASE@h
114 ori r3, r3, CONFIG_SYS_MONITOR_BASE@l
wdenkbc01dd52004-01-02 16:05:07 +0000115 addi r3, r3, pll_prog_code_start - _start + EXC_OFF_SYS_RESET
116
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200117 lis r4, CONFIG_SYS_INIT_RAM_ADDR@h
118 ori r4, r4, CONFIG_SYS_INIT_RAM_ADDR@l
wdenkbc01dd52004-01-02 16:05:07 +0000119 mtlr r4
120 addis r5,0,0x0
121 ori r5,r5,((pll_prog_code_end - pll_prog_code_start) >>2)
122 mtctr r5
123 addi r3, r3, -4
124 addi r4, r4, -4
1250:
126 lwzu r0,4(r3)
127 stwu r0,4(r4)
128 bdnz 0b /* copy loop */
129 blrl
130#endif
131
wdenk359733b2003-03-31 17:27:09 +0000132 /*
133 * Calculate absolute address in FLASH and jump there
134 *----------------------------------------------------------------------*/
135
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200136 lis r3, CONFIG_SYS_MONITOR_BASE@h
137 ori r3, r3, CONFIG_SYS_MONITOR_BASE@l
wdenk359733b2003-03-31 17:27:09 +0000138 addi r3, r3, in_flash - _start + EXC_OFF_SYS_RESET
139 mtlr r3
140 blr
141
142in_flash:
143
144 /* Initialize some SPRs that are hard to access from C */
145 /*----------------------------------------------------------------------*/
wdenk57b2d802003-06-27 21:31:46 +0000146
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200147 lis r3, CONFIG_SYS_IMMR@h /* Pass IMMR as arg1 to C routine */
148 lis r2, CONFIG_SYS_INIT_SP_ADDR@h
149 ori r1, r2, CONFIG_SYS_INIT_SP_ADDR@l /* Set up the stack in internal SRAM */
wdenk359733b2003-03-31 17:27:09 +0000150 /* Note: R0 is still 0 here */
151 stwu r0, -4(r1) /* Clear final stack frame so that */
152 stwu r0, -4(r1) /* stack backtraces terminate cleanly */
153
154 /*
155 * Disable serialized ifetch and show cycles
156 * (i.e. set processor to normal mode) for maximum
157 * performance.
158 */
159
160 li r2, 0x0007
161 mtspr ICTRL, r2
162
163 /* Set up debug mode entry */
164
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200165 lis r2, CONFIG_SYS_DER@h
166 ori r2, r2, CONFIG_SYS_DER@l
wdenk359733b2003-03-31 17:27:09 +0000167 mtspr DER, r2
168
169 /* Let the C-code set up the rest */
170 /* */
171 /* Be careful to keep code relocatable ! */
172 /*----------------------------------------------------------------------*/
173
174 GET_GOT /* initialize GOT access */
175
176 /* r3: IMMR */
177 bl cpu_init_f /* run low-level CPU init code (from Flash) */
178
wdenk359733b2003-03-31 17:27:09 +0000179 bl board_init_f /* run 1st part of board init code (from Flash) */
180
Peter Tyser0c44caf2010-09-14 19:13:53 -0500181 /* NOTREACHED - board_init_f() does not return */
182
wdenk359733b2003-03-31 17:27:09 +0000183
wdenk359733b2003-03-31 17:27:09 +0000184 .globl _start_of_vectors
185_start_of_vectors:
186
187/* Machine check */
188 STD_EXCEPTION(0x200, MachineCheck, MachineCheckException)
189
190/* Data Storage exception. "Never" generated on the 860. */
191 STD_EXCEPTION(0x300, DataStorage, UnknownException)
192
193/* Instruction Storage exception. "Never" generated on the 860. */
194 STD_EXCEPTION(0x400, InstStorage, UnknownException)
195
196/* External Interrupt exception. */
197 STD_EXCEPTION(0x500, ExtInterrupt, external_interrupt)
198
199/* Alignment exception. */
200 . = 0x600
201Alignment:
Rafal Jaworowski06244e42007-06-22 14:58:04 +0200202 EXCEPTION_PROLOG(SRR0, SRR1)
wdenk359733b2003-03-31 17:27:09 +0000203 mfspr r4,DAR
204 stw r4,_DAR(r21)
205 mfspr r5,DSISR
206 stw r5,_DSISR(r21)
207 addi r3,r1,STACK_FRAME_OVERHEAD
Joakim Tjernlund4ff6bc02010-01-19 14:41:55 +0100208 EXC_XFER_TEMPLATE(Alignment, AlignmentException, MSR_KERNEL, COPY_EE)
wdenk359733b2003-03-31 17:27:09 +0000209
210/* Program check exception */
211 . = 0x700
212ProgramCheck:
Rafal Jaworowski06244e42007-06-22 14:58:04 +0200213 EXCEPTION_PROLOG(SRR0, SRR1)
wdenk359733b2003-03-31 17:27:09 +0000214 addi r3,r1,STACK_FRAME_OVERHEAD
Joakim Tjernlund4ff6bc02010-01-19 14:41:55 +0100215 EXC_XFER_TEMPLATE(ProgramCheck, ProgramCheckException,
216 MSR_KERNEL, COPY_EE)
wdenk359733b2003-03-31 17:27:09 +0000217
218 /* FPU on MPC5xx available. We will use it later.
219 */
220 STD_EXCEPTION(0x800, FPUnavailable, UnknownException)
221
222 /* I guess we could implement decrementer, and may have
223 * to someday for timekeeping.
224 */
225 STD_EXCEPTION(0x900, Decrementer, timer_interrupt)
226 STD_EXCEPTION(0xa00, Trap_0a, UnknownException)
227 STD_EXCEPTION(0xb00, Trap_0b, UnknownException)
wdenk874ac262003-07-24 23:38:38 +0000228 STD_EXCEPTION(0xc00, SystemCall, UnknownException)
wdenk359733b2003-03-31 17:27:09 +0000229 STD_EXCEPTION(0xd00, SingleStep, UnknownException)
230
231 STD_EXCEPTION(0xe00, Trap_0e, UnknownException)
232 STD_EXCEPTION(0xf00, Trap_0f, UnknownException)
233
234 /* On the MPC8xx, this is a software emulation interrupt. It occurs
235 * for all unimplemented and illegal instructions.
236 */
237 STD_EXCEPTION(0x1000, SoftEmu, SoftEmuException)
238 STD_EXCEPTION(0x1100, InstructionTLBMiss, UnknownException)
239 STD_EXCEPTION(0x1200, DataTLBMiss, UnknownException)
240 STD_EXCEPTION(0x1300, InstructionTLBError, UnknownException)
241 STD_EXCEPTION(0x1400, DataTLBError, UnknownException)
242
243 STD_EXCEPTION(0x1500, Reserved5, UnknownException)
244 STD_EXCEPTION(0x1600, Reserved6, UnknownException)
245 STD_EXCEPTION(0x1700, Reserved7, UnknownException)
246 STD_EXCEPTION(0x1800, Reserved8, UnknownException)
247 STD_EXCEPTION(0x1900, Reserved9, UnknownException)
248 STD_EXCEPTION(0x1a00, ReservedA, UnknownException)
249 STD_EXCEPTION(0x1b00, ReservedB, UnknownException)
250
251 STD_EXCEPTION(0x1c00, DataBreakpoint, UnknownException)
252 STD_EXCEPTION(0x1d00, InstructionBreakpoint, DebugException)
253 STD_EXCEPTION(0x1e00, PeripheralBreakpoint, UnknownException)
254 STD_EXCEPTION(0x1f00, DevPortBreakpoint, UnknownException)
255
256
257 .globl _end_of_vectors
258_end_of_vectors:
259
260
261 . = 0x2000
262
263/*
264 * This code finishes saving the registers to the exception frame
265 * and jumps to the appropriate handler for the exception.
266 * Register r21 is pointer into trap frame, r1 has new stack pointer.
267 */
268 .globl transfer_to_handler
269transfer_to_handler:
270 stw r22,_NIP(r21)
271 lis r22,MSR_POW@h
272 andc r23,r23,r22
273 stw r23,_MSR(r21)
274 SAVE_GPR(7, r21)
275 SAVE_4GPRS(8, r21)
276 SAVE_8GPRS(12, r21)
277 SAVE_8GPRS(24, r21)
278 mflr r23
279 andi. r24,r23,0x3f00 /* get vector offset */
280 stw r24,TRAP(r21)
281 li r22,0
282 stw r22,RESULT(r21)
283 mtspr SPRG2,r22 /* r1 is now kernel sp */
284 lwz r24,0(r23) /* virtual address of handler */
285 lwz r23,4(r23) /* where to go when done */
286 mtspr SRR0,r24
287 mtspr SRR1,r20
288 mtlr r23
289 SYNC
290 rfi /* jump to handler, enable MMU */
291
292int_return:
293 mfmsr r28 /* Disable interrupts */
294 li r4,0
295 ori r4,r4,MSR_EE
296 andc r28,r28,r4
297 SYNC /* Some chip revs need this... */
298 mtmsr r28
299 SYNC
300 lwz r2,_CTR(r1)
301 lwz r0,_LINK(r1)
302 mtctr r2
303 mtlr r0
304 lwz r2,_XER(r1)
305 lwz r0,_CCR(r1)
306 mtspr XER,r2
307 mtcrf 0xFF,r0
308 REST_10GPRS(3, r1)
309 REST_10GPRS(13, r1)
310 REST_8GPRS(23, r1)
311 REST_GPR(31, r1)
312 lwz r2,_NIP(r1) /* Restore environment */
313 lwz r0,_MSR(r1)
314 mtspr SRR0,r2
315 mtspr SRR1,r0
316 lwz r0,GPR0(r1)
317 lwz r2,GPR2(r1)
318 lwz r1,GPR1(r1)
319 SYNC
320 rfi
321
wdenk57b2d802003-06-27 21:31:46 +0000322
wdenk359733b2003-03-31 17:27:09 +0000323/*
324 * unsigned int get_immr (unsigned int mask)
325 *
326 * return (mask ? (IMMR & mask) : IMMR);
327 */
328 .globl get_immr
329get_immr:
330 mr r4,r3 /* save mask */
331 mfspr r3, IMMR /* IMMR */
332 cmpwi 0,r4,0 /* mask != 0 ? */
333 beq 4f
334 and r3,r3,r4 /* IMMR & mask */
3354:
336 blr
337
338 .globl get_pvr
339get_pvr:
340 mfspr r3, PVR
341 blr
342
343
344/*------------------------------------------------------------------------------*/
345
346/*
347 * void relocate_code (addr_sp, gd, addr_moni)
348 *
349 * This "function" does not return, instead it continues in RAM
350 * after relocating the monitor code.
351 *
352 * r3 = dest
353 * r4 = src
354 * r5 = length in bytes
355 * r6 = cachelinesize
356 */
357 .globl relocate_code
358relocate_code:
359 mr r1, r3 /* Set new stack pointer in SRAM */
360 mr r9, r4 /* Save copy of global data pointer in SRAM */
361 mr r10, r5 /* Save copy of monitor destination Address in SRAM */
362
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100363 GET_GOT
wdenk359733b2003-03-31 17:27:09 +0000364 mr r3, r5 /* Destination Address */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200365 lis r4, CONFIG_SYS_MONITOR_BASE@h /* Source Address */
366 ori r4, r4, CONFIG_SYS_MONITOR_BASE@l
wdenkb9a83a92003-05-30 12:48:29 +0000367 lwz r5, GOT(__init_end)
368 sub r5, r5, r4
wdenk359733b2003-03-31 17:27:09 +0000369
370 /*
371 * Fix GOT pointer:
372 *
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200373 * New GOT-PTR = (old GOT-PTR - CONFIG_SYS_MONITOR_BASE) + Destination Address
wdenk359733b2003-03-31 17:27:09 +0000374 *
375 * Offset:
376 */
377 sub r15, r10, r4
378
379 /* First our own GOT */
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100380 add r12, r12, r15
wdenk359733b2003-03-31 17:27:09 +0000381 /* the the one used by the C code */
382 add r30, r30, r15
383
384 /*
385 * Now relocate code
386 */
387
388 cmplw cr1,r3,r4
389 addi r0,r5,3
390 srwi. r0,r0,2
391 beq cr1,4f /* In place copy is not necessary */
392 beq 4f /* Protect against 0 count */
393 mtctr r0
394 bge cr1,2f
395
396 la r8,-4(r4)
397 la r7,-4(r3)
3981: lwzu r0,4(r8)
399 stwu r0,4(r7)
400 bdnz 1b
401 b 4f
402
4032: slwi r0,r0,2
404 add r8,r4,r0
405 add r7,r3,r0
4063: lwzu r0,-4(r8)
407 stwu r0,-4(r7)
408 bdnz 3b
409
wdenk57b2d802003-06-27 21:31:46 +00004104: sync
wdenk359733b2003-03-31 17:27:09 +0000411 isync
412
413/*
414 * We are done. Do not return, instead branch to second part of board
415 * initialization, now running from RAM.
416 */
417
418 addi r0, r10, in_ram - _start + EXC_OFF_SYS_RESET
419 mtlr r0
420 blr
421
422in_ram:
423
424 /*
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100425 * Relocation Function, r12 point to got2+0x8000
wdenk359733b2003-03-31 17:27:09 +0000426 *
wdenk57b2d802003-06-27 21:31:46 +0000427 * Adjust got2 pointers, no need to check for 0, this code
428 * already puts a few entries in the table.
wdenk359733b2003-03-31 17:27:09 +0000429 */
430 li r0,__got2_entries@sectoff@l
431 la r3,GOT(_GOT2_TABLE_)
432 lwz r11,GOT(_GOT2_TABLE_)
433 mtctr r0
434 sub r11,r3,r11
435 addi r3,r3,-4
4361: lwzu r0,4(r3)
Joakim Tjernlund4f2fdac2009-10-08 02:03:51 +0200437 cmpwi r0,0
438 beq- 2f
wdenk359733b2003-03-31 17:27:09 +0000439 add r0,r0,r11
440 stw r0,0(r3)
Joakim Tjernlund4f2fdac2009-10-08 02:03:51 +02004412: bdnz 1b
wdenk359733b2003-03-31 17:27:09 +0000442
443 /*
wdenk57b2d802003-06-27 21:31:46 +0000444 * Now adjust the fixups and the pointers to the fixups
wdenk359733b2003-03-31 17:27:09 +0000445 * in case we need to move ourselves again.
446 */
Joakim Tjernlund4f2fdac2009-10-08 02:03:51 +0200447 li r0,__fixup_entries@sectoff@l
wdenk359733b2003-03-31 17:27:09 +0000448 lwz r3,GOT(_FIXUP_TABLE_)
449 cmpwi r0,0
450 mtctr r0
451 addi r3,r3,-4
452 beq 4f
4533: lwzu r4,4(r3)
454 lwzux r0,r4,r11
455 add r0,r0,r11
456 stw r10,0(r3)
457 stw r0,0(r4)
458 bdnz 3b
4594:
460clear_bss:
461 /*
462 * Now clear BSS segment
463 */
wdenkbf2f8c92003-05-22 22:52:13 +0000464 lwz r3,GOT(__bss_start)
wdenk359733b2003-03-31 17:27:09 +0000465 lwz r4,GOT(_end)
466 cmplw 0, r3, r4
467 beq 6f
468
469 li r0, 0
4705:
471 stw r0, 0(r3)
472 addi r3, r3, 4
473 cmplw 0, r3, r4
474 bne 5b
4756:
476
477 mr r3, r9 /* Global Data pointer */
478 mr r4, r10 /* Destination Address */
479 bl board_init_r
480
wdenk359733b2003-03-31 17:27:09 +0000481 /*
482 * Copy exception vector code to low memory
483 *
484 * r3: dest_addr
485 * r7: source address, r8: end address, r9: target address
486 */
487 .globl trap_init
488trap_init:
Joakim Tjernlund3fbaa4d2010-01-19 14:41:56 +0100489 mflr r4 /* save link register */
490 GET_GOT
wdenk359733b2003-03-31 17:27:09 +0000491 lwz r7, GOT(_start)
492 lwz r8, GOT(_end_of_vectors)
493
wdenk4e112c12003-06-03 23:54:09 +0000494 li r9, 0x100 /* reset vector always at 0x100 */
wdenk359733b2003-03-31 17:27:09 +0000495
496 cmplw 0, r7, r8
497 bgelr /* return if r7>=r8 - just in case */
wdenk359733b2003-03-31 17:27:09 +00004981:
499 lwz r0, 0(r7)
500 stw r0, 0(r9)
501 addi r7, r7, 4
502 addi r9, r9, 4
503 cmplw 0, r7, r8
504 bne 1b
505
506 /*
507 * relocate `hdlr' and `int_return' entries
508 */
509 li r7, .L_MachineCheck - _start + EXC_OFF_SYS_RESET
510 li r8, Alignment - _start + EXC_OFF_SYS_RESET
5112:
512 bl trap_reloc
513 addi r7, r7, 0x100 /* next exception vector */
514 cmplw 0, r7, r8
515 blt 2b
516
517 li r7, .L_Alignment - _start + EXC_OFF_SYS_RESET
518 bl trap_reloc
519
520 li r7, .L_ProgramCheck - _start + EXC_OFF_SYS_RESET
521 bl trap_reloc
522
523 li r7, .L_FPUnavailable - _start + EXC_OFF_SYS_RESET
524 li r8, SystemCall - _start + EXC_OFF_SYS_RESET
5253:
526 bl trap_reloc
527 addi r7, r7, 0x100 /* next exception vector */
528 cmplw 0, r7, r8
529 blt 3b
530
531 li r7, .L_SingleStep - _start + EXC_OFF_SYS_RESET
532 li r8, _end_of_vectors - _start + EXC_OFF_SYS_RESET
5334:
534 bl trap_reloc
535 addi r7, r7, 0x100 /* next exception vector */
536 cmplw 0, r7, r8
537 blt 4b
538
539 mtlr r4 /* restore link register */
540 blr
541
wdenkbc01dd52004-01-02 16:05:07 +0000542#if defined(CONFIG_PATI)
543/* Program the PLL */
544pll_prog_code_start:
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200545 lis r4, (CONFIG_SYS_IMMR + 0x002fc384)@h
546 ori r4, r4, (CONFIG_SYS_IMMR + 0x002fc384)@l
wdenkbc01dd52004-01-02 16:05:07 +0000547 lis r3, (0x55ccaa33)@h
548 ori r3, r3, (0x55ccaa33)@l
549 stw r3, 0(r4)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200550 lis r4, (CONFIG_SYS_IMMR + 0x002fc284)@h
551 ori r4, r4, (CONFIG_SYS_IMMR + 0x002fc284)@l
552 lis r3, CONFIG_SYS_PLPRCR@h
553 ori r3, r3, CONFIG_SYS_PLPRCR@l
wdenkbc01dd52004-01-02 16:05:07 +0000554 stw r3, 0(r4)
555 addis r3,0,0x0
556 ori r3,r3,0xA000
557 mtctr r3
558..spinlp:
559 bdnz ..spinlp /* spin loop */
560 blr
561pll_prog_code_end:
562 nop
563 blr
564#endif