Tegra: spe: prepend '\r' to '\n'
This patch udpates the SPE console driver to prepend '\r' to '\n'. This fixes the alignment of prints seen by the host machines on their UART ports. Tested by collecting the logs from host PC using Cutecom Reported by: Mustafa Bilgen <mbilgen@nvidia.com> Change-Id: I6e0b412bd71ff5eb889582071df8c157da5175ed Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
parent
07faf4d8c5
commit
843d0aad80
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -63,11 +63,27 @@ func console_core_putc
|
||||||
/* Check the input parameter */
|
/* Check the input parameter */
|
||||||
cbz x1, putc_error
|
cbz x1, putc_error
|
||||||
|
|
||||||
|
/* Prepend '\r' to '\n' */
|
||||||
|
cmp w0, #0xA
|
||||||
|
b.ne 2f
|
||||||
|
|
||||||
/* wait until spe is ready */
|
/* wait until spe is ready */
|
||||||
1: ldr w2, [x1]
|
1: ldr w2, [x1]
|
||||||
and w2, w2, #CONSOLE_IS_BUSY
|
and w2, w2, #CONSOLE_IS_BUSY
|
||||||
cbnz w2, 1b
|
cbnz w2, 1b
|
||||||
|
|
||||||
|
/* spe is ready */
|
||||||
|
mov w2, #0xD /* '\r' */
|
||||||
|
and w2, w2, #0xFF
|
||||||
|
mov w3, #(CONSOLE_WRITE | (1 << CONSOLE_NUM_BYTES_SHIFT))
|
||||||
|
orr w2, w2, w3
|
||||||
|
str w2, [x1]
|
||||||
|
|
||||||
|
/* wait until spe is ready */
|
||||||
|
2: ldr w2, [x1]
|
||||||
|
and w2, w2, #CONSOLE_IS_BUSY
|
||||||
|
cbnz w2, 2b
|
||||||
|
|
||||||
/* spe is ready */
|
/* spe is ready */
|
||||||
mov w2, w0
|
mov w2, w0
|
||||||
and w2, w2, #0xFF
|
and w2, w2, #0xFF
|
||||||
|
|
Loading…
Reference in New Issue