[PATCH RESEND] serial: pl01x: set baudrate when probing
Dan Carpenter
dan.carpenter at linaro.org
Mon Feb 26 09:23:49 CET 2024
On Sun, Feb 25, 2024 at 08:38:33AM +0800, Yang Xiwen via B4 Relay wrote:
> #if CONFIG_IS_ENABLED(OF_PLATDATA)
> struct dtd_serial_pl01x *dtplat = &plat->dtplat;
> @@ -301,10 +302,14 @@ int pl01x_serial_probe(struct udevice *dev)
> #endif
> priv->type = plat->type;
>
> - if (!plat->skip_init)
> - return pl01x_generic_serial_init(priv->regs, priv->type);
> - else
> + if (!plat->skip_init) {
> + ret = pl01x_generic_serial_init(priv->regs, priv->type);
> + if (!ret)
^^^^
This if statement seems to be reversed.
regards,
dan carpenter
> + return ret;
> + return pl01x_serial_setbrg(dev, gd->baudrate);
> + } else {
> return 0;
> + }
> }
More information about the U-Boot
mailing list