[PATCH 02/19] serial: ns16550: Allow clocks to be missing

Simon Glass sjg at chromium.org
Fri Sep 20 09:25:42 CEST 2024


Hi Tom,

On Thu, 29 Aug 2024 at 19:24, Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Aug 29, 2024 at 08:57:45AM -0600, Simon Glass wrote:
> > Allow serial init when clock support is not enabled in a particular phase.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  drivers/serial/ns16550.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> > index 6fcb5b523ac..5cda273623d 100644
> > --- a/drivers/serial/ns16550.c
> > +++ b/drivers/serial/ns16550.c
> > @@ -570,7 +570,7 @@ int ns16550_serial_of_to_plat(struct udevice *dev)
> >               err = clk_get_rate(&clk);
> >               if (!IS_ERR_VALUE(err))
> >                       plat->clock = err;
> > -     } else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS) {
> > +     } else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS && err != -EALREADY) {
> >               debug("ns16550 failed to get clock\n");
> >               return err;
> >       }
>
> Your patch and
> https://patchwork.ozlabs.org/project/uboot/patch/20240804150955.3521296-1-jonas@kwiboo.se/
> would seem to be in conflict and I'm not sure what's the best thing
> moving forward.

That patch seems good to me. For this one, I will drop it from the
next version. The existing conditions should be enough for the case I
have (clocks in the previous phase but not in this one) so long as
-ENOSYS is returned.

Regards,
Simon


More information about the U-Boot mailing list