summaryrefslogtreecommitdiff
path: root/plat/socionext/uniphier
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-23 12:53:41 +0900
committerPaul Beesley <paul.beesley@arm.com>2019-09-03 09:08:16 +0000
commitabfd5719741ff6a1b9f7f68c78154673b2fe98cc (patch)
tree9ba822ff0f47f48d05647cfffa0a37859dcace0c /plat/socionext/uniphier
parentf1b78d32fd95ca5ea996bb497417d701f809136a (diff)
downloadarm-trusted-firmware-abfd5719741ff6a1b9f7f68c78154673b2fe98cc.tar.gz
uniphier: set CONSOLE_FLAG_TRANSLATE_CRLF and clean up console driver
This console driver sends '\r' before 'n', not after. It works, but the convention is "\r\n" (i.e. CRLF) Instead of fixing it in the driver, set CONSOLE_FLAG_TRANSLATE_CRLF to leave it to the framework. Change-Id: I2154e29313739a40dff70cfb5c0f8989136d4ad2 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'plat/socionext/uniphier')
-rw-r--r--plat/socionext/uniphier/uniphier_console.S10
-rw-r--r--plat/socionext/uniphier/uniphier_console_setup.c3
2 files changed, 4 insertions, 9 deletions
diff --git a/plat/socionext/uniphier/uniphier_console.S b/plat/socionext/uniphier/uniphier_console.S
index 2c8dc8f84..1113c6e81 100644
--- a/plat/socionext/uniphier/uniphier_console.S
+++ b/plat/socionext/uniphier/uniphier_console.S
@@ -23,15 +23,9 @@ func uniphier_console_putc
0: ldr w2, [x1, #UNIPHIER_UART_LSR]
tbz w2, #UNIPHIER_UART_LSR_THRE_BIT, 0b
- mov w2, w0
+ str w0, [x1, #UNIPHIER_UART_TX]
-1: str w2, [x1, #UNIPHIER_UART_TX]
-
- cmp w2, #'\n'
- b.ne 2f
- mov w2, #'\r' /* Append '\r' to '\n' */
- b 1b
-2: ret
+ ret
endfunc uniphier_console_putc
/*
diff --git a/plat/socionext/uniphier/uniphier_console_setup.c b/plat/socionext/uniphier/uniphier_console_setup.c
index 8185ec5a1..64ee79714 100644
--- a/plat/socionext/uniphier/uniphier_console_setup.c
+++ b/plat/socionext/uniphier/uniphier_console_setup.c
@@ -32,7 +32,8 @@ static struct uniphier_console uniphier_console = {
#if DEBUG
CONSOLE_FLAG_RUNTIME |
#endif
- CONSOLE_FLAG_CRASH,
+ CONSOLE_FLAG_CRASH |
+ CONSOLE_FLAG_TRANSLATE_CRLF,
.putc = uniphier_console_putc,
.getc = uniphier_console_getc,
.flush = uniphier_console_flush,