diff options
56 files changed, 440 insertions, 454 deletions
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index f91395206a4b..a0f07521ca8a 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
| @@ -22,7 +22,7 @@ | |||
| 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 | .macro addruart, rx, tmp | 25 | .macro addruart, rp, rv |
| 26 | .endm | 26 | .endm |
| 27 | 27 | ||
| 28 | #if defined(CONFIG_CPU_V6) | 28 | #if defined(CONFIG_CPU_V6) |
| @@ -121,6 +121,22 @@ wait: mrc p14, 0, pc, c0, c1, 0 | |||
| 121 | #include <mach/debug-macro.S> | 121 | #include <mach/debug-macro.S> |
| 122 | #endif /* CONFIG_DEBUG_ICEDCC */ | 122 | #endif /* CONFIG_DEBUG_ICEDCC */ |
| 123 | 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 | |||
| 124 | /* | 140 | /* |
| 125 | * Useful debugging routines | 141 | * Useful debugging routines |
| 126 | */ | 142 | */ |
| @@ -155,7 +171,7 @@ ENDPROC(printhex2) | |||
| 155 | .ltorg | 171 | .ltorg |
| 156 | 172 | ||
| 157 | ENTRY(printascii) | 173 | ENTRY(printascii) |
| 158 | addruart r3, r1 | 174 | addruart_current r3, r1, r2 |
| 159 | b 2f | 175 | b 2f |
| 160 | 1: waituart r2, r3 | 176 | 1: waituart r2, r3 |
| 161 | senduart r1, r3 | 177 | senduart r1, r3 |
| @@ -171,7 +187,7 @@ ENTRY(printascii) | |||
| 171 | ENDPROC(printascii) | 187 | ENDPROC(printascii) |
| 172 | 188 | ||
| 173 | ENTRY(printch) | 189 | ENTRY(printch) |
| 174 | addruart r3, r1 | 190 | addruart_current r3, r1, r2 |
| 175 | mov r1, r0 | 191 | mov r1, r0 |
| 176 | mov r0, #0 | 192 | mov r0, #0 |
| 177 | b 1b | 193 | b 1b |
diff --git a/arch/arm/mach-aaec2000/include/mach/debug-macro.S b/arch/arm/mach-aaec2000/include/mach/debug-macro.S index a9cac368bfe6..bc7ad5561c4c 100644 --- a/arch/arm/mach-aaec2000/include/mach/debug-macro.S +++ b/arch/arm/mach-aaec2000/include/mach/debug-macro.S | |||
| @@ -10,12 +10,10 @@ | |||
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include "hardware.h" | 12 | #include "hardware.h" |
| 13 | .macro addruart, rx, tmp | 13 | .macro addruart, rp, rv |
| 14 | mrc p15, 0, \rx, c1, c0 | 14 | mov \rp, 0x00000800 |
| 15 | tst \rx, #1 @ MMU enabled? | 15 | orr \rv, \rp, #io_p2v(0x80000000) @ virtual |
| 16 | moveq \rx, #0x80000000 @ physical | 16 | orr \rp, \rp, #0x80000000 @ physical |
| 17 | movne \rx, #io_p2v(0x80000000) @ virtual | ||
| 18 | orr \rx, \rx, #0x00000800 | ||
| 19 | .endm | 17 | .endm |
| 20 | 18 | ||
| 21 | .macro senduart,rd,rx | 19 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-at91/include/mach/debug-macro.S b/arch/arm/mach-at91/include/mach/debug-macro.S index 9e750a1c1b5a..0f959faf74a9 100644 --- a/arch/arm/mach-at91/include/mach/debug-macro.S +++ b/arch/arm/mach-at91/include/mach/debug-macro.S | |||
| @@ -14,11 +14,9 @@ | |||
| 14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
| 15 | #include <mach/at91_dbgu.h> | 15 | #include <mach/at91_dbgu.h> |
| 16 | 16 | ||
| 17 | .macro addruart, rx, tmp | 17 | .macro addruart, rp, rv |
| 18 | mrc p15, 0, \rx, c1, c0 | 18 | ldr \rp, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) |
| 19 | tst \rx, #1 @ MMU enabled? | 19 | ldr \rv, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address) |
| 20 | ldreq \rx, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) | ||
| 21 | ldrne \rx, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address) | ||
| 22 | .endm | 20 | .endm |
| 23 | 21 | ||
| 24 | .macro senduart,rd,rx | 22 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index 072cc6b61ba3..507c6873b7ee 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S | |||
| @@ -14,16 +14,14 @@ | |||
| 14 | #include <mach/hardware.h> | ||
