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