Merge https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git] / common / cli_readline.c
index 99b6317..47b8762 100644 (file)
@@ -11,6 +11,8 @@
 #include <common.h>
 #include <bootretry.h>
 #include <cli.h>
+#include <command.h>
+#include <time.h>
 #include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -66,7 +68,7 @@ static char *delete_char (char *buffer, char *p, int *colp, int *np, int plen)
 #define CREAD_HIST_CHAR                ('!')
 
 #define getcmd_putch(ch)       putc(ch)
-#define getcmd_getch()         getc()
+#define getcmd_getch()         getchar()
 #define getcmd_cbeep()         getcmd_putch('\a')
 
 #define HIST_MAX               20
@@ -569,13 +571,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer,
                        return -2;      /* timed out */
                WATCHDOG_RESET();       /* Trigger watchdog, if needed */
 
-#ifdef CONFIG_SHOW_ACTIVITY
-               while (!tstc()) {
-                       show_activity(0);
-                       WATCHDOG_RESET();
-               }
-#endif
-               c = getc();
+               c = getchar();
 
                /*
                 * Special character handling