[PATCH] cmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled
Aditya Dutt
duttaditya18 at gmail.com
Fri Sep 5 16:06:11 CEST 2025
serial_reinit_all() is only available when CONFIG DM_SERIAL is disabled
and CONFIG_SERIAL is enabled.
Signed-off-by: Aditya Dutt <duttaditya18 at gmail.com>
---
Running the following:
make am335x_evm_config
scripts/config --enable CONFIG_DM_SERIAL
make
Gives a linker error because serial_reinit_all() is not available in the
case of DM_SERIAL.
cmd/terminal.o: in function `do_terminal':
cmd/terminal.c:28:(.text.do_terminal+0x12): undefined reference to `serial_reinit_all'
cmd/terminal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/terminal.c b/cmd/terminal.c
index d803bc6c896..14610694255 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -24,7 +24,7 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
if (!dev)
return -1;
- if (IS_ENABLED(CONFIG_SERIAL))
+ if (IS_ENABLED(CONFIG_SERIAL) && !IS_ENABLED(CONFIG_DM_SERIAL))
serial_reinit_all();
printf("Entering terminal mode for port %s\n", dev->name);
--
2.34.1
More information about the U-Boot
mailing list