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>
diff --git a/cmd/terminal.c b/cmd/terminal.c
index 733701e..9e32a41 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -25,7 +25,9 @@
 	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");