diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/m68knommu/platform/68328/head-ram.S |
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/m68knommu/platform/68328/head-ram.S')
-rw-r--r-- | arch/m68knommu/platform/68328/head-ram.S | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/68328/head-ram.S b/arch/m68knommu/platform/68328/head-ram.S new file mode 100644 index 00000000000..6bdc9bce43f --- /dev/null +++ b/arch/m68knommu/platform/68328/head-ram.S | |||
@@ -0,0 +1,171 @@ | |||
1 | #include <linux/config.h> | ||
2 | |||
3 | .global __main | ||
4 | .global __ram_start | ||
5 | .global __ram_end | ||
6 | .global __rom_start | ||
7 | .global __rom_end | ||
8 | |||
9 | .global _rambase | ||
10 | .global _ramstart | ||
11 | |||
12 | .global splash_bits | ||
13 | .global _start | ||
14 | .global _stext | ||
15 | |||
16 | #define DEBUG | ||
17 | #define ROM_OFFSET 0x10C00000 | ||
18 | #define STACK_GAURD 0x10 | ||
19 | |||
20 | .text | ||
21 | |||
22 | _start: | ||
23 | _stext: | ||
24 | movew #0x2700, %sr /* Exceptions off! */ | ||
25 | |||
26 | #if 0 | ||
27 | /* Init chip registers. uCsimm specific */ | ||
28 | moveb #0x00, 0xfffffb0b /* Watchdog off */ | ||
29 | moveb #0x10, 0xfffff000 /* SCR */ | ||
30 | |||
31 | movew #0x2400, 0xfffff200 /* PLLCR */ | ||
32 | movew #0x0123, 0xfffff202 /* PLLFSR */ | ||
33 | |||
34 | moveb #0x00, 0xfffff40b /* enable chip select */ | ||
35 | moveb #0x00, 0xfffff423 /* enable /DWE */ | ||
36 | moveb #0x08, 0xfffffd0d /* disable hardmap */ | ||
37 | moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ | ||
38 | |||
39 | movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ | ||
40 | movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ | ||
41 | |||
42 | movew #0x8f00, 0xfffffc00 /* DRAM configuration */ | ||
43 | movew #0x9667, 0xfffffc02 /* DRAM control */ | ||
44 | movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ | ||
45 | movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ | ||
46 | |||
47 | moveb #0x40, 0xfffff300 /* IVR */ | ||
48 | movel #0x007FFFFF, %d0 /* IMR */ | ||
49 | movel %d0, 0xfffff304 | ||
50 | |||
51 | moveb 0xfffff42b, %d0 | ||
52 | andb #0xe0, %d0 | ||
53 | moveb %d0, 0xfffff42b | ||
54 | |||
55 | moveb #0x08, 0xfffff907 /* Ignore CTS */ | ||
56 | movew #0x010b, 0xfffff902 /* BAUD to 9600 */ | ||
57 | movew #0xe100, 0xfffff900 /* enable */ | ||
58 | #endif | ||
59 | |||
60 | movew #16384, %d0 /* PLL settle wait loop */ | ||
61 | L0: | ||
62 | subw #1, %d0 | ||
63 | bne L0 | ||
64 | #ifdef DEBUG | ||
65 | moveq #70, %d7 /* 'F' */ | ||
66 | moveb %d7,0xfffff907 /* No absolute addresses */ | ||
67 | pclp1: | ||
68 | movew 0xfffff906, %d7 | ||
69 | andw #0x2000, %d7 | ||
70 | beq pclp1 | ||
71 | #endif /* DEBUG */ | ||
72 | |||
73 | #ifdef CONFIG_RELOCATE | ||
74 | /* Copy me to RAM */ | ||
75 | moveal #__rom_start, %a0 | ||
76 | moveal #__ram_start, %a1 | ||
77 | moveal #_edata, %a2 | ||
78 | |||
79 | /* Copy %a0 to %a1 until %a1 == %a2 */ | ||
80 | LD1: | ||
81 | movel %a0@+, %d0 | ||
82 | movel %d0, %a1@+ | ||
83 | cmpal %a1, %a2 | ||
84 | bhi LD1 | ||
85 | |||
86 | #ifdef DEBUG | ||
87 | moveq #74, %d7 /* 'J' */ | ||
88 | moveb %d7,0xfffff907 /* No absolute addresses */ | ||
89 | pclp2: | ||
90 | movew 0xfffff906, %d7 | ||
91 | andw #0x2000, %d7 | ||
92 | beq pclp2 | ||
93 | #endif /* DEBUG */ | ||
94 | /* jump into the RAM copy */ | ||
95 | jmp ram_jump | ||
96 | ram_jump: | ||
97 | |||
98 | #endif /* CONFIG_RELOCATE */ | ||
99 | |||
100 | #ifdef DEBUG | ||
101 | moveq #82, %d7 /* 'R' */ | ||
102 | moveb %d7,0xfffff907 /* No absolute addresses */ | ||
103 | pclp3: | ||
104 | movew 0xfffff906, %d7 | ||
105 | andw #0x2000, %d7 | ||
106 | beq pclp3 | ||
107 | #endif /* DEBUG */ | ||
108 | moveal #0x007ffff0, %ssp | ||
109 | moveal #_sbss, %a0 | ||
110 | moveal #_ebss, %a1 | ||
111 | |||
112 | /* Copy 0 to %a0 until %a0 >= %a1 */ | ||
113 | L1: | ||
114 | movel #0, %a0@+ | ||
115 | cmpal %a0, %a1 | ||
116 | bhi L1 | ||
117 | |||
118 | #ifdef DEBUG | ||
119 | moveq #67, %d7 /* 'C' */ | ||
120 | jsr putc | ||
121 | #endif /* DEBUG */ | ||
122 | |||
123 | pea 0 | ||
124 | pea env | ||
125 | pea %sp@(4) | ||
126 | pea 0 | ||
127 | |||
128 | #ifdef DEBUG | ||
129 | moveq #70, %d7 /* 'F' */ | ||
130 | jsr putc | ||
131 | #endif /* DEBUG */ | ||
132 | |||
133 | lp: | ||
134 | jsr start_kernel | ||
135 | jmp lp | ||
136 | _exit: | ||
137 | |||
138 | jmp _exit | ||
139 | |||
140 | __main: | ||
141 | /* nothing */ | ||
142 | rts | ||
143 | |||
144 | #ifdef DEBUG | ||
145 | putc: | ||
146 | moveb %d7,0xfffff907 | ||
147 | pclp: | ||
148 | movew 0xfffff906, %d7 | ||
149 | andw #0x2000, %d7 | ||
150 | beq pclp | ||
151 | rts | ||
152 | #endif /* DEBUG */ | ||
153 | |||
154 | .data | ||
155 | |||
156 | /* | ||
157 | * Set up the usable of RAM stuff. Size of RAM is determined then | ||
158 | * an initial stack set up at the end. | ||
159 | */ | ||
160 | .align 4 | ||
161 | _ramvec: | ||
162 | .long 0 | ||
163 | _rambase: | ||
164 | .long 0 | ||
165 | _ramstart: | ||
166 | .long 0 | ||
167 | _ramend: | ||
168 | .long 0 | ||
169 | |||
170 | env: | ||
171 | .long 0 | ||