diff options
Diffstat (limited to 'arch/arm/kernel/debug.S')
| -rw-r--r-- | arch/arm/kernel/debug.S | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index a38b4879441d..a0f07521ca8a 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
| @@ -22,11 +22,11 @@ | |||
| 22 | #if defined(CONFIG_DEBUG_ICEDCC) | 22 | #if defined(CONFIG_DEBUG_ICEDCC) |
| 23 | @@ debug using ARM EmbeddedICE DCC channel | 23 | @@ debug using ARM EmbeddedICE DCC channel |
| 24 | 24 | ||
| 25 | #if defined(CONFIG_CPU_V6) | 25 | .macro addruart, rp, rv |
| 26 | |||
| 27 | .macro addruart, rx, tmp | ||
| 28 | .endm | 26 | .endm |
| 29 | 27 | ||
| 28 | #if defined(CONFIG_CPU_V6) | ||
| 29 | |||
| 30 | .macro senduart, rd, rx | 30 | .macro senduart, rd, rx |
| 31 | mcr p14, 0, \rd, c0, c5, 0 | 31 | mcr p14, 0, \rd, c0, c5, 0 |
| 32 | .endm | 32 | .endm |
| @@ -51,9 +51,6 @@ | |||
| 51 | 51 | ||
| 52 | #elif defined(CONFIG_CPU_V7) | 52 | #elif defined(CONFIG_CPU_V7) |
| 53 | 53 | ||
| 54 | .macro addruart, rx, tmp | ||
| 55 | .endm | ||
| 56 | |||
| 57 | .macro senduart, rd, rx | 54 | .macro senduart, rd, rx |
| 58 | mcr p14, 0, \rd, c0, c5, 0 | 55 | mcr p14, 0, \rd, c0, c5, 0 |
| 59 | .endm | 56 | .endm |
| @@ -71,9 +68,6 @@ wait: mrc p14, 0, pc, c0, c1, 0 | |||
| 71 | 68 | ||
| 72 | #elif defined(CONFIG_CPU_XSCALE) | 69 | #elif defined(CONFIG_CPU_XSCALE) |
| 73 | 70 | ||
| 74 | .macro addruart, rx, tmp | ||
| 75 | .endm | ||
| 76 | |||
| 77 | .macro senduart, rd, rx | 71 | .macro senduart, rd, rx |
| 78 | mcr p14, 0, \rd, c8, c0, 0 | 72 | mcr p14, 0, \rd, c8, c0, 0 |
| 79 | .endm | 73 | .endm |
| @@ -98,9 +92,6 @@ wait: mrc p14, 0, pc, c0, c1, 0 | |||
| 98 | 92 | ||
| 99 | #else | 93 | #else |
| 100 | 94 | ||
| 101 | .macro addruart, rx, tmp | ||
| 102 | .endm | ||
| 103 | |||
| 104 | .macro senduart, rd, rx | 95 | .macro senduart, rd, rx |
| 105 | mcr p14, 0, \rd, c1, c0, 0 | 96 | mcr p14, 0, \rd, c1, c0, 0 |
| 106 | .endm | 97 | .endm |
| @@ -130,6 +121,22 @@ wait: mrc p14, 0, pc, c0, c1, 0 | |||
| 130 | #include <mach/debug-macro.S> | 121 | #include <mach/debug-macro.S> |
| 131 | #endif /* CONFIG_DEBUG_ICEDCC */ | 122 | #endif /* CONFIG_DEBUG_ICEDCC */ |
| 132 | 123 | ||
| 124 | #ifdef CONFIG_MMU | ||
| 125 | .macro addruart_current, rx, tmp1, tmp2 | ||
| 126 | addruart \tmp1, \tmp2 | ||
| 127 | mrc p15, 0, \rx, c1, c0 | ||
| 128 | tst \rx, #1 | ||
| 129 | moveq \rx, \tmp1 | ||
| 130 | movne \rx, \tmp2 | ||
| 131 | .endm | ||
| 132 | |||
| 133 | #else /* !CONFIG_MMU */ | ||
| 134 | .macro addruart_current, rx, tmp1, tmp2 | ||
| 135 | addruart \rx, \tmp1 | ||
| 136 | .endm | ||
| 137 | |||
| 138 | #endif /* CONFIG_MMU */ | ||
| 139 | |||
| 133 | /* | 140 | /* |
| 134 | * Useful debugging routines | 141 | * Useful debugging routines |
| 135 | */ | 142 | */ |
| @@ -164,7 +171,7 @@ ENDPROC(printhex2) | |||
| 164 | .ltorg | 171 | .ltorg |
| 165 | 172 | ||
| 166 | ENTRY(printascii) | 173 | ENTRY(printascii) |
| 167 | addruart r3, r1 | 174 | addruart_current r3, r1, r2 |
| 168 | b 2f | 175 | b 2f |
| 169 | 1: waituart r2, r3 | 176 | 1: waituart r2, r3 |
| 170 | senduart r1, r3 | 177 | senduart r1, r3 |
| @@ -180,7 +187,7 @@ ENTRY(printascii) | |||
| 180 | ENDPROC(printascii) | 187 | ENDPROC(printascii) |
| 181 | 188 | ||
| 182 | ENTRY(printch) | 189 | ENTRY(printch) |
| 183 | addruart r3, r1 | 190 | addruart_current r3, r1, r2 |
| 184 | mov r1, r0 | 191 | mov r1, r0 |
| 185 | mov r0, #0 | 192 | mov r0, #0 |
| 186 | b 1b | 193 | b 1b |
