aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-17 05:30:21 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:29 -0500
commitef8028a7ab1014b174c1ff9f565e387bd2a9a436 (patch)
treeff65529d65570c37ee037217d47d1a4d85c057bb
parent546cc14862c8712341823c9235268062bac87b74 (diff)
CRIS v10: Correct and cleanup boot/rescue/kimagerescue.S
- Correct include path for sv_addr_ag.h, should be included from asm/arch/ - Remove useless CVS id tag. - Correct whitespace errors and some formatting.
-rw-r--r--arch/cris/arch-v10/boot/rescue/kimagerescue.S58
1 files changed, 29 insertions, 29 deletions
diff --git a/arch/cris/arch-v10/boot/rescue/kimagerescue.S b/arch/cris/arch-v10/boot/rescue/kimagerescue.S
index cbccd6316d39..55eeff8bb08e 100644
--- a/arch/cris/arch-v10/boot/rescue/kimagerescue.S
+++ b/arch/cris/arch-v10/boot/rescue/kimagerescue.S
@@ -1,5 +1,4 @@
1/* $Id: kimagerescue.S,v 1.1 2001/12/17 13:59:27 bjornw Exp $ 1/*
2 *
3 * Rescue code to be prepended on a kimage and copied to the 2 * Rescue code to be prepended on a kimage and copied to the
4 * rescue serial port. 3 * rescue serial port.
5 * This is called from the rescue code, it will copy received data to 4 * This is called from the rescue code, it will copy received data to
@@ -7,13 +6,13 @@
7 */ 6 */
8 7
9#define ASSEMBLER_MACROS_ONLY 8#define ASSEMBLER_MACROS_ONLY
10#include <asm/sv_addr_ag.h> 9#include <asm/arch/sv_addr_ag.h>
11 10
12#define CODE_START 0x40004000 11#define CODE_START 0x40004000
13#define CODE_LENGTH 784 12#define CODE_LENGTH 784
14#define TIMEOUT_VALUE 1000 13#define TIMEOUT_VALUE 1000
15 14
16 15
17#ifdef CONFIG_ETRAX_RESCUE_SER0 16#ifdef CONFIG_ETRAX_RESCUE_SER0
18#define SERXOFF R_SERIAL0_XOFF 17#define SERXOFF R_SERIAL0_XOFF
19#define SERBAUD R_SERIAL0_BAUD 18#define SERBAUD R_SERIAL0_BAUD
@@ -34,7 +33,7 @@
34#define SERRECC R_SERIAL2_REC_CTRL 33#define SERRECC R_SERIAL2_REC_CTRL
35#define SERRDAT R_SERIAL2_REC_DATA 34#define SERRDAT R_SERIAL2_REC_DATA
36#define SERSTAT R_SERIAL2_STATUS 35#define SERSTAT R_SERIAL2_STATUS
37#endif 36#endif
38#ifdef CONFIG_ETRAX_RESCUE_SER3 37#ifdef CONFIG_ETRAX_RESCUE_SER3
39#define SERXOFF R_SERIAL3_XOFF 38#define SERXOFF R_SERIAL3_XOFF
40#define SERBAUD R_SERIAL3_BAUD 39#define SERBAUD R_SERIAL3_BAUD
@@ -48,54 +47,55 @@
48 ;; 0x80000000 if loaded in flash (as it should be) 47 ;; 0x80000000 if loaded in flash (as it should be)
49 ;; since etrax actually starts at address 2 when booting from flash, we 48 ;; since etrax actually starts at address 2 when booting from flash, we
50 ;; put a nop (2 bytes) here first so we dont accidentally skip the di 49 ;; put a nop (2 bytes) here first so we dont accidentally skip the di
51 50
52 nop 51 nop
53 di 52 di
54#ifndef CONFIG_SVINTO_SIM 53#ifndef CONFIG_SVINTO_SIM
55 ;; setup port PA and PB default initial directions and data 54 ;; setup port PA and PB default initial directions and data
56 ;; (so we can flash LEDs, and so that DTR and others are set) 55 ;; (so we can flash LEDs, and so that DTR and others are set)
57 56
58 move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0 57 move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0
59 move.b $r0, [R_PORT_PA_DIR] 58 move.b $r0, [R_PORT_PA_DIR]
60 move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0 59 move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0
61 move.b $r0, [R_PORT_PA_DATA] 60 move.b $r0, [R_PORT_PA_DATA]
62 61
63 move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0 62 move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0
64 move.b $r0, [R_PORT_PB_DIR] 63 move.b $r0, [R_PORT_PB_DIR]
65 move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0 64 move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0
66 move.b $r0, [R_PORT_PB_DATA] 65 move.b $r0, [R_PORT_PB_DATA]
67 66
68 ;; We need to setup the bus registers before we start using the DRAM 67 ;; We need to setup the bus registers before we start using the DRAM
69#include "../../lib/dram_init.S" 68#include "../../lib/dram_init.S"
70 69
71#endif 70#endif
72 ;; Setup the stack to a suitably high address. 71 ;; Setup the stack to a suitably high address.
73 ;; We assume 8 MB is the minimum DRAM in an eLinux 72 ;; We assume 8 MB is the minimum DRAM in an eLinux
74 ;; product and put the sp at the top for now. 73 ;; product and put the sp at the top for now.
75 74
76 move.d 0x40800000, $sp 75 move.d 0x40800000, $sp
77 76
78 ;; setup the serial port at 115200 baud 77 ;; setup the serial port at 115200 baud
79 78
80 moveq 0, $r0 79 moveq 0, $r0
81 move.d $r0, [SERXOFF] 80 move.d $r0, [SERXOFF]
82 81
83 move.b 0x99, $r0 82 move.b 0x99, $r0
84 move.b $r0, [SERBAUD] ; 115.2kbaud for both transmit and receive 83 move.b $r0, [SERBAUD] ; 115.2kbaud for both transmit
84 ; and receive
85 85
86 move.b 0x40, $r0 ; rec enable 86 move.b 0x40, $r0 ; rec enable
87 move.b $r0, [SERRECC] 87 move.b $r0, [SERRECC]
88 88
89 89
90 moveq 0, $r1 ; "timer" to clock out a LED red flash 90 moveq 0, $r1 ; "timer" to clock out a LED red flash
91 move.d CODE_START, $r3 ; destination counter 91 move.d CODE_START, $r3 ; destination counter
92 move.d CODE_LENGTH, $r4 ; length 92 move.d CODE_LENGTH, $r4 ; length
93 move.d TIMEOUT_VALUE, $r5 ; "timeout" until jump 93 move.d TIMEOUT_VALUE, $r5 ; "timeout" until jump
94 94
95wait_ser: 95wait_ser:
96 addq 1, $r1 96 addq 1, $r1
97 subq 1, $r5 ; decrease timeout 97 subq 1, $r5 ; decrease timeout
98 beq jump_start ; timed out 98 beq jump_start ; timed out
99 nop 99 nop
100#ifndef CONFIG_ETRAX_NO_LEDS 100#ifndef CONFIG_ETRAX_NO_LEDS
101#ifdef CONFIG_ETRAX_PA_LEDS 101#ifdef CONFIG_ETRAX_PA_LEDS
@@ -111,21 +111,21 @@ wait_ser:
111 or.d $r0, $r2 ; set bit 111 or.d $r0, $r2 ; set bit
112 ba 2f 112 ba 2f
113 nop 113 nop
1141: not $r0 ; clear bit 1141: not $r0 ; clear bit
115 and.d $r0, $r2 115 and.d $r0, $r2
1162: 1162:
117#ifdef CONFIG_ETRAX_PA_LEDS 117#ifdef CONFIG_ETRAX_PA_LEDS
118 move.b $r2, [R_PORT_PA_DATA] 118 move.b $r2, [R_PORT_PA_DATA]
119#endif 119#endif
120#ifdef CONFIG_ETRAX_PB_LEDS 120#ifdef CONFIG_ETRAX_PB_LEDS
121 move.b $r2, [R_PORT_PB_DATA] 121 move.b $r2, [R_PORT_PB_DATA]
122#endif 122#endif
123#endif 123#endif
124 124
125 ;; check if we got something on the serial port 125 ;; check if we got something on the serial port
126 126
127 move.b [SERSTAT], $r0 127 move.b [SERSTAT], $r0
128 btstq 0, $r0 ; data_avail 128 btstq 0, $r0 ; data_avail
129 bpl wait_ser 129 bpl wait_ser
130 nop 130 nop
131 131
@@ -134,7 +134,7 @@ wait_ser:
134 move.b [SERRDAT], $r0 134 move.b [SERRDAT], $r0
135 move.b $r0, [$r3+] 135 move.b $r0, [$r3+]
136 move.d TIMEOUT_VALUE, $r5 ; reset "timeout" 136 move.d TIMEOUT_VALUE, $r5 ; reset "timeout"
137 subq 1, $r4 ; decrease length 137 subq 1, $r4 ; decrease length
138 bne wait_ser 138 bne wait_ser
139 nop 139 nop
140jump_start: 140jump_start: