blob: be980a135641c152b2ec11ecaa4a12fa184b3623 [file] [log] [blame]
wdenk0db5bca2003-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.
wdenk8bde7f72003-06-27 21:31:46 +00006 *
wdenk0db5bca2003-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
wdenk8bde7f72003-06-27 21:31:46 +000028 *
wdenk0db5bca2003-03-31 17:27:09 +000029 * Discription: startup code
30 *
31 */
32
33#include <config.h>
34#include <mpc5xx.h>
Peter Tyser561858e2008-11-03 09:30:59 -060035#include <timestamp.h>
wdenk0db5bca2003-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>
wdenk8bde7f72003-06-27 21:31:46 +000043
wdenk0db5bca2003-03-31 17:27:09 +000044#include <linux/config.h>
wdenk8bde7f72003-06-27 21:31:46 +000045#include <asm/processor.h>
wdenk0db5bca2003-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 *
59 * Use r14 to access the GOT
60 */
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
wdenk3b57fe02003-05-30 12:48:29 +000070 GOT_ENTRY(__init_end)
wdenk0db5bca2003-03-31 17:27:09 +000071 GOT_ENTRY(_end)
wdenk5d232d02003-05-22 22:52:13 +000072 GOT_ENTRY(__bss_start)
wdenk0db5bca2003-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 Tyser561858e2008-11-03 09:30:59 -060084 .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
wdenk0db5bca2003-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-VILLARD6d0f6bc2008-10-16 15:01:15 +020091 li r4, CONFIG_SYS_ISB /* Set ISB bit */
wdenk8bde7f72003-06-27 21:31:46 +000092 or r3, r3, r4
wdenk0db5bca2003-03-31 17:27:09 +000093 mtspr 638, r3
94 li r21, BOOTFLAG_COLD /* Normal Power-On: Boot from FLASH */
95 b boot_cold
96
97 . = EXC_OFF_SYS_RESET + 0x20
98
99 .globl _start_warm
100_start_warm:
101 li r21, BOOTFLAG_WARM /* Software reboot */
102 b boot_warm
103
104boot_cold:
105boot_warm:
106
107 /* Initialize machine status; enable machine check interrupt */
108 /*----------------------------------------------------------------------*/
109 li r3, MSR_KERNEL /* Set ME, RI flags */
110 mtmsr r3
111 mtspr SRR1, r3 /* Make SRR1 match MSR */
112
113 /* Initialize debug port registers */
114 /*----------------------------------------------------------------------*/
115 xor r0, r0, r0 /* Clear R0 */
116 mtspr LCTRL1, r0 /* Initialize debug port regs */
117 mtspr LCTRL2, r0
118 mtspr COUNTA, r0
119 mtspr COUNTB, r0
120
wdenkb6e4c402004-01-02 16:05:07 +0000121#if defined(CONFIG_PATI)
122 /* the external flash access on PATI fails if programming the PLL to 40MHz.
123 * Copy the PLL programming code to the internal RAM and execute it
124 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200125 lis r3, CONFIG_SYS_MONITOR_BASE@h
126 ori r3, r3, CONFIG_SYS_MONITOR_BASE@l
wdenkb6e4c402004-01-02 16:05:07 +0000127 addi r3, r3, pll_prog_code_start - _start + EXC_OFF_SYS_RESET
128
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200129 lis r4, CONFIG_SYS_INIT_RAM_ADDR@h
130 ori r4, r4, CONFIG_SYS_INIT_RAM_ADDR@l
wdenkb6e4c402004-01-02 16:05:07 +0000131 mtlr r4
132 addis r5,0,0x0
133 ori r5,r5,((pll_prog_code_end - pll_prog_code_start) >>2)
134 mtctr r5
135 addi r3, r3, -4
136 addi r4, r4, -4
1370:
138 lwzu r0,4(r3)
139 stwu r0,4(r4)
140 bdnz 0b /* copy loop */
141 blrl
142#endif
143
wdenk0db5bca2003-03-31 17:27:09 +0000144 /*
145 * Calculate absolute address in FLASH and jump there
146 *----------------------------------------------------------------------*/
147
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200148 lis r3, CONFIG_SYS_MONITOR_BASE@h
149 ori r3, r3, CONFIG_SYS_MONITOR_BASE@l
wdenk0db5bca2003-03-31 17:27:09 +0000150 addi r3, r3, in_flash - _start + EXC_OFF_SYS_RESET
151 mtlr r3
152 blr
153
154in_flash:
155
156 /* Initialize some SPRs that are hard to access from C */
157 /*----------------------------------------------------------------------*/
wdenk8bde7f72003-06-27 21:31:46 +0000158
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200159 lis r3, CONFIG_SYS_IMMR@h /* Pass IMMR as arg1 to C routine */
160 lis r2, CONFIG_SYS_INIT_SP_ADDR@h
161 ori r1, r2, CONFIG_SYS_INIT_SP_ADDR@l /* Set up the stack in internal SRAM */
wdenk0db5bca2003-03-31 17:27:09 +0000162 /* Note: R0 is still 0 here */
163 stwu r0, -4(r1) /* Clear final stack frame so that */
164 stwu r0, -4(r1) /* stack backtraces terminate cleanly */
165
166 /*
167 * Disable serialized ifetch and show cycles
168 * (i.e. set processor to normal mode) for maximum
169 * performance.
170 */
171
172 li r2, 0x0007
173 mtspr ICTRL, r2
174
175 /* Set up debug mode entry */
176
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200177 lis r2, CONFIG_SYS_DER@h
178 ori r2, r2, CONFIG_SYS_DER@l
wdenk0db5bca2003-03-31 17:27:09 +0000179 mtspr DER, r2
180
181 /* Let the C-code set up the rest */
182 /* */
183 /* Be careful to keep code relocatable ! */
184 /*----------------------------------------------------------------------*/
185
186 GET_GOT /* initialize GOT access */
187
188 /* r3: IMMR */
189 bl cpu_init_f /* run low-level CPU init code (from Flash) */
190
191 mr r3, r21
192 /* r3: BOOTFLAG */
193 bl board_init_f /* run 1st part of board init code (from Flash) */
194
195
wdenk0db5bca2003-03-31 17:27:09 +0000196 .globl _start_of_vectors
197_start_of_vectors:
198
199/* Machine check */
200 STD_EXCEPTION(0x200, MachineCheck, MachineCheckException)
201
202/* Data Storage exception. "Never" generated on the 860. */
203 STD_EXCEPTION(0x300, DataStorage, UnknownException)
204
205/* Instruction Storage exception. "Never" generated on the 860. */
206 STD_EXCEPTION(0x400, InstStorage, UnknownException)
207
208/* External Interrupt exception. */
209 STD_EXCEPTION(0x500, ExtInterrupt, external_interrupt)
210
211/* Alignment exception. */
212 . = 0x600
213Alignment:
Rafal Jaworowski02032e82007-06-22 14:58:04 +0200214 EXCEPTION_PROLOG(SRR0, SRR1)
wdenk0db5bca2003-03-31 17:27:09 +0000215 mfspr r4,DAR
216 stw r4,_DAR(r21)
217 mfspr r5,DSISR
218 stw r5,_DSISR(r21)
219 addi r3,r1,STACK_FRAME_OVERHEAD
Joakim Tjernlundfc4e1882010-01-19 14:41:55 +0100220 EXC_XFER_TEMPLATE(Alignment, AlignmentException, MSR_KERNEL, COPY_EE)
wdenk0db5bca2003-03-31 17:27:09 +0000221
222/* Program check exception */
223 . = 0x700
224ProgramCheck:
Rafal Jaworowski02032e82007-06-22 14:58:04 +0200225 EXCEPTION_PROLOG(SRR0, SRR1)
wdenk0db5bca2003-03-31 17:27:09 +0000226 addi r3,r1,STACK_FRAME_OVERHEAD
Joakim Tjernlundfc4e1882010-01-19 14:41:55 +0100227 EXC_XFER_TEMPLATE(ProgramCheck, ProgramCheckException,
228 MSR_KERNEL, COPY_EE)
wdenk0db5bca2003-03-31 17:27:09 +0000229
230 /* FPU on MPC5xx available. We will use it later.
231 */
232 STD_EXCEPTION(0x800, FPUnavailable, UnknownException)
233
234 /* I guess we could implement decrementer, and may have
235 * to someday for timekeeping.
236 */
237 STD_EXCEPTION(0x900, Decrementer, timer_interrupt)
238 STD_EXCEPTION(0xa00, Trap_0a, UnknownException)
239 STD_EXCEPTION(0xb00, Trap_0b, UnknownException)
wdenk27b207f2003-07-24 23:38:38 +0000240 STD_EXCEPTION(0xc00, SystemCall, UnknownException)
wdenk0db5bca2003-03-31 17:27:09 +0000241 STD_EXCEPTION(0xd00, SingleStep, UnknownException)
242
243 STD_EXCEPTION(0xe00, Trap_0e, UnknownException)
244 STD_EXCEPTION(0xf00, Trap_0f, UnknownException)
245
246 /* On the MPC8xx, this is a software emulation interrupt. It occurs
247 * for all unimplemented and illegal instructions.
248 */
249 STD_EXCEPTION(0x1000, SoftEmu, SoftEmuException)
250 STD_EXCEPTION(0x1100, InstructionTLBMiss, UnknownException)
251 STD_EXCEPTION(0x1200, DataTLBMiss, UnknownException)
252 STD_EXCEPTION(0x1300, InstructionTLBError, UnknownException)
253 STD_EXCEPTION(0x1400, DataTLBError, UnknownException)
254
255 STD_EXCEPTION(0x1500, Reserved5, UnknownException)
256 STD_EXCEPTION(0x1600, Reserved6, UnknownException)
257 STD_EXCEPTION(0x1700, Reserved7, UnknownException)
258 STD_EXCEPTION(0x1800, Reserved8, UnknownException)
259 STD_EXCEPTION(0x1900, Reserved9, UnknownException)
260 STD_EXCEPTION(0x1a00, ReservedA, UnknownException)
261 STD_EXCEPTION(0x1b00, ReservedB, UnknownException)
262
263 STD_EXCEPTION(0x1c00, DataBreakpoint, UnknownException)
264 STD_EXCEPTION(0x1d00, InstructionBreakpoint, DebugException)
265 STD_EXCEPTION(0x1e00, PeripheralBreakpoint, UnknownException)
266 STD_EXCEPTION(0x1f00, DevPortBreakpoint, UnknownException)
267
268
269 .globl _end_of_vectors
270_end_of_vectors:
271
272
273 . = 0x2000
274
275/*
276 * This code finishes saving the registers to the exception frame
277 * and jumps to the appropriate handler for the exception.
278 * Register r21 is pointer into trap frame, r1 has new stack pointer.
279 */
280 .globl transfer_to_handler
281transfer_to_handler:
282 stw r22,_NIP(r21)
283 lis r22,MSR_POW@h
284 andc r23,r23,r22
285 stw r23,_MSR(r21)
286 SAVE_GPR(7, r21)
287 SAVE_4GPRS(8, r21)
288 SAVE_8GPRS(12, r21)
289 SAVE_8GPRS(24, r21)
290 mflr r23
291 andi. r24,r23,0x3f00 /* get vector offset */
292 stw r24,TRAP(r21)
293 li r22,0
294 stw r22,RESULT(r21)
295 mtspr SPRG2,r22 /* r1 is now kernel sp */
296 lwz r24,0(r23) /* virtual address of handler */
297 lwz r23,4(r23) /* where to go when done */
298 mtspr SRR0,r24
299 mtspr SRR1,r20
300 mtlr r23
301 SYNC
302 rfi /* jump to handler, enable MMU */
303
304int_return:
305 mfmsr r28 /* Disable interrupts */
306 li r4,0
307 ori r4,r4,MSR_EE
308 andc r28,r28,r4
309 SYNC /* Some chip revs need this... */
310 mtmsr r28
311 SYNC
312 lwz r2,_CTR(r1)
313 lwz r0,_LINK(r1)
314 mtctr r2
315 mtlr r0
316 lwz r2,_XER(r1)
317 lwz r0,_CCR(r1)
318 mtspr XER,r2
319 mtcrf 0xFF,r0
320 REST_10GPRS(3, r1)
321 REST_10GPRS(13, r1)
322 REST_8GPRS(23, r1)
323 REST_GPR(31, r1)
324 lwz r2,_NIP(r1) /* Restore environment */
325 lwz r0,_MSR(r1)
326 mtspr SRR0,r2
327 mtspr SRR1,r0
328 lwz r0,GPR0(r1)
329 lwz r2,GPR2(r1)
330 lwz r1,GPR1(r1)
331 SYNC
332 rfi
333
wdenk8bde7f72003-06-27 21:31:46 +0000334
wdenk0db5bca2003-03-31 17:27:09 +0000335/*
336 * unsigned int get_immr (unsigned int mask)
337 *
338 * return (mask ? (IMMR & mask) : IMMR);
339 */
340 .globl get_immr
341get_immr:
342 mr r4,r3 /* save mask */
343 mfspr r3, IMMR /* IMMR */
344 cmpwi 0,r4,0 /* mask != 0 ? */
345 beq 4f
346 and r3,r3,r4 /* IMMR & mask */
3474:
348 blr
349
350 .globl get_pvr
351get_pvr:
352 mfspr r3, PVR
353 blr
354
355
356/*------------------------------------------------------------------------------*/
357
358/*
359 * void relocate_code (addr_sp, gd, addr_moni)
360 *
361 * This "function" does not return, instead it continues in RAM
362 * after relocating the monitor code.
363 *
364 * r3 = dest
365 * r4 = src
366 * r5 = length in bytes
367 * r6 = cachelinesize
368 */
369 .globl relocate_code
370relocate_code:
371 mr r1, r3 /* Set new stack pointer in SRAM */
372 mr r9, r4 /* Save copy of global data pointer in SRAM */
373 mr r10, r5 /* Save copy of monitor destination Address in SRAM */
374
375 mr r3, r5 /* Destination Address */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200376 lis r4, CONFIG_SYS_MONITOR_BASE@h /* Source Address */
377 ori r4, r4, CONFIG_SYS_MONITOR_BASE@l
wdenk3b57fe02003-05-30 12:48:29 +0000378 lwz r5, GOT(__init_end)
379 sub r5, r5, r4
wdenk0db5bca2003-03-31 17:27:09 +0000380
381 /*
382 * Fix GOT pointer:
383 *
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200384 * New GOT-PTR = (old GOT-PTR - CONFIG_SYS_MONITOR_BASE) + Destination Address
wdenk0db5bca2003-03-31 17:27:09 +0000385 *
386 * Offset:
387 */
388 sub r15, r10, r4
389
390 /* First our own GOT */
391 add r14, r14, r15
392 /* the the one used by the C code */
393 add r30, r30, r15
394
395 /*
396 * Now relocate code
397 */
398
399 cmplw cr1,r3,r4
400 addi r0,r5,3
401 srwi. r0,r0,2
402 beq cr1,4f /* In place copy is not necessary */
403 beq 4f /* Protect against 0 count */
404 mtctr r0
405 bge cr1,2f
406
407 la r8,-4(r4)
408 la r7,-4(r3)
4091: lwzu r0,4(r8)
410 stwu r0,4(r7)
411 bdnz 1b
412 b 4f
413
4142: slwi r0,r0,2
415 add r8,r4,r0
416 add r7,r3,r0
4173: lwzu r0,-4(r8)
418 stwu r0,-4(r7)
419 bdnz 3b
420
wdenk8bde7f72003-06-27 21:31:46 +00004214: sync
wdenk0db5bca2003-03-31 17:27:09 +0000422 isync
423
424/*
425 * We are done. Do not return, instead branch to second part of board
426 * initialization, now running from RAM.
427 */
428
429 addi r0, r10, in_ram - _start + EXC_OFF_SYS_RESET
430 mtlr r0
431 blr
432
433in_ram:
434
435 /*
436 * Relocation Function, r14 point to got2+0x8000
437 *
wdenk8bde7f72003-06-27 21:31:46 +0000438 * Adjust got2 pointers, no need to check for 0, this code
439 * already puts a few entries in the table.
wdenk0db5bca2003-03-31 17:27:09 +0000440 */
441 li r0,__got2_entries@sectoff@l
442 la r3,GOT(_GOT2_TABLE_)
443 lwz r11,GOT(_GOT2_TABLE_)
444 mtctr r0
445 sub r11,r3,r11
446 addi r3,r3,-4
4471: lwzu r0,4(r3)
Joakim Tjernlundafc3ba02009-10-08 02:03:51 +0200448 cmpwi r0,0
449 beq- 2f
wdenk0db5bca2003-03-31 17:27:09 +0000450 add r0,r0,r11
451 stw r0,0(r3)
Joakim Tjernlundafc3ba02009-10-08 02:03:51 +02004522: bdnz 1b
wdenk0db5bca2003-03-31 17:27:09 +0000453
454 /*
wdenk8bde7f72003-06-27 21:31:46 +0000455 * Now adjust the fixups and the pointers to the fixups
wdenk0db5bca2003-03-31 17:27:09 +0000456 * in case we need to move ourselves again.
457 */
Joakim Tjernlundafc3ba02009-10-08 02:03:51 +0200458 li r0,__fixup_entries@sectoff@l
wdenk0db5bca2003-03-31 17:27:09 +0000459 lwz r3,GOT(_FIXUP_TABLE_)
460 cmpwi r0,0
461 mtctr r0
462 addi r3,r3,-4
463 beq 4f
4643: lwzu r4,4(r3)
465 lwzux r0,r4,r11
466 add r0,r0,r11
467 stw r10,0(r3)
468 stw r0,0(r4)
469 bdnz 3b
4704:
471clear_bss:
472 /*
473 * Now clear BSS segment
474 */
wdenk5d232d02003-05-22 22:52:13 +0000475 lwz r3,GOT(__bss_start)
wdenk0db5bca2003-03-31 17:27:09 +0000476 lwz r4,GOT(_end)
477 cmplw 0, r3, r4
478 beq 6f
479
480 li r0, 0
4815:
482 stw r0, 0(r3)
483 addi r3, r3, 4
484 cmplw 0, r3, r4
485 bne 5b
4866:
487
488 mr r3, r9 /* Global Data pointer */
489 mr r4, r10 /* Destination Address */
490 bl board_init_r
491
wdenk0db5bca2003-03-31 17:27:09 +0000492 /*
493 * Copy exception vector code to low memory
494 *
495 * r3: dest_addr
496 * r7: source address, r8: end address, r9: target address
497 */
498 .globl trap_init
499trap_init:
500 lwz r7, GOT(_start)
501 lwz r8, GOT(_end_of_vectors)
502
wdenk682011f2003-06-03 23:54:09 +0000503 li r9, 0x100 /* reset vector always at 0x100 */
wdenk0db5bca2003-03-31 17:27:09 +0000504
505 cmplw 0, r7, r8
506 bgelr /* return if r7>=r8 - just in case */
507
508 mflr r4 /* save link register */
5091:
510 lwz r0, 0(r7)
511 stw r0, 0(r9)
512 addi r7, r7, 4
513 addi r9, r9, 4
514 cmplw 0, r7, r8
515 bne 1b
516
517 /*
518 * relocate `hdlr' and `int_return' entries
519 */
520 li r7, .L_MachineCheck - _start + EXC_OFF_SYS_RESET
521 li r8, Alignment - _start + EXC_OFF_SYS_RESET
5222:
523 bl trap_reloc
524 addi r7, r7, 0x100 /* next exception vector */
525 cmplw 0, r7, r8
526 blt 2b
527
528 li r7, .L_Alignment - _start + EXC_OFF_SYS_RESET
529 bl trap_reloc
530
531 li r7, .L_ProgramCheck - _start + EXC_OFF_SYS_RESET
532 bl trap_reloc
533
534 li r7, .L_FPUnavailable - _start + EXC_OFF_SYS_RESET
535 li r8, SystemCall - _start + EXC_OFF_SYS_RESET
5363:
537 bl trap_reloc
538 addi r7, r7, 0x100 /* next exception vector */
539 cmplw 0, r7, r8
540 blt 3b
541
542 li r7, .L_SingleStep - _start + EXC_OFF_SYS_RESET
543 li r8, _end_of_vectors - _start + EXC_OFF_SYS_RESET
5444:
545 bl trap_reloc
546 addi r7, r7, 0x100 /* next exception vector */
547 cmplw 0, r7, r8
548 blt 4b
549
550 mtlr r4 /* restore link register */
551 blr
552
wdenkb6e4c402004-01-02 16:05:07 +0000553#if defined(CONFIG_PATI)
554/* Program the PLL */
555pll_prog_code_start:
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200556 lis r4, (CONFIG_SYS_IMMR + 0x002fc384)@h
557 ori r4, r4, (CONFIG_SYS_IMMR + 0x002fc384)@l
wdenkb6e4c402004-01-02 16:05:07 +0000558 lis r3, (0x55ccaa33)@h
559 ori r3, r3, (0x55ccaa33)@l
560 stw r3, 0(r4)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200561 lis r4, (CONFIG_SYS_IMMR + 0x002fc284)@h
562 ori r4, r4, (CONFIG_SYS_IMMR + 0x002fc284)@l
563 lis r3, CONFIG_SYS_PLPRCR@h
564 ori r3, r3, CONFIG_SYS_PLPRCR@l
wdenkb6e4c402004-01-02 16:05:07 +0000565 stw r3, 0(r4)
566 addis r3,0,0x0
567 ori r3,r3,0xA000
568 mtctr r3
569..spinlp:
570 bdnz ..spinlp /* spin loop */
571 blr
572pll_prog_code_end:
573 nop
574 blr
575#endif