drivers/console/xtensa_sim_console: force \r\n byte sequence
Force `\r\n` byte sequence for newline for the Xtensa simulator console driver. This effectively mirrors the behavior of the UART console driver. Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit is contained in:
parent
00b2ef8744
commit
99aa65c725
1 changed files with 8 additions and 0 deletions
|
|
@ -25,6 +25,14 @@ int arch_printk_char_out(int c)
|
|||
register int ret_err __asm__ ("a3");
|
||||
|
||||
buf[0] = (char)c;
|
||||
|
||||
if (buf[0] == '\n') {
|
||||
buf[1] = buf[0];
|
||||
buf[0] = '\r';
|
||||
a3++;
|
||||
a5++;
|
||||
}
|
||||
|
||||
__asm__ volatile ("simcall"
|
||||
: "=a" (ret_val), "=a" (ret_err)
|
||||
: "a" (a2), "a" (a3), "a" (a4), "a" (a5)
|
||||
|
|
|
|||
Loading…
Reference in a new issue