Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / m68knommu / platform / 68328 / head-rom.S
1 #include <linux/config.h>
2         
3         .global _start
4         .global _stext
5
6         .global _rambase
7         .global _ramvec
8         .global _ramstart
9         .global _ramend
10
11 #ifdef CONFIG_INIT_LCD
12         .global splash_bits
13 #endif
14
15         .data
16
17 /*
18  *      Set up the usable of RAM stuff. Size of RAM is determined then
19  *      an initial stack set up at the end.
20  */
21 .align 4
22 _ramvec:
23 .long   0
24 _rambase:
25 .long   0
26 _ramstart:
27 .long   0
28 _ramend:
29 .long   0
30
31 #define RAMEND  (CONFIG_RAMBASE + CONFIG_RAMSIZE)
32
33 #ifdef CONFIG_INIT_LCD
34 splash_bits:
35 #include "bootlogo.rh"
36 #endif
37         
38         .text
39 _start:
40 _stext: movew   #0x2700,%sr
41 #ifdef CONFIG_INIT_LCD
42         movel   #splash_bits, 0xfffffA00 /* LSSA */
43         moveb   #0x28,   0xfffffA05     /* LVPW */
44         movew   #0x280,  0xFFFFFa08     /* LXMAX */
45         movew   #0x1df,  0xFFFFFa0a     /* LYMAX */
46         moveb   #0,      0xfffffa29     /* LBAR */
47         moveb   #0,      0xfffffa25     /* LPXCD */
48         moveb   #0x08,   0xFFFFFa20     /* LPICF */
49         moveb   #0x01,   0xFFFFFA21     /* -ve pol */
50         moveb   #0x81,   0xfffffA27     /* LCKCON */
51         movew   #0xff00, 0xfffff412     /* LCD pins */
52 #endif
53         moveal  #RAMEND-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp
54         movew   #32767, %d0  /* PLL settle wait loop */
55 1:      subq    #1, %d0
56         bne     1b
57
58         /* Copy data segment from ROM to RAM */
59         moveal  #_etext, %a0
60         moveal  #_sdata, %a1
61         moveal  #_edata, %a2
62
63         /* Copy %a0 to %a1 until %a1 == %a2 */
64 1:      movel   %a0@+, %a1@+
65         cmpal   %a1, %a2
66         bhi     1b
67
68         moveal  #_sbss, %a0
69         moveal  #_ebss, %a1
70         /* Copy 0 to %a0 until %a0 == %a1 */
71         
72 1:
73         clrl    %a0@+
74         cmpal   %a0, %a1
75         bhi     1b
76
77         movel   #_sdata, %d0    
78         movel   %d0, _rambase        
79         movel   #_ebss, %d0
80         movel   %d0, _ramstart
81         movel   #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0
82         movel   %d0, _ramend
83         movel   #CONFIG_VECTORBASE,     %d0
84         movel   %d0, _ramvec
85         
86 /*
87  * load the current task pointer and stack
88  */
89         lea     init_thread_union, %a0
90         lea     0x2000(%a0), %sp
91
92 1:      jsr     start_kernel
93         bra 1b
94 _exit:
95
96         jmp     _exit
97
98
99 putc:
100         moveb   %d7,0xfffff907
101 1:
102         movew   0xfffff906, %d7
103         andw    #0x2000, %d7
104         beq     1b
105         rts
106
107         .data
108 env:
109         .long   0
110         .text
111