summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/debug.S
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2017-11-02 23:58:41 +0300
committerRussell King <rmk+kernel@armlinux.org.uk>2017-11-06 14:58:16 +0300
commit2a14b80cb03bee9a4973e5a91e0ed48df25b57ce (patch)
tree7b28de0b20599c437d215c83cee686a3a155f631 /arch/arm/kernel/debug.S
parentde880632fc02a889c0c3d2247fa08dc9e1afa228 (diff)
downloadlinux-2a14b80cb03bee9a4973e5a91e0ed48df25b57ce.tar.xz
ARM: 8717/2: debug printch/printascii: translate '\n' to "\r\n" not "\n\r"
Some terminals apparently have issues with "\n\r" and mess up the display. Let's use the traditional "\r\n" ordering. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reported-by: Chris Brandt <Chris.Brandt@renesas.com> Tested-by: Chris Brandt <Chris.Brandt@renesas.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/kernel/debug.S')
-rw-r--r--arch/arm/kernel/debug.S25
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index 423f4432586d..611ded664d61 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -85,25 +85,28 @@ hexbuf_rel: .long hexbuf_addr - .
ENTRY(printascii)
addruart_current r3, r1, r2
- b 2f
-1: waituart r2, r3
- senduart r1, r3
- busyuart r2, r3
- teq r1, #'\n'
- moveq r1, #'\r'
- beq 1b
-2: teq r0, #0
+1: teq r0, #0
ldrneb r1, [r0], #1
teqne r1, #0
- bne 1b
- ret lr
+ reteq lr
+2: teq r1, #'\n'
+ bne 3f
+ mov r1, #'\r'
+ waituart r2, r3
+ senduart r1, r3
+ busyuart r2, r3
+ mov r1, #'\n'
+3: waituart r2, r3
+ senduart r1, r3
+ busyuart r2, r3
+ b 1b
ENDPROC(printascii)
ENTRY(printch)
addruart_current r3, r1, r2
mov r1, r0
mov r0, #0
- b 1b
+ b 2b
ENDPROC(printch)
#ifdef CONFIG_MMU