summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-05-05 21:12:41 +0200
committerWolfgang Denk <wd@denx.de>2007-05-05 21:12:41 +0200
commit2be1bab6a7dc1d1c9ee1e3ca53ff9f011136f1fe (patch)
tree1ead443be05f9bf7ff950b789fdb0aa45dbb2738 /common/main.c
parent2f15278c2eb911c668b4fe562130b78cf554d139 (diff)
parent2f550ab976405300f5b07bf2890800840d0aa05f (diff)
downloadu-boot-imx-2be1bab6a7dc1d1c9ee1e3ca53ff9f011136f1fe.zip
u-boot-imx-2be1bab6a7dc1d1c9ee1e3ca53ff9f011136f1fe.tar.gz
u-boot-imx-2be1bab6a7dc1d1c9ee1e3ca53ff9f011136f1fe.tar.bz2
Merge with git://www.denx.de/git/u-boot-testing
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c50
1 files changed, 11 insertions, 39 deletions
diff --git a/common/main.c b/common/main.c
index cc4b50f..0003da2 100644
--- a/common/main.c
+++ b/common/main.c
@@ -112,16 +112,8 @@ 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);
+ printf(CONFIG_AUTOBOOT_PROMPT, bootdelay);
# endif
# ifdef CONFIG_AUTOBOOT_DELAY_STR
@@ -195,18 +187,12 @@ static __inline__ int abortboot(int bootdelay)
}
# if DEBUG_BOOTKEYS
if (!abort)
- puts ("key timeout\n");
+ puts("key timeout\n");
# 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
@@ -244,8 +222,8 @@ static __inline__ int abortboot(int bootdelay)
if (bootdelay >= 0) {
if (tstc()) { /* we got a key press */
(void) getc(); /* consume input */
- puts ("\b\b\b 0");
- abort = 1; /* don't auto boot */
+ puts("\b\b\b 0");
+ abort = 1; /* don't auto boot */
}
}
#endif
@@ -266,23 +244,17 @@ static __inline__ int abortboot(int bootdelay)
# endif
break;
}
- udelay (10000);
+ udelay(10000);
}
- printf ("\b\b\b%2d ", bootdelay);
+ printf("\b\b\b%2d ", bootdelay);
}
- putc ('\n');
+ 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;