diff options
author | Jesper Nilsson <jespern@axis.com> | 2014-01-09 11:18:51 -0500 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2014-01-09 11:18:51 -0500 |
commit | e7672be573afa078e8d85d5ad0202b78bd6bd1fd (patch) | |
tree | 93db5a58bafc50fbd339464259a7f87259512a2d /arch/cris | |
parent | bb1d2a945344e2a5100f5c7f8bb6e3e4ae03a2ab (diff) |
Cleanup whitespace, remove old author tag
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/arch-v10/kernel/head.S | 124 |
1 files changed, 61 insertions, 63 deletions
diff --git a/arch/cris/arch-v10/kernel/head.S b/arch/cris/arch-v10/kernel/head.S index a1f2014b4e3b..137bf52a5596 100644 --- a/arch/cris/arch-v10/kernel/head.S +++ b/arch/cris/arch-v10/kernel/head.S | |||
@@ -1,12 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * Head of the kernel - alter with care | 2 | * Head of the kernel - alter with care |
3 | * | 3 | * |
4 | * Copyright (C) 2000, 2001 Axis Communications AB | 4 | * Copyright (C) 2000, 2001, 2010 Axis Communications AB |
5 | * | 5 | * |
6 | * Authors: Bjorn Wesen (bjornw@axis.com) | ||
7 | * | ||
8 | */ | 6 | */ |
9 | 7 | ||
10 | #define ASSEMBLER_MACROS_ONLY | 8 | #define ASSEMBLER_MACROS_ONLY |
11 | /* The IO_* macros use the ## token concatenation operator, so | 9 | /* The IO_* macros use the ## token concatenation operator, so |
12 | -traditional must not be used when assembling this file. */ | 10 | -traditional must not be used when assembling this file. */ |
@@ -18,15 +16,15 @@ | |||
18 | 16 | ||
19 | #define START_ETHERNET_CLOCK IO_STATE(R_NETWORK_GEN_CONFIG, enable, on) |\ | 17 | #define START_ETHERNET_CLOCK IO_STATE(R_NETWORK_GEN_CONFIG, enable, on) |\ |
20 | IO_STATE(R_NETWORK_GEN_CONFIG, phy, mii_clk) | 18 | IO_STATE(R_NETWORK_GEN_CONFIG, phy, mii_clk) |
21 | 19 | ||
22 | ;; exported symbols | 20 | ;; exported symbols |
23 | 21 | ||
24 | .globl etrax_irv | 22 | .globl etrax_irv |
25 | .globl romfs_start | 23 | .globl romfs_start |
26 | .globl romfs_length | 24 | .globl romfs_length |
27 | .globl romfs_in_flash | 25 | .globl romfs_in_flash |
28 | .globl swapper_pg_dir | 26 | .globl swapper_pg_dir |
29 | 27 | ||
30 | .text | 28 | .text |
31 | 29 | ||
32 | ;; This is the entry point of the kernel. We are in supervisor mode. | 30 | ;; This is the entry point of the kernel. We are in supervisor mode. |
@@ -35,10 +33,10 @@ | |||
35 | ;; put a nop (2 bytes) here first so we dont accidentally skip the di | 33 | ;; put a nop (2 bytes) here first so we dont accidentally skip the di |
36 | ;; | 34 | ;; |
37 | ;; NOTICE! The registers r8 and r9 are used as parameters carrying | 35 | ;; NOTICE! The registers r8 and r9 are used as parameters carrying |
38 | ;; information from the decompressor (if the kernel was compressed). | 36 | ;; information from the decompressor (if the kernel was compressed). |
39 | ;; They should not be used in the code below until read. | 37 | ;; They should not be used in the code below until read. |
40 | 38 | ||
41 | nop | 39 | nop |
42 | di | 40 | di |
43 | 41 | ||
44 | ;; First setup the kseg_c mapping from where the kernel is linked | 42 | ;; First setup the kseg_c mapping from where the kernel is linked |
@@ -58,19 +56,19 @@ | |||
58 | 56 | ||
59 | #ifdef CONFIG_CRIS_LOW_MAP | 57 | #ifdef CONFIG_CRIS_LOW_MAP |
60 | ; kseg mappings, temporary map of 0xc0->0x40 | 58 | ; kseg mappings, temporary map of 0xc0->0x40 |
61 | move.d IO_FIELD (R_MMU_KBASE_HI, base_c, 4) \ | 59 | move.d IO_FIELD (R_MMU_KBASE_HI, base_c, 4) \ |
62 | | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb) \ | 60 | | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb) \ |
63 | | IO_FIELD (R_MMU_KBASE_HI, base_9, 9) \ | 61 | | IO_FIELD (R_MMU_KBASE_HI, base_9, 9) \ |
64 | | IO_FIELD (R_MMU_KBASE_HI, base_8, 8), $r0 | 62 | | IO_FIELD (R_MMU_KBASE_HI, base_8, 8), $r0 |
65 | move.d $r0, [R_MMU_KBASE_HI] | 63 | move.d $r0, [R_MMU_KBASE_HI] |
66 | 64 | ||
67 | ; temporary map of 0x40->0x40 and 0x60->0x40 | 65 | ; temporary map of 0x40->0x40 and 0x60->0x40 |
68 | move.d IO_FIELD (R_MMU_KBASE_LO, base_6, 4) \ | 66 | move.d IO_FIELD (R_MMU_KBASE_LO, base_6, 4) \ |
69 | | IO_FIELD (R_MMU_KBASE_LO, base_4, 4), $r0 | 67 | | IO_FIELD (R_MMU_KBASE_LO, base_4, 4), $r0 |
70 | move.d $r0, [R_MMU_KBASE_LO] | 68 | move.d $r0, [R_MMU_KBASE_LO] |
71 | 69 | ||
72 | ; mmu enable, segs e,c,b,a,6,5,4,0 segment mapped | 70 | ; mmu enable, segs e,c,b,a,6,5,4,0 segment mapped |
73 | move.d IO_STATE (R_MMU_CONFIG, mmu_enable, enable) \ | 71 | move.d IO_STATE (R_MMU_CONFIG, mmu_enable, enable) \ |
74 | | IO_STATE (R_MMU_CONFIG, inv_excp, enable) \ | 72 | | IO_STATE (R_MMU_CONFIG, inv_excp, enable) \ |
75 | | IO_STATE (R_MMU_CONFIG, acc_excp, enable) \ | 73 | | IO_STATE (R_MMU_CONFIG, acc_excp, enable) \ |
76 | | IO_STATE (R_MMU_CONFIG, we_excp, enable) \ | 74 | | IO_STATE (R_MMU_CONFIG, we_excp, enable) \ |
@@ -93,17 +91,17 @@ | |||
93 | move.d $r0, [R_MMU_CONFIG] | 91 | move.d $r0, [R_MMU_CONFIG] |
94 | #else | 92 | #else |
95 | ; kseg mappings | 93 | ; kseg mappings |
96 | move.d IO_FIELD (R_MMU_KBASE_HI, base_e, 8) \ | 94 | move.d IO_FIELD (R_MMU_KBASE_HI, base_e, 8) \ |
97 | | IO_FIELD (R_MMU_KBASE_HI, base_c, 4) \ | 95 | | IO_FIELD (R_MMU_KBASE_HI, base_c, 4) \ |
98 | | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb), $r0 | 96 | | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb), $r0 |
99 | move.d $r0, [R_MMU_KBASE_HI] | 97 | move.d $r0, [R_MMU_KBASE_HI] |
100 | 98 | ||
101 | ; temporary map of 0x40->0x40 and 0x00->0x00 | 99 | ; temporary map of 0x40->0x40 and 0x00->0x00 |
102 | move.d IO_FIELD (R_MMU_KBASE_LO, base_4, 4), $r0 | 100 | move.d IO_FIELD (R_MMU_KBASE_LO, base_4, 4), $r0 |
103 | move.d $r0, [R_MMU_KBASE_LO] | 101 | move.d $r0, [R_MMU_KBASE_LO] |
104 | 102 | ||
105 | ; mmu enable, segs f,e,c,b,4,0 segment mapped | 103 | ; mmu enable, segs f,e,c,b,4,0 segment mapped |
106 | move.d IO_STATE (R_MMU_CONFIG, mmu_enable, enable) \ | 104 | move.d IO_STATE (R_MMU_CONFIG, mmu_enable, enable) \ |
107 | | IO_STATE (R_MMU_CONFIG, inv_excp, enable) \ | 105 | | IO_STATE (R_MMU_CONFIG, inv_excp, enable) \ |
108 | | IO_STATE (R_MMU_CONFIG, acc_excp, enable) \ | 106 | | IO_STATE (R_MMU_CONFIG, acc_excp, enable) \ |
109 | | IO_STATE (R_MMU_CONFIG, we_excp, enable) \ | 107 | | IO_STATE (R_MMU_CONFIG, we_excp, enable) \ |
@@ -141,12 +139,12 @@ | |||
141 | ;; | 139 | ;; |
142 | ;; In both cases, we start in un-cached mode, and need to jump into a | 140 | ;; In both cases, we start in un-cached mode, and need to jump into a |
143 | ;; cached PC after we're done fiddling around with the segments. | 141 | ;; cached PC after we're done fiddling around with the segments. |
144 | ;; | 142 | ;; |
145 | ;; arch/etrax100/etrax100.ld sets some symbols that define the start | 143 | ;; arch/etrax100/etrax100.ld sets some symbols that define the start |
146 | ;; and end of each segment. | 144 | ;; and end of each segment. |
147 | 145 | ||
148 | ;; Check if we start from DRAM or FLASH by testing PC | 146 | ;; Check if we start from DRAM or FLASH by testing PC |
149 | 147 | ||
150 | move.d $pc,$r0 | 148 | move.d $pc,$r0 |
151 | and.d 0x7fffffff,$r0 ; get rid of the non-cache bit | 149 | and.d 0x7fffffff,$r0 ; get rid of the non-cache bit |
152 | cmp.d 0x10000,$r0 ; arbitrary... just something above this code | 150 | cmp.d 0x10000,$r0 ; arbitrary... just something above this code |
@@ -163,7 +161,7 @@ _inflash0: | |||
163 | ;; after init. | 161 | ;; after init. |
164 | .section ".init.text", "ax" | 162 | .section ".init.text", "ax" |
165 | _inflash: | 163 | _inflash: |
166 | #ifdef CONFIG_ETRAX_ETHERNET | 164 | #ifdef CONFIG_ETRAX_ETHERNET |
167 | ;; Start MII clock to make sure it is running when tranceiver is reset | 165 | ;; Start MII clock to make sure it is running when tranceiver is reset |
168 | move.d START_ETHERNET_CLOCK, $r0 | 166 | move.d START_ETHERNET_CLOCK, $r0 |
169 | move.d $r0, [R_NETWORK_GEN_CONFIG] | 167 | move.d $r0, [R_NETWORK_GEN_CONFIG] |
@@ -183,10 +181,10 @@ _inflash: | |||
183 | cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized? | 181 | cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized? |
184 | beq _dram_init_finished | 182 | beq _dram_init_finished |
185 | nop | 183 | nop |
186 | 184 | ||
187 | #include "../lib/dram_init.S" | 185 | #include "../lib/dram_init.S" |
188 | 186 | ||
189 | _dram_init_finished: | 187 | _dram_init_finished: |
190 | ;; Copy text+data to DRAM | 188 | ;; Copy text+data to DRAM |
191 | ;; This is fragile - the calculation of r4 as the image size depends | 189 | ;; This is fragile - the calculation of r4 as the image size depends |
192 | ;; on that the labels below actually are the first and last positions | 190 | ;; on that the labels below actually are the first and last positions |
@@ -198,7 +196,7 @@ _dram_init_finished: | |||
198 | ;; between the physical start of the flash and the flash-image start, | 196 | ;; between the physical start of the flash and the flash-image start, |
199 | ;; and when run with compression, the kernel is actually unpacked to | 197 | ;; and when run with compression, the kernel is actually unpacked to |
200 | ;; DRAM and we never get here in the first place :)) | 198 | ;; DRAM and we never get here in the first place :)) |
201 | 199 | ||
202 | moveq 0, $r0 ; source | 200 | moveq 0, $r0 ; source |
203 | move.d text_start, $r1 ; destination | 201 | move.d text_start, $r1 ; destination |
204 | move.d __vmlinux_end, $r2 ; end destination | 202 | move.d __vmlinux_end, $r2 ; end destination |
@@ -229,10 +227,10 @@ _dram_init_finished: | |||
229 | add.d 0xf0000000, $r4 ; add flash start in virtual memory (cached) | 227 | add.d 0xf0000000, $r4 ; add flash start in virtual memory (cached) |
230 | #endif | 228 | #endif |
231 | move.d $r4, [romfs_start] | 229 | move.d $r4, [romfs_start] |
232 | 1: | 230 | 1: |
233 | moveq 1, $r0 | 231 | moveq 1, $r0 |
234 | move.d $r0, [romfs_in_flash] | 232 | move.d $r0, [romfs_in_flash] |
235 | 233 | ||
236 | jump _start_it ; enter code, cached this time | 234 | jump _start_it ; enter code, cached this time |
237 | 235 | ||
238 | _inram: | 236 | _inram: |
@@ -241,7 +239,7 @@ _inram: | |||
241 | 239 | ||
242 | moveq 0, $r0 | 240 | moveq 0, $r0 |
243 | move.d $r0, [romfs_length] ; default if there is no cramfs | 241 | move.d $r0, [romfs_length] ; default if there is no cramfs |
244 | 242 | ||
245 | ;; The kernel could have been unpacked to DRAM by the loader, but | 243 | ;; The kernel could have been unpacked to DRAM by the loader, but |
246 | ;; the cramfs image could still be in the Flash directly after the | 244 | ;; the cramfs image could still be in the Flash directly after the |
247 | ;; compressed kernel image. The loader passes the address of the | 245 | ;; compressed kernel image. The loader passes the address of the |
@@ -251,7 +249,7 @@ _inram: | |||
251 | ;; (Notice that if this is not booted from the loader, r9 will be | 249 | ;; (Notice that if this is not booted from the loader, r9 will be |
252 | ;; garbage but we do sanity checks on it, the chance that it points | 250 | ;; garbage but we do sanity checks on it, the chance that it points |
253 | ;; to a cramfs magic is small.. ) | 251 | ;; to a cramfs magic is small.. ) |
254 | 252 | ||
255 | cmp.d 0x0ffffff8, $r9 | 253 | cmp.d 0x0ffffff8, $r9 |
256 | bhs _no_romfs_in_flash ; r9 points outside the flash area | 254 | bhs _no_romfs_in_flash ; r9 points outside the flash area |
257 | nop | 255 | nop |
@@ -274,7 +272,7 @@ _inram: | |||
274 | jump _start_it ; enter code, cached this time | 272 | jump _start_it ; enter code, cached this time |
275 | 273 | ||
276 | _no_romfs_in_flash: | 274 | _no_romfs_in_flash: |
277 | 275 | ||
278 | ;; Check if there is a cramfs (magic value). | 276 | ;; Check if there is a cramfs (magic value). |
279 | ;; Notice that we check for cramfs magic value - which is | 277 | ;; Notice that we check for cramfs magic value - which is |
280 | ;; the "rom fs" we'll possibly use in 2.4 if not JFFS (which does | 278 | ;; the "rom fs" we'll possibly use in 2.4 if not JFFS (which does |
@@ -286,8 +284,8 @@ _no_romfs_in_flash: | |||
286 | bne 2f | 284 | bne 2f |
287 | nop | 285 | nop |
288 | 286 | ||
289 | ;; Ok. What is its size ? | 287 | ;; Ok. What is its size ? |
290 | 288 | ||
291 | move.d [$r0 + 4], $r2 ; cramfs_super.size (again, no need to swapwb) | 289 | move.d [$r0 + 4], $r2 ; cramfs_super.size (again, no need to swapwb) |
292 | 290 | ||
293 | ;; We want to copy it to the end of the BSS | 291 | ;; We want to copy it to the end of the BSS |
@@ -303,7 +301,7 @@ _no_romfs_in_flash: | |||
303 | 301 | ||
304 | add.d $r2, $r0 | 302 | add.d $r2, $r0 |
305 | add.d $r2, $r1 | 303 | add.d $r2, $r1 |
306 | 304 | ||
307 | ;; Go ahead. Make my loop. | 305 | ;; Go ahead. Make my loop. |
308 | 306 | ||
309 | lsrq 1, $r2 ; size is in bytes, we copy words | 307 | lsrq 1, $r2 ; size is in bytes, we copy words |
@@ -314,14 +312,14 @@ _no_romfs_in_flash: | |||
314 | bne 1b | 312 | bne 1b |
315 | nop | 313 | nop |
316 | 314 | ||
317 | 2: | 315 | 2: |
318 | ;; Dont worry that the BSS is tainted. It will be cleared later. | 316 | ;; Dont worry that the BSS is tainted. It will be cleared later. |
319 | 317 | ||
320 | moveq 0, $r0 | 318 | moveq 0, $r0 |
321 | move.d $r0, [romfs_in_flash] | 319 | move.d $r0, [romfs_in_flash] |
322 | 320 | ||
323 | jump _start_it ; better skip the additional cramfs check below | 321 | jump _start_it ; better skip the additional cramfs check below |
324 | 322 | ||
325 | _start_it: | 323 | _start_it: |
326 | 324 | ||
327 | ;; Check if kernel command line is supplied | 325 | ;; Check if kernel command line is supplied |
@@ -348,7 +346,7 @@ no_command_line: | |||
348 | move.d ibr_start,$r0 ; this symbol is set by the linker script | 346 | move.d ibr_start,$r0 ; this symbol is set by the linker script |
349 | move $r0,$ibr | 347 | move $r0,$ibr |
350 | move.d $r0,[etrax_irv] ; set the interrupt base register and pointer | 348 | move.d $r0,[etrax_irv] ; set the interrupt base register and pointer |
351 | 349 | ||
352 | ;; Clear BSS region, from _bss_start to _end | 350 | ;; Clear BSS region, from _bss_start to _end |
353 | 351 | ||
354 | move.d __bss_start, $r0 | 352 | move.d __bss_start, $r0 |
@@ -357,7 +355,7 @@ no_command_line: | |||
357 | cmp.d $r1, $r0 | 355 | cmp.d $r1, $r0 |
358 | blo 1b | 356 | blo 1b |
359 | nop | 357 | nop |
360 | 358 | ||
361 | #ifdef CONFIG_BLK_DEV_ETRAXIDE | 359 | #ifdef CONFIG_BLK_DEV_ETRAXIDE |
362 | ;; disable ATA before enabling it in genconfig below | 360 | ;; disable ATA before enabling it in genconfig below |
363 | moveq 0,$r0 | 361 | moveq 0,$r0 |
@@ -380,7 +378,7 @@ no_command_line: | |||
380 | 378 | ||
381 | #ifdef CONFIG_JULIETTE | 379 | #ifdef CONFIG_JULIETTE |
382 | ;; configure external DMA channel 0 before enabling it in genconfig | 380 | ;; configure external DMA channel 0 before enabling it in genconfig |
383 | 381 | ||
384 | moveq 0,$r0 | 382 | moveq 0,$r0 |
385 | move.d $r0,[R_EXT_DMA_0_ADDR] | 383 | move.d $r0,[R_EXT_DMA_0_ADDR] |
386 | ; cnt enable, word size, output, stop, size 0 | 384 | ; cnt enable, word size, output, stop, size 0 |
@@ -395,7 +393,7 @@ no_command_line: | |||
395 | move.d $r0,[R_EXT_DMA_0_CMD] | 393 | move.d $r0,[R_EXT_DMA_0_CMD] |
396 | 394 | ||
397 | ;; reset dma4 and wait for completion | 395 | ;; reset dma4 and wait for completion |
398 | 396 | ||
399 | moveq IO_STATE (R_DMA_CH4_CMD, cmd, reset),$r0 | 397 | moveq IO_STATE (R_DMA_CH4_CMD, cmd, reset),$r0 |
400 | move.b $r0,[R_DMA_CH4_CMD] | 398 | move.b $r0,[R_DMA_CH4_CMD] |
401 | 1: move.b [R_DMA_CH4_CMD],$r0 | 399 | 1: move.b [R_DMA_CH4_CMD],$r0 |
@@ -405,7 +403,7 @@ no_command_line: | |||
405 | nop | 403 | nop |
406 | 404 | ||
407 | ;; reset dma5 and wait for completion | 405 | ;; reset dma5 and wait for completion |
408 | 406 | ||
409 | moveq IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0 | 407 | moveq IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0 |
410 | move.b $r0,[R_DMA_CH5_CMD] | 408 | move.b $r0,[R_DMA_CH5_CMD] |
411 | 1: move.b [R_DMA_CH5_CMD],$r0 | 409 | 1: move.b [R_DMA_CH5_CMD],$r0 |
@@ -413,8 +411,8 @@ no_command_line: | |||
413 | cmp.b IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0 | 411 | cmp.b IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0 |
414 | beq 1b | 412 | beq 1b |
415 | nop | 413 | nop |
416 | #endif | 414 | #endif |
417 | 415 | ||
418 | ;; Etrax product HW genconfig setup | 416 | ;; Etrax product HW genconfig setup |
419 | 417 | ||
420 | moveq 0,$r0 | 418 | moveq 0,$r0 |
@@ -486,7 +484,7 @@ no_command_line: | |||
486 | beq 1b | 484 | beq 1b |
487 | nop | 485 | nop |
488 | #endif | 486 | #endif |
489 | 487 | ||
490 | moveq IO_STATE (R_DMA_CH8_CMD, cmd, reset),$r0 | 488 | moveq IO_STATE (R_DMA_CH8_CMD, cmd, reset),$r0 |
491 | move.b $r0,[R_DMA_CH8_CMD] ; reset (ser1 dma out) | 489 | move.b $r0,[R_DMA_CH8_CMD] ; reset (ser1 dma out) |
492 | move.b $r0,[R_DMA_CH9_CMD] ; reset (ser1 dma in) | 490 | move.b $r0,[R_DMA_CH9_CMD] ; reset (ser1 dma in) |
@@ -503,7 +501,7 @@ no_command_line: | |||
503 | 501 | ||
504 | ;; setup port PA and PB default initial directions and data | 502 | ;; setup port PA and PB default initial directions and data |
505 | ;; including their shadow registers | 503 | ;; including their shadow registers |
506 | 504 | ||
507 | move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR,$r0 | 505 | move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR,$r0 |
508 | #if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_PA7) | 506 | #if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_PA7) |
509 | or.b IO_STATE (R_PORT_PA_DIR, dir7, output),$r0 | 507 | or.b IO_STATE (R_PORT_PA_DIR, dir7, output),$r0 |
@@ -520,7 +518,7 @@ no_command_line: | |||
520 | #endif | 518 | #endif |
521 | move.b $r0,[port_pa_data_shadow] | 519 | move.b $r0,[port_pa_data_shadow] |
522 | move.b $r0,[R_PORT_PA_DATA] | 520 | move.b $r0,[R_PORT_PA_DATA] |
523 | 521 | ||
524 | move.b CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG,$r0 | 522 | move.b CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG,$r0 |
525 | move.b $r0,[port_pb_config_shadow] | 523 | move.b $r0,[port_pb_config_shadow] |
526 | move.b $r0,[R_PORT_PB_CONFIG] | 524 | move.b $r0,[R_PORT_PB_CONFIG] |
@@ -562,13 +560,13 @@ no_command_line: | |||
562 | #endif | 560 | #endif |
563 | move.d $r0,[port_g_data_shadow] | 561 | move.d $r0,[port_g_data_shadow] |
564 | move.d $r0,[R_PORT_G_DATA] | 562 | move.d $r0,[R_PORT_G_DATA] |
565 | 563 | ||
566 | ;; setup the serial port 0 at 115200 baud for debug purposes | 564 | ;; setup the serial port 0 at 115200 baud for debug purposes |
567 | 565 | ||
568 | moveq IO_STATE (R_SERIAL0_XOFF, tx_stop, enable) \ | 566 | moveq IO_STATE (R_SERIAL0_XOFF, tx_stop, enable) \ |
569 | | IO_STATE (R_SERIAL0_XOFF, auto_xoff, disable) \ | 567 | | IO_STATE (R_SERIAL0_XOFF, auto_xoff, disable) \ |
570 | | IO_FIELD (R_SERIAL0_XOFF, xoff_char, 0),$r0 | 568 | | IO_FIELD (R_SERIAL0_XOFF, xoff_char, 0),$r0 |
571 | move.d $r0,[R_SERIAL0_XOFF] | 569 | move.d $r0,[R_SERIAL0_XOFF] |
572 | 570 | ||
573 | ; 115.2kbaud for both transmit and receive | 571 | ; 115.2kbaud for both transmit and receive |
574 | move.b IO_STATE (R_SERIAL0_BAUD, tr_baud, c115k2Hz) \ | 572 | move.b IO_STATE (R_SERIAL0_BAUD, tr_baud, c115k2Hz) \ |
@@ -584,8 +582,8 @@ no_command_line: | |||
584 | | IO_STATE (R_SERIAL0_REC_CTRL, rec_par, even) \ | 582 | | IO_STATE (R_SERIAL0_REC_CTRL, rec_par, even) \ |
585 | | IO_STATE (R_SERIAL0_REC_CTRL, rec_par_en, disable) \ | 583 | | IO_STATE (R_SERIAL0_REC_CTRL, rec_par_en, disable) \ |
586 | | IO_STATE (R_SERIAL0_REC_CTRL, rec_bitnr, rec_8bit),$r0 | 584 | | IO_STATE (R_SERIAL0_REC_CTRL, rec_bitnr, rec_8bit),$r0 |
587 | move.b $r0,[R_SERIAL0_REC_CTRL] | 585 | move.b $r0,[R_SERIAL0_REC_CTRL] |
588 | 586 | ||
589 | ; Set up and enable the serial0 transmitter. | 587 | ; Set up and enable the serial0 transmitter. |
590 | move.b IO_FIELD (R_SERIAL0_TR_CTRL, txd, 0) \ | 588 | move.b IO_FIELD (R_SERIAL0_TR_CTRL, txd, 0) \ |
591 | | IO_STATE (R_SERIAL0_TR_CTRL, tr_enable, enable) \ | 589 | | IO_STATE (R_SERIAL0_TR_CTRL, tr_enable, enable) \ |
@@ -598,11 +596,11 @@ no_command_line: | |||
598 | move.b $r0,[R_SERIAL0_TR_CTRL] | 596 | move.b $r0,[R_SERIAL0_TR_CTRL] |
599 | 597 | ||
600 | ;; setup the serial port 1 at 115200 baud for debug purposes | 598 | ;; setup the serial port 1 at 115200 baud for debug purposes |
601 | 599 | ||
602 | moveq IO_STATE (R_SERIAL1_XOFF, tx_stop, enable) \ | 600 | moveq IO_STATE (R_SERIAL1_XOFF, tx_stop, enable) \ |
603 | | IO_STATE (R_SERIAL1_XOFF, auto_xoff, disable) \ | 601 | | IO_STATE (R_SERIAL1_XOFF, auto_xoff, disable) \ |
604 | | IO_FIELD (R_SERIAL1_XOFF, xoff_char, 0),$r0 | 602 | | IO_FIELD (R_SERIAL1_XOFF, xoff_char, 0),$r0 |
605 | move.d $r0,[R_SERIAL1_XOFF] | 603 | move.d $r0,[R_SERIAL1_XOFF] |
606 | 604 | ||
607 | ; 115.2kbaud for both transmit and receive | 605 | ; 115.2kbaud for both transmit and receive |
608 | move.b IO_STATE (R_SERIAL1_BAUD, tr_baud, c115k2Hz) \ | 606 | move.b IO_STATE (R_SERIAL1_BAUD, tr_baud, c115k2Hz) \ |
@@ -618,8 +616,8 @@ no_command_line: | |||
618 | | IO_STATE (R_SERIAL1_REC_CTRL, rec_par, even) \ | 616 | | IO_STATE (R_SERIAL1_REC_CTRL, rec_par, even) \ |
619 | | IO_STATE (R_SERIAL1_REC_CTRL, rec_par_en, disable) \ | 617 | | IO_STATE (R_SERIAL1_REC_CTRL, rec_par_en, disable) \ |
620 | | IO_STATE (R_SERIAL1_REC_CTRL, rec_bitnr, rec_8bit),$r0 | 618 | | IO_STATE (R_SERIAL1_REC_CTRL, rec_bitnr, rec_8bit),$r0 |
621 | move.b $r0,[R_SERIAL1_REC_CTRL] | 619 | move.b $r0,[R_SERIAL1_REC_CTRL] |
622 | 620 | ||
623 | ; Set up and enable the serial1 transmitter. | 621 | ; Set up and enable the serial1 transmitter. |
624 | move.b IO_FIELD (R_SERIAL1_TR_CTRL, txd, 0) \ | 622 | move.b IO_FIELD (R_SERIAL1_TR_CTRL, txd, 0) \ |
625 | | IO_STATE (R_SERIAL1_TR_CTRL, tr_enable, enable) \ | 623 | | IO_STATE (R_SERIAL1_TR_CTRL, tr_enable, enable) \ |
@@ -666,14 +664,14 @@ no_command_line: | |||
666 | | IO_STATE (R_SERIAL2_TR_CTRL, tr_bitnr, tr_8bit),$r0 | 664 | | IO_STATE (R_SERIAL2_TR_CTRL, tr_bitnr, tr_8bit),$r0 |
667 | move.b $r0,[R_SERIAL2_TR_CTRL] | 665 | move.b $r0,[R_SERIAL2_TR_CTRL] |
668 | #endif | 666 | #endif |
669 | 667 | ||
670 | #ifdef CONFIG_ETRAX_SERIAL_PORT3 | 668 | #ifdef CONFIG_ETRAX_SERIAL_PORT3 |
671 | ;; setup the serial port 3 at 115200 baud for debug purposes | 669 | ;; setup the serial port 3 at 115200 baud for debug purposes |
672 | 670 | ||
673 | moveq IO_STATE (R_SERIAL3_XOFF, tx_stop, enable) \ | 671 | moveq IO_STATE (R_SERIAL3_XOFF, tx_stop, enable) \ |
674 | | IO_STATE (R_SERIAL3_XOFF, auto_xoff, disable) \ | 672 | | IO_STATE (R_SERIAL3_XOFF, auto_xoff, disable) \ |
675 | | IO_FIELD (R_SERIAL3_XOFF, xoff_char, 0),$r0 | 673 | | IO_FIELD (R_SERIAL3_XOFF, xoff_char, 0),$r0 |
676 | move.d $r0,[R_SERIAL3_XOFF] | 674 | move.d $r0,[R_SERIAL3_XOFF] |
677 | 675 | ||
678 | ; 115.2kbaud for both transmit and receive | 676 | ; 115.2kbaud for both transmit and receive |
679 | move.b IO_STATE (R_SERIAL3_BAUD, tr_baud, c115k2Hz) \ | 677 | move.b IO_STATE (R_SERIAL3_BAUD, tr_baud, c115k2Hz) \ |
@@ -689,8 +687,8 @@ no_command_line: | |||
689 | | IO_STATE (R_SERIAL3_REC_CTRL, rec_par, even) \ | 687 | | IO_STATE (R_SERIAL3_REC_CTRL, rec_par, even) \ |
690 | | IO_STATE (R_SERIAL3_REC_CTRL, rec_par_en, disable) \ | 688 | | IO_STATE (R_SERIAL3_REC_CTRL, rec_par_en, disable) \ |
691 | | IO_STATE (R_SERIAL3_REC_CTRL, rec_bitnr, rec_8bit),$r0 | 689 | | IO_STATE (R_SERIAL3_REC_CTRL, rec_bitnr, rec_8bit),$r0 |
692 | move.b $r0,[R_SERIAL3_REC_CTRL] | 690 | move.b $r0,[R_SERIAL3_REC_CTRL] |
693 | 691 | ||
694 | ; Set up and enable the serial3 transmitter. | 692 | ; Set up and enable the serial3 transmitter. |
695 | move.b IO_FIELD (R_SERIAL3_TR_CTRL, txd, 0) \ | 693 | move.b IO_FIELD (R_SERIAL3_TR_CTRL, txd, 0) \ |
696 | | IO_STATE (R_SERIAL3_TR_CTRL, tr_enable, enable) \ | 694 | | IO_STATE (R_SERIAL3_TR_CTRL, tr_enable, enable) \ |
@@ -702,13 +700,13 @@ no_command_line: | |||
702 | | IO_STATE (R_SERIAL3_TR_CTRL, tr_bitnr, tr_8bit),$r0 | 700 | | IO_STATE (R_SERIAL3_TR_CTRL, tr_bitnr, tr_8bit),$r0 |
703 | move.b $r0,[R_SERIAL3_TR_CTRL] | 701 | move.b $r0,[R_SERIAL3_TR_CTRL] |
704 | #endif | 702 | #endif |
705 | 703 | ||
706 | #endif /* CONFIG_SVINTO_SIM */ | 704 | #endif /* CONFIG_SVINTO_SIM */ |
707 | 705 | ||
708 | jump start_kernel ; jump into the C-function start_kernel in init/main.c | 706 | jump start_kernel ; jump into the C-function start_kernel in init/main.c |
709 | 707 | ||
710 | .data | 708 | .data |
711 | etrax_irv: | 709 | etrax_irv: |
712 | .dword 0 | 710 | .dword 0 |
713 | romfs_start: | 711 | romfs_start: |
714 | .dword 0 | 712 | .dword 0 |
@@ -716,13 +714,13 @@ romfs_length: | |||
716 | .dword 0 | 714 | .dword 0 |
717 | romfs_in_flash: | 715 | romfs_in_flash: |
718 | .dword 0 | 716 | .dword 0 |
719 | 717 | ||
720 | ;; put some special pages at the beginning of the kernel aligned | 718 | ;; put some special pages at the beginning of the kernel aligned |
721 | ;; to page boundaries - the kernel cannot start until after this | 719 | ;; to page boundaries - the kernel cannot start until after this |
722 | 720 | ||
723 | #ifdef CONFIG_CRIS_LOW_MAP | 721 | #ifdef CONFIG_CRIS_LOW_MAP |
724 | swapper_pg_dir = 0x60002000 | 722 | swapper_pg_dir = 0x60002000 |
725 | #else | 723 | #else |
726 | swapper_pg_dir = 0xc0002000 | 724 | swapper_pg_dir = 0xc0002000 |
727 | #endif | 725 | #endif |
728 | 726 | ||