]> www.infradead.org Git - users/jedix/linux-maple.git/commit
serial: sifive: Switch to nbcon console
authorRyo Takakura <ryotkkr98@gmail.com>
Sat, 12 Apr 2025 00:25:44 +0000 (09:25 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 12:37:43 +0000 (14:37 +0200)
commit66f5f70ce07a5c4ad88709dc34c072673aaafa25
tree7844dc3e9110908e79d6012c6f1e409e767bfcf4
parent8bfabff0bfff8fbbe90673d1a557d15c42b4494a
serial: sifive: Switch to nbcon console

Add the necessary callbacks(write_atomic, write_thread, device_lock
and device_unlock) and CON_NBCON flag to switch the sifive console
driver to perform as nbcon console.

Both ->write_atomic() and ->write_thread() will check for console
ownership whenever they are accessing registers.

The ->device_lock()/unlock() will provide the additional serilization
necessary for ->write_thread() which is called from dedicated printing
thread.

Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20250412002544.185038-1-ryotkkr98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sifive.c