summaryrefslogtreecommitdiffstats
path: root/cmd/terminal.c
diff options
context:
space:
mode:
authorAsherah Connor <ashe@kivikakk.ee>2021-03-10 22:39:24 +1100
committerTom Rini <trini@konsulko.com>2021-04-12 17:44:55 -0400
commitac3821430e0e2dc6ddb766950b0098c67d4969d3 (patch)
tree2c5f1a1cde84c8436ea3dee51e680a3d8a5a4b18 /cmd/terminal.c
parent5c935eb6f7075b227178ddd3a3a231bef4b7238d (diff)
downloadu-boot-ac3821430e0e2dc6ddb766950b0098c67d4969d3.tar.gz
u-boot-ac3821430e0e2dc6ddb766950b0098c67d4969d3.tar.xz
u-boot-ac3821430e0e2dc6ddb766950b0098c67d4969d3.zip
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>
Diffstat (limited to 'cmd/terminal.c')
-rw-r--r--cmd/terminal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/terminal.c b/cmd/terminal.c
index 733701e059..9e32a4191e 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -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");