From 7f5ff034c32acd4481f4d6ce8118542f71c91b75 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 26 Sep 2023 08:14:56 -0600 Subject: [PATCH] serial: Drop ns16550 serial_getinfo() in SPL This is typically not needed in SPL/TPL and increases the code size. Drop it. Signed-off-by: Simon Glass --- drivers/serial/ns16550.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index eab9537fba..5ca2828ae8 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -472,6 +473,10 @@ static int ns16550_serial_getinfo(struct udevice *dev, struct ns16550 *const com_port = dev_get_priv(dev); struct ns16550_plat *plat = com_port->plat; + /* save code size */ + if (!spl_in_proper()) + return -ENOSYS; + info->type = SERIAL_CHIP_16550_COMPATIBLE; #ifdef CONFIG_SYS_NS16550_PORT_MAPPED info->addr_space = SERIAL_ADDRESS_SPACE_IO; -- 2.39.5