summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-04-20 17:25:10 (GMT)
committerKumar Gala <galak@kernel.crashing.org>2006-04-20 17:25:10 (GMT)
commitb86d7622b33892b1dafe761a7a9eaeeab9f3816b (patch)
tree56b1b6fc978166abce4afa8e9dee0af94bfc3cd6 /common/main.c
parentf8edca2e9a128f526b1fe6f997f7adb852cf5b3c (diff)
parent56a4a63c106cc317fc0fe42686a99416fc469f5b (diff)
downloadu-boot-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.tar.xz
Merge branch 'master' of rsync://rsync.denx.de/git/u-boot
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c64
1 files changed, 26 insertions, 38 deletions
diff --git a/common/main.c b/common/main.c
index 445cb18..758ef8d 100644
--- a/common/main.c
+++ b/common/main.c
@@ -36,6 +36,10 @@
#include <post.h>
+#ifdef CONFIG_SILENT_CONSOLE
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
#if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY)
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */
#endif
@@ -105,14 +109,10 @@ static __inline__ int abortboot(int bootdelay)
u_int i;
#ifdef CONFIG_SILENT_CONSOLE
- {
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->flags & GD_FLG_SILENT) {
- /* Restore serial console */
- console_assign (stdout, "serial");
- console_assign (stderr, "serial");
- }
+ if (gd->flags & GD_FLG_SILENT) {
+ /* Restore serial console */
+ console_assign (stdout, "serial");
+ console_assign (stderr, "serial");
}
#endif
@@ -195,17 +195,13 @@ static __inline__ int abortboot(int bootdelay)
# endif
#ifdef CONFIG_SILENT_CONSOLE
- {
- DECLARE_GLOBAL_DATA_PTR;
-
- 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) {
+ /* 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");
}
#endif
@@ -223,14 +219,10 @@ static __inline__ int abortboot(int bootdelay)
int abort = 0;
#ifdef CONFIG_SILENT_CONSOLE
- {
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->flags & GD_FLG_SILENT) {
- /* Restore serial console */
- console_assign (stdout, "serial");
- console_assign (stderr, "serial");
- }
+ if (gd->flags & GD_FLG_SILENT) {
+ /* Restore serial console */
+ console_assign (stdout, "serial");
+ console_assign (stderr, "serial");
}
#endif
@@ -279,17 +271,13 @@ static __inline__ int abortboot(int bootdelay)
putc ('\n');
#ifdef CONFIG_SILENT_CONSOLE
- {
- DECLARE_GLOBAL_DATA_PTR;
-
- 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) {
+ /* 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");
}
#endif