summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-03-16 15:29:33 +0100
committerWolfgang Denk <wd@denx.de>2010-03-21 22:22:53 +0100
commita74908161a1b37d780d3a826a86807bbc50a3857 (patch)
tree801af4a8738ca9ca11afe35d957e911e3c8d42c5
parent5647f78d04174b0b99857d2a7cbf25141bd14a45 (diff)
downloadu-boot-imx-a74908161a1b37d780d3a826a86807bbc50a3857.zip
u-boot-imx-a74908161a1b37d780d3a826a86807bbc50a3857.tar.gz
u-boot-imx-a74908161a1b37d780d3a826a86807bbc50a3857.tar.bz2
console.c: fix problem with splashimage
If a board uses cfb_console driver and splash image and also defines CONFIG_SILENT_CONSOLE, the user is locked out even if "silent" is not set. It is not possible to get any output, neither on vga console device nor on serial console after redirecting the output to the serial console, since the GD_FLG_SILENT flag remains set. Fix the problem by redirecting the output from frame buffer to serial console if splashimage is used. Only suppress the output if "silent" environment variable was set and don't set the GD_FLG_SILENT flag arbitrarily. Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r--common/console.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c
index dc0d13b..51c6fb6 100644
--- a/common/console.c
+++ b/common/console.c
@@ -659,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 */