aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/debug.S
diff options
context:
space:
mode:
authorJeremy Kerr <jeremy.kerr@canonical.com>2010-07-06 06:30:06 -0400
committerNicolas Pitre <nico@fluxnic.net>2010-10-20 00:27:33 -0400
commit0ea1293009826da45e1019f45dfde1e557bb30df (patch)
tree7111bcd355921f03415182845e5f236ffe1896f4 /arch/arm/kernel/debug.S
parent1ea64615601229f0dc16dee91dc5b50216411baa (diff)
arm: return both physical and virtual addresses from addruart
Rather than checking the MMU status in every instance of addruart, do it once in kernel/debug.S, and change the existing addruart macros to return both physical and virtual addresses. The main debug code can then select the appropriate address to use. This will also allow us to retreive the address of a uart for the MMU state that we're not current in. Updated with fixes for OMAP from Jason Wang <jason77.wang@gmail.com> and Tony Lindgren <tony@atomide.com>, and fix for versatile express from Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Jason Wang <jason77.wang@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/kernel/debug.S')
-rw-r--r--arch/arm/kernel/debug.S22
1 files changed, 19 insertions, 3 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
157ENTRY(printascii) 173ENTRY(printascii)
158 addruart r3, r1 174 addruart_current r3, r1, r2
159 b 2f 175 b 2f
1601: waituart r2, r3 1761: waituart r2, r3
161 senduart r1, r3 177 senduart r1, r3
@@ -171,7 +187,7 @@ ENTRY(printascii)
171ENDPROC(printascii) 187ENDPROC(printascii)
172 188
173ENTRY(printch) 189ENTRY(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