cmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled
PATCH 1/1 cmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled
serial_reinit_all() is only available when CONFIG DM_SERIAL is disabled and CONFIG_SERIAL is enabled.
---
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(-)
cmd/terminal.c +1 -1
@@ -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);
Signature · 1 line
2.34.1
Quoted 6 lines · Aditya Dutt
Running the following:
make
am335x_evm_config
scripts/config--enableCONFIG_DM_SERIAL
make
Sorry, there is a typo here.
Running the following:
make am335x_evm_config scripts/config --enable CONFIG_CMD_TERMINAL make
gives the linker error.
---
Aditya Dutt <[email protected]>
Quoted 4 lines · Aditya Dutt
serial_reinit_all()is only available when CONFIGDM_SERIALis disabled andCONFIG_SERIALis enabled.
Applied to u-boot/next, thanks!
[1/1] cmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled
commit: bbc9347a98c3fb32610d4324c9e0f6239f013143
Signature · 1 line
Tom