diff options
Diffstat (limited to 'arch/blackfin/mach-bf548/head.S')
-rw-r--r-- | arch/blackfin/mach-bf548/head.S | 259 |
1 files changed, 0 insertions, 259 deletions
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S index 06b9178cfcfe..e3000f70a26e 100644 --- a/arch/blackfin/mach-bf548/head.S +++ b/arch/blackfin/mach-bf548/head.S | |||
@@ -30,263 +30,11 @@ | |||
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
33 | #include <asm/trace.h> | ||
34 | #ifdef CONFIG_BFIN_KERNEL_CLOCK | 33 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
35 | #include <asm/mach-common/clocks.h> | 34 | #include <asm/mach-common/clocks.h> |
36 | #include <asm/mach/mem_init.h> | 35 | #include <asm/mach/mem_init.h> |
37 | #endif | 36 | #endif |
38 | 37 | ||
39 | .extern ___bss_stop | ||
40 | .extern ___bss_start | ||
41 | .extern _bf53x_relocate_l1_mem | ||
42 | |||
43 | #define INITIAL_STACK 0xFFB01000 | ||
44 | |||
45 | __INIT | ||
46 | |||
47 | ENTRY(__start) | ||
48 | /* R0: argument of command line string, passed from uboot, save it */ | ||
49 | R7 = R0; | ||
50 | /* Enable Cycle Counter and Nesting Of Interrupts */ | ||
51 | #ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES | ||
52 | R0 = SYSCFG_SNEN; | ||
53 | #else | ||
54 | R0 = SYSCFG_SNEN | SYSCFG_CCEN; | ||
55 | #endif | ||
56 | SYSCFG = R0; | ||
57 | R0 = 0; | ||
58 | |||
59 | /* Clear Out All the data and pointer Registers*/ | ||
60 | R1 = R0; | ||
61 | R2 = R0; | ||
62 | R3 = R0; | ||
63 | R4 = R0; | ||
64 | R5 = R0; | ||
65 | R6 = R0; | ||
66 | |||
67 | P0 = R0; | ||
68 | P1 = R0; | ||
69 | P2 = R0; | ||
70 | P3 = R0; | ||
71 | P4 = R0; | ||
72 | P5 = R0; | ||
73 | |||
74 | LC0 = r0; | ||
75 | LC1 = r0; | ||
76 | L0 = r0; | ||
77 | L1 = r0; | ||
78 | L2 = r0; | ||
79 | L3 = r0; | ||
80 | |||
81 | /* Clear Out All the DAG Registers*/ | ||
82 | B0 = r0; | ||
83 | B1 = r0; | ||
84 | B2 = r0; | ||
85 | B3 = r0; | ||
86 | |||
87 | I0 = r0; | ||
88 | I1 = r0; | ||
89 | I2 = r0; | ||
90 | I3 = r0; | ||
91 | |||
92 | M0 = r0; | ||
93 | M1 = r0; | ||
94 | M2 = r0; | ||
95 | M3 = r0; | ||
96 | |||
97 | trace_buffer_init(p0,r0); | ||
98 | P0 = R1; | ||
99 | R0 = R1; | ||
100 | |||
101 | /* Turn off the icache */ | ||
102 | p0.l = LO(IMEM_CONTROL); | ||
103 | p0.h = HI(IMEM_CONTROL); | ||
104 | R1 = [p0]; | ||
105 | R0 = ~ENICPLB; | ||
106 | R0 = R0 & R1; | ||
107 | [p0] = R0; | ||
108 | SSYNC; | ||
109 | |||
110 | /* Turn off the dcache */ | ||
111 | p0.l = LO(DMEM_CONTROL); | ||
112 | p0.h = HI(DMEM_CONTROL); | ||
113 | R1 = [p0]; | ||
114 | R0 = ~ENDCPLB; | ||
115 | R0 = R0 & R1; | ||
116 | [p0] = R0; | ||
117 | SSYNC; | ||
118 | |||
119 | /* Initialize stack pointer */ | ||
120 | SP.L = LO(INITIAL_STACK); | ||
121 | SP.H = HI(INITIAL_STACK); | ||
122 | FP = SP; | ||
123 | USP = SP; | ||
124 | |||
125 | #ifdef CONFIG_EARLY_PRINTK | ||
126 | SP += -12; | ||
127 | call _init_early_exception_vectors; | ||
128 | SP += 12; | ||
129 | #endif | ||
130 | |||
131 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | ||
132 | call _bf53x_relocate_l1_mem; | ||
133 | #ifdef CONFIG_BFIN_KERNEL_CLOCK | ||
134 | call _start_dma_code; | ||
135 | #endif | ||
136 | /* Code for initializing Async memory banks */ | ||
137 | |||
138 | p2.h = hi(EBIU_AMBCTL1); | ||
139 | p2.l = lo(EBIU_AMBCTL1); | ||
140 | r0.h = hi(AMBCTL1VAL); | ||
141 | r0.l = lo(AMBCTL1VAL); | ||
142 | [p2] = r0; | ||
143 | ssync; | ||
144 | |||
145 | p2.h = hi(EBIU_AMBCTL0); | ||
146 | p2.l = lo(EBIU_AMBCTL0); | ||
147 | r0.h = hi(AMBCTL0VAL); | ||
148 | r0.l = lo(AMBCTL0VAL); | ||
149 | [p2] = r0; | ||
150 | ssync; | ||
151 | |||
152 | p2.h = hi(EBIU_AMGCTL); | ||
153 | p2.l = lo(EBIU_AMGCTL); | ||
154 | r0 = AMGCTLVAL; | ||
155 | w[p2] = r0; | ||
156 | ssync; | ||
157 | |||
158 | p2.h = hi(EBIU_MBSCTL); | ||
159 | p2.l = lo(EBIU_MBSCTL); | ||
160 | r0.h = hi(CONFIG_EBIU_MBSCTLVAL); | ||
161 | r0.l = lo(CONFIG_EBIU_MBSCTLVAL); | ||
162 | [p2] = r0; | ||
163 | ssync; | ||
164 | |||
165 | p2.h = hi(EBIU_MODE); | ||
166 | p2.l = lo(EBIU_MODE); | ||
167 | r0.h = hi(CONFIG_EBIU_MODEVAL); | ||
168 | r0.l = lo(CONFIG_EBIU_MODEVAL); | ||
169 | [p2] = r0; | ||
170 | ssync; | ||
171 | |||
172 | p2.h = hi(EBIU_FCTL); | ||
173 | p2.l = lo(EBIU_FCTL); | ||
174 | r0.h = hi(CONFIG_EBIU_FCTLVAL); | ||
175 | r0.l = lo(CONFIG_EBIU_FCTLVAL); | ||
176 | [p2] = r0; | ||
177 | ssync; | ||
178 | |||
179 | /* This section keeps the processor in supervisor mode | ||
180 | * during kernel boot. Switches to user mode at end of boot. | ||
181 | * See page 3-9 of Hardware Reference manual for documentation. | ||
182 | */ | ||
183 | |||
184 | /* EVT15 = _real_start */ | ||
185 | |||
186 | p0.l = lo(EVT15); | ||
187 | p0.h = hi(EVT15); | ||
188 | p1.l = _real_start; | ||
189 | p1.h = _real_start; | ||
190 | [p0] = p1; | ||
191 | csync; | ||
192 | |||
193 | p0.l = lo(IMASK); | ||
194 | p0.h = hi(IMASK); | ||
195 | p1.l = IMASK_IVG15; | ||
196 | p1.h = 0x0; | ||
197 | [p0] = p1; | ||
198 | csync; | ||
199 | |||
200 | raise 15; | ||
201 | p0.l = .LWAIT_HERE; | ||
202 | p0.h = .LWAIT_HERE; | ||
203 | reti = p0; | ||
204 | #if ANOMALY_05000281 | ||
205 | nop; | ||
206 | nop; | ||
207 | nop; | ||
208 | #endif | ||
209 | rti; | ||
210 | |||
211 | .LWAIT_HERE: | ||
212 | jump .LWAIT_HERE; | ||
213 | ENDPROC(__start) | ||
214 | |||
215 | ENTRY(_real_start) | ||
216 | [ -- sp ] = reti; | ||
217 | p0.l = lo(WDOG_CTL); | ||
218 | p0.h = hi(WDOG_CTL); | ||
219 | r0 = 0xAD6(z); | ||
220 | w[p0] = r0; /* watchdog off for now */ | ||
221 | ssync; | ||
222 | |||
223 | /* Code update for BSS size == 0 | ||
224 | * Zero out the bss region. | ||
225 | */ | ||
226 | |||
227 | p1.l = ___bss_start; | ||
228 | p1.h = ___bss_start; | ||
229 | p2.l = ___bss_stop; | ||
230 | p2.h = ___bss_stop; | ||
231 | r0 = 0; | ||
232 | p2 -= p1; | ||
233 | lsetup (.L_clear_bss, .L_clear_bss ) lc0 = p2; | ||
234 | .L_clear_bss: | ||
235 | B[p1++] = r0; | ||
236 | |||
237 | /* In case there is a NULL pointer reference | ||
238 | * Zero out region before stext | ||
239 | */ | ||
240 | |||
241 | p1.l = 0x0; | ||
242 | p1.h = 0x0; | ||
243 | r0.l = __stext; | ||
244 | r0.h = __stext; | ||
245 | r0 = r0 >> 1; | ||
246 | p2 = r0; | ||
247 | r0 = 0; | ||
248 | lsetup (.L_clear_zero, .L_clear_zero ) lc0 = p2; | ||
249 | .L_clear_zero: | ||
250 | W[p1++] = r0; | ||
251 | |||
252 | /* pass the uboot arguments to the global value command line */ | ||
253 | R0 = R7; | ||
254 | call _cmdline_init; | ||
255 | |||
256 | p1.l = __rambase; | ||
257 | p1.h = __rambase; | ||
258 | r0.l = __sdata; | ||
259 | r0.h = __sdata; | ||
260 | [p1] = r0; | ||
261 | |||
262 | p1.l = __ramstart; | ||
263 | p1.h = __ramstart; | ||
264 | p3.l = ___bss_stop; | ||
265 | p3.h = ___bss_stop; | ||
266 | |||
267 | r1 = p3; | ||
268 | [p1] = r1; | ||
269 | |||
270 | |||
271 | /* | ||
272 | * load the current thread pointer and stack | ||
273 | */ | ||
274 | r1.l = _init_thread_union; | ||
275 | r1.h = _init_thread_union; | ||
276 | |||
277 | r2.l = 0x2000; | ||
278 | r2.h = 0x0000; | ||
279 | r1 = r1 + r2; | ||
280 | sp = r1; | ||
281 | usp = sp; | ||
282 | fp = sp; | ||
283 | call _start_kernel; | ||
284 | .L_exit: | ||
285 | jump.s .L_exit; | ||
286 | ENDPROC(_real_start) | ||
287 | |||
288 | __FINIT | ||
289 | |||
290 | .section .l1.text | 38 | .section .l1.text |
291 | #ifdef CONFIG_BFIN_KERNEL_CLOCK | 39 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
292 | ENTRY(_start_dma_code) | 40 | ENTRY(_start_dma_code) |
@@ -443,13 +191,6 @@ ENTRY(_start_dma_code) | |||
443 | SSYNC; | 191 | SSYNC; |
444 | #endif | 192 | #endif |
445 | 193 | ||
446 | p0.h = hi(SIC_IWR0); | ||
447 | p0.l = lo(SIC_IWR0); | ||
448 | r0.l = lo(IWR_ENABLE_ALL); | ||
449 | r0.h = hi(IWR_ENABLE_ALL); | ||
450 | [p0] = r0; | ||
451 | SSYNC; | ||
452 | |||
453 | RTS; | 194 | RTS; |
454 | ENDPROC(_start_dma_code) | 195 | ENDPROC(_start_dma_code) |
455 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | 196 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ |