Skip to content

Commit 0b0c1db

Browse files
Linus WalleijRussell King
authored andcommitted
ARM: 9006/1: uncompress: Wait for ready and busy in debug prints
For some platforms such as Qualcomm we need to wait for the UART to be ready before writing characters to the UART in the same manner as the macro in debug.S used with the main "Uncompressing Linux ..." text. Pass an extra temporary variable to writeb and make it call waituarttxrdy and busyuart just like the other decomression messages. Optionally it will also call waituartcts if and only if CONFIG_DEBUG_UART_FLOW_CONTROL is selected. After this the decompression debug messages work fine on Qualcomm platforms if you compile head.S with -DDEBUG. Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com> Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent 4df24fe commit 0b0c1db

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

  • arch/arm/boot/compressed

‎arch/arm/boot/compressed/head.S‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
2929
.macro loadsp, rb, tmp1, tmp2
3030
.endm
31-
.macro writeb, ch, rb
31+
.macro writeb, ch, rb, tmp
3232
mcr p14, 0, \ch, c0, c5, 0
3333
.endm
3434
#elif defined(CONFIG_CPU_XSCALE)
3535
.macro loadsp, rb, tmp1, tmp2
3636
.endm
37-
.macro writeb, ch, rb
37+
.macro writeb, ch, rb, tmp
3838
mcr p14, 0, \ch, c8, c0, 0
3939
.endm
4040
#else
4141
.macro loadsp, rb, tmp1, tmp2
4242
.endm
43-
.macro writeb, ch, rb
43+
.macro writeb, ch, rb, tmp
4444
mcr p14, 0, \ch, c1, c0, 0
4545
.endm
4646
#endif
@@ -49,8 +49,13 @@
4949

5050
#include CONFIG_DEBUG_LL_INCLUDE
5151

52-
.macro writeb, ch, rb
52+
.macro writeb, ch, rb, tmp
53+
#ifdef CONFIG_DEBUG_UART_FLOW_CONTROL
54+
waituartcts \tmp, \rb
55+
#endif
56+
waituarttxrdy \tmp, \rb
5357
senduart \ch, \rb
58+
busyuart \tmp, \rb
5459
.endm
5560

5661
#if defined(CONFIG_ARCH_SA1100)
@@ -1326,7 +1331,7 @@ puts: loadsp r3, r2, r1
13261331
1: ldrb r2, [r0], #1
13271332
teq r2, #0
13281333
moveq pc, lr
1329-
2: writeb r2, r3
1334+
2: writeb r2, r3, r1
13301335
mov r1, #0x00020000
13311336
3: subs r1, r1, #1
13321337
bne 3b

0 commit comments

Comments
 (0)