- pre3:
[davej-history.git] / arch / arm / boot / compressed / head-ftvpci.S
bloba8c806ef3853eca4bb5075a0af09db07b4734dd9
1 /* 
2  * linux/arch/arm/boot/compressed/head-ftvpci.S
3  * 
4  * Copyright (C) 2000 FutureTV Labs Ltd.
5  * 
6  * Special startup code for FTV PCI board.
7  */
9         .section        ".start", #alloc, #execinstr
10 ftv_start:
11         mcr     p15, 0, r0, c7, c5, 0           @ flush I cache
12         mrc     p15, 0, r0, c1, c0
13         orr     r0, r0, #1 << 12
14         mcr     p15, 0, r0, c1, c0              @ enable I cache
15         mov     r0, #0
16         mcreq   p15, 0, r0, c15, c1, 2          @ enable clock switching
18         /* check to see if the kernel must be relocated */
19         ldr     ip, =ftv_start
20         adr     sl, ftv_start
21         teq     ip, sl
22         beq     2f                              @ no need to copy
24         /* in the wrong place -> presumably, executing out of ROM */
25         sub     ip, ip, sl                      @ displacement
26         ldr     lr, =_start                     @ destination
27         sub     sp, lr, ip                      @ source
28         ldr     fp, =_edata                     @ end of copied area
29 1:      ldmia   sp!, {r0, r1, r2, r3, r4, r5, r6, r10}
30         stmia   lr!, {r0, r1, r2, r3, r4, r5, r6, r10}
31         cmp     lr, fp
32         ble     1b
35         mov     r8, #0
36         mov     r7, #3
37         b       1f
38 .ltorg
40         /* fall back into head.S */