Commit a19f7470 authored by Andreas Schwab's avatar Andreas Schwab Committed by Palmer Dabbelt

tty/serial: use uart_console_write in the RISC-V SBL early console

This enables proper NLCR processing.
Suggested-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarAndreas Schwab <schwab@suse.de>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 2a200fb9
......@@ -10,13 +10,16 @@
#include <linux/serial_core.h>
#include <asm/sbi.h>
static void sbi_console_write(struct console *con,
const char *s, unsigned int n)
static void sbi_putc(struct uart_port *port, int c)
{
int i;
sbi_console_putchar(c);
}
for (i = 0; i < n; ++i)
sbi_console_putchar(s[i]);
static void sbi_console_write(struct console *con,
const char *s, unsigned n)
{
struct earlycon_device *dev = con->data;
uart_console_write(&dev->port, s, n, sbi_putc);
}
static int __init early_sbi_setup(struct earlycon_device *device,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment