serial: Support info() method in ns16550 xPL with UPL
authorSimon Glass <sjg@chromium.org>
Sat, 11 Jan 2025 00:00:05 +0000 (17:00 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jan 2025 21:58:03 +0000 (15:58 -0600)
UPL needs to pass the serial details onto the next stage, so adjust the
condition to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/serial/ns16550.c

index c3b884b..039da83 100644 (file)
@@ -464,7 +464,7 @@ int ns16550_serial_getinfo(struct udevice *dev, struct serial_device_info *info)
        struct ns16550_plat *plat = com_port->plat;
 
        /* save code size */
-       if (!not_xpl())
+       if (!not_xpl() && !CONFIG_IS_ENABLED(UPL_OUT))
                return -ENOSYS;
 
        info->type = SERIAL_CHIP_16550_COMPATIBLE;