Merge with /home/tur/git/u-boot#motionpro
[platform/kernel/u-boot.git] / common / main.c
index 8f196a4..09ee64b 100644 (file)
@@ -112,14 +112,6 @@ static __inline__ int abortboot(int bootdelay)
        u_int presskey_max = 0;
        u_int i;
 
-#ifdef CONFIG_SILENT_CONSOLE
-       if (gd->flags & GD_FLG_SILENT) {
-               /* Restore serial console */
-               console_assign (stdout, "serial");
-               console_assign (stderr, "serial");
-       }
-#endif
-
 #  ifdef CONFIG_AUTOBOOT_PROMPT
        printf (CONFIG_AUTOBOOT_PROMPT, bootdelay);
 #  endif
@@ -199,14 +191,8 @@ static __inline__ int abortboot(int bootdelay)
 #  endif
 
 #ifdef CONFIG_SILENT_CONSOLE
-       if (abort) {
-               /* permanently enable normal console output */
-               gd->flags &= ~(GD_FLG_SILENT);
-       } else if (gd->flags & GD_FLG_SILENT) {
-               /* Restore silent console */
-               console_assign (stdout, "nulldev");
-               console_assign (stderr, "nulldev");
-       }
+       if (abort)
+               gd->flags &= ~GD_FLG_SILENT;
 #endif
 
        return abort;
@@ -222,14 +208,6 @@ static __inline__ int abortboot(int bootdelay)
 {
        int abort = 0;
 
-#ifdef CONFIG_SILENT_CONSOLE
-       if (gd->flags & GD_FLG_SILENT) {
-               /* Restore serial console */
-               console_assign (stdout, "serial");
-               console_assign (stderr, "serial");
-       }
-#endif
-
 #ifdef CONFIG_MENUPROMPT
        printf(CONFIG_MENUPROMPT, bootdelay);
 #else
@@ -245,7 +223,7 @@ static __inline__ int abortboot(int bootdelay)
                if (tstc()) {   /* we got a key press   */
                        (void) getc();  /* consume input        */
                        puts ("\b\b\b 0");
-                       abort = 1;      /* don't auto boot      */
+                       abort = 1;      /* don't auto boot      */
                }
        }
 #endif
@@ -275,14 +253,8 @@ static __inline__ int abortboot(int bootdelay)
        putc ('\n');
 
 #ifdef CONFIG_SILENT_CONSOLE
-       if (abort) {
-               /* permanently enable normal console output */
-               gd->flags &= ~(GD_FLG_SILENT);
-       } else if (gd->flags & GD_FLG_SILENT) {
-               /* Restore silent console */
-               console_assign (stdout, "nulldev");
-               console_assign (stderr, "nulldev");
-       }
+       if (abort)
+               gd->flags &= ~GD_FLG_SILENT;
 #endif
 
        return abort;