]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/console.c
ARM Update mach-types
[karo-tx-uboot.git] / common / console.c
index 0a36d2fedfe9aad7b10481908ad41ac2b39b22ae..51c6fb6264a1deedbbcc8008f00daf04ff07dbc8 100644 (file)
@@ -532,6 +532,33 @@ int console_init_f(void)
        return 0;
 }
 
+void stdio_print_current_devices(void)
+{
+#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET
+       /* Print information */
+       puts("In:    ");
+       if (stdio_devices[stdin] == NULL) {
+               puts("No input devices available!\n");
+       } else {
+               printf ("%s\n", stdio_devices[stdin]->name);
+       }
+
+       puts("Out:   ");
+       if (stdio_devices[stdout] == NULL) {
+               puts("No output devices available!\n");
+       } else {
+               printf ("%s\n", stdio_devices[stdout]->name);
+       }
+
+       puts("Err:   ");
+       if (stdio_devices[stderr] == NULL) {
+               puts("No error devices available!\n");
+       } else {
+               printf ("%s\n", stdio_devices[stderr]->name);
+       }
+#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */
+}
+
 #ifdef CONFIG_SYS_CONSOLE_IS_IN_ENV
 /* Called after the relocation - use desired console functions */
 int console_init_r(void)
@@ -601,29 +628,7 @@ done:
 
        gd->flags |= GD_FLG_DEVINIT;    /* device initialization completed */
 
-#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET
-       /* Print information */
-       puts("In:    ");
-       if (stdio_devices[stdin] == NULL) {
-               puts("No input devices available!\n");
-       } else {
-               console_printdevs(stdin);
-       }
-
-       puts("Out:   ");
-       if (stdio_devices[stdout] == NULL) {
-               puts("No output devices available!\n");
-       } else {
-               console_printdevs(stdout);
-       }
-
-       puts("Err:   ");
-       if (stdio_devices[stderr] == NULL) {
-               puts("No error devices available!\n");
-       } else {
-               console_printdevs(stderr);
-       }
-#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */
+       stdio_print_current_devices();
 
 #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
        /* set the environment variables (will overwrite previous env settings) */
@@ -654,10 +659,14 @@ int console_init_r(void)
 #ifdef CONFIG_SPLASH_SCREEN
        /*
         * suppress all output if splash screen is enabled and we have
-        * a bmp to display
+        * a bmp to display. We redirect the output from frame buffer
+        * console to serial console in this case or suppress it if
+        * "silent" mode was requested.
         */
-       if (getenv("splashimage") != NULL)
-               gd->flags |= GD_FLG_SILENT;
+       if (getenv("splashimage") != NULL) {
+               if (!(gd->flags & GD_FLG_SILENT))
+                       outputdev = search_device (DEV_FLAGS_OUTPUT, "serial");
+       }
 #endif
 
        /* Scan devices looking for input and output devices */
@@ -694,29 +703,7 @@ int console_init_r(void)
 
        gd->flags |= GD_FLG_DEVINIT;    /* device initialization completed */
 
-#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET
-       /* Print information */
-       puts("In:    ");
-       if (stdio_devices[stdin] == NULL) {
-               puts("No input devices available!\n");
-       } else {
-               printf("%s\n", stdio_devices[stdin]->name);
-       }
-
-       puts("Out:   ");
-       if (stdio_devices[stdout] == NULL) {
-               puts("No output devices available!\n");
-       } else {
-               printf("%s\n", stdio_devices[stdout]->name);
-       }
-
-       puts("Err:   ");
-       if (stdio_devices[stderr] == NULL) {
-               puts("No error devices available!\n");
-       } else {
-               printf("%s\n", stdio_devices[stderr]->name);
-       }
-#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */
+       stdio_print_current_devices();
 
        /* Setting environment variables */
        for (i = 0; i < 3; i++) {