Re: [PATCH v2] serial: sifive: Switch to nbcon console

From: Petr Mladek
Date: Thu Apr 10 2025 - 08:30:04 EST


On Sat 2025-04-05 23:59:15, Ryo Takakura wrote:
> 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@xxxxxxxxx>
> Reviewed-by: John Ogness <john.ogness@xxxxxxxxxxxxx>

I do not have the hardware around so I could not test it.
But the code looks good. With the added comment (reported
by the robot):

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr