]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
common: cli_readline: Ensure to call show_activity anytime U-Boot is waiting for...
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 13 Mar 2017 14:52:43 +0000 (15:52 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 13 Mar 2017 15:36:36 +0000 (16:36 +0100)
common/bootretry.c
common/cli_readline.c

index 2d82798cd04bc6ba004d2382ceaab79637c79a85..6ba48d400a1f4dc435304a650ee15907d63293ca 100644 (file)
@@ -47,6 +47,9 @@ int bootretry_tstc_timeout(void)
        while (!tstc()) {       /* while no incoming data */
                if (retry_time >= 0 && get_ticks() > endtime)
                        return -ETIMEDOUT;
+#ifdef CONFIG_SHOW_ACTIVITY
+               show_activity(0);
+#endif
                WATCHDOG_RESET();
        }
 
index ecded11ca3985f27b132ef4d20f7e79ee02c8379..b68a5279773d88f6b57c9d971c2e66606217cc05 100644 (file)
@@ -261,12 +261,16 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
        while (1) {
                if (bootretry_tstc_timeout())
                        return -2;      /* timed out */
-               if (first && timeout) {
+
+               if (first) {
                        uint64_t etime = endtick(timeout);
 
                        while (!tstc()) {       /* while no incoming data */
-                               if (get_ticks() >= etime)
+                               if (timeout && get_ticks() >= etime)
                                        return -2;      /* timed out */
+#ifdef CONFIG_SHOW_ACTIVITY
+                               show_activity(0);
+#endif
                                WATCHDOG_RESET();
                        }
                        first = 0;