[PATCH v3 2/2] serial: sifive: Switch to nbcon console

Sebastian Andrzej Siewior bigeasy at linutronix.de
Mon Mar 31 01:03:18 PDT 2025


On 2025-03-30 20:21:09 [+0900], Ryo Takakura wrote:
> --- a/drivers/tty/serial/sifive.c
> +++ b/drivers/tty/serial/sifive.c
> @@ -785,33 +786,88 @@ static void sifive_serial_console_putchar(struct uart_port *port, unsigned char
>  
>  	__ssp_wait_for_xmitr(ssp);
>  	__ssp_transmit_char(ssp, ch);
> +
> +	ssp->console_line_ended = (ch == '\n');
> +}
> +
> +static void sifive_serial_device_lock(struct console *co, unsigned long *flags)
> +{
> +	struct uart_port *up = &sifive_serial_console_ports[co->index]->port;
> +
> +	return __uart_port_lock_irqsave(up, flags);

this does look odd. A return statement in a return-void function. The
imx driver started it…

> +}
> +
> +static void sifive_serial_device_unlock(struct console *co, unsigned long flags)
> +{
> +	struct uart_port *up = &sifive_serial_console_ports[co->index]->port;
> +
> +	return __uart_port_unlock_irqrestore(up, flags);
>  }

Sebastian



More information about the linux-riscv mailing list