terminal: only serial_reinit_all if available

serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e.
!CONFIG_DM_SERIAL).

Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Asherah Connor 2021-03-10 22:39:24 +11:00 committed by Tom Rini
parent 5c935eb6f7
commit ac3821430e

View File

@ -25,7 +25,9 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
if (!dev)
return -1;
serial_reinit_all();
if (IS_ENABLED(CONFIG_SERIAL))
serial_reinit_all();
printf("Entering terminal mode for port %s\n", dev->name);
puts("Use '~.' to leave the terminal and get back to u-boot\n");