Message ID | 20240829145802.1827952-3-sjg@chromium.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | vbe: Series part E | expand |
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@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.
Hi Tom, On Thu, 29 Aug 2024 at 19:24, Tom Rini <trini@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@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
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; }
Allow serial init when clock support is not enabled in a particular phase. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)