Re: [PATCH] serial: amba-pl011: Support earlycon_kgdboc

From: Doug Anderson
Date: Fri Apr 24 2020 - 14:18:19 EST


Hi,

On Fri, Apr 24, 2020 at 1:15 AM Sumit Garg <sumit.garg@xxxxxxxxxx> wrote:
>
> Implement the read() function in the early console driver. With
> recently added earlycon_kgdboc feature, this allows you to use kgdb
> to debug fairly early into the system boot.
>
> We only bother implementing this if polling is enabled since kgdb can't
> be enabled without that.
>
> Signed-off-by: Sumit Garg <sumit.garg@xxxxxxxxxx>
> ---
>
> Depends on kgdb patch series: https://lkml.org/lkml/2020/4/21/1179
>
> drivers/tty/serial/amba-pl011.c | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)

This is the first time I've ever looked at the code for this
particular serial driver, but with that caveat your patch looks right
to me. Specifically:

* Code, naming, and style of your new read routine match the existing
write routine used for earlycon.

* The read routine looks to read the same registers / works the same
as the main "polling" read routine, pl011_get_poll_char().

Thus:

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>