All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] console.c: fix problem with splashimage
@ 2010-03-16 14:29 Anatolij Gustschin
  2010-03-21 18:58 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Anatolij Gustschin @ 2010-03-16 14:29 UTC (permalink / raw)
  To: u-boot

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>
---
 common/console.c |   10 +++++++---
 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 */
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] console.c: fix problem with splashimage
  2010-03-16 14:29 [U-Boot] [PATCH] console.c: fix problem with splashimage Anatolij Gustschin
@ 2010-03-21 18:58 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2010-03-21 18:58 UTC (permalink / raw)
  To: u-boot

Dear Anatolij Gustschin,

In message <1268749773-4302-1-git-send-email-agust@denx.de> you wrote:
> 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>
> ---
>  common/console.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He is truly wise who gains wisdom from another's mishap.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-21 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-16 14:29 [U-Boot] [PATCH] console.c: fix problem with splashimage Anatolij Gustschin
2010-03-21 18:58 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.