public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] lcd: Add support for CONFIG_LCD_NOSTDOUT
@ 2014-03-06 14:26 Hannes Petermaier
  2014-03-06 19:49 ` Gerhard Sittig
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hannes Petermaier @ 2014-03-06 14:26 UTC (permalink / raw)
  To: u-boot

- Adds support for CONFIG_LCD_NOSTDOUT, which prevents switching
  stdout to the LCD screen, usefull in case when only lcd_puts(...),
  lcd_printf(...) is used for displaying status informations.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
---
 README       |    7 +++++++
 common/lcd.c |    9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 216f0c7..4792068 100644
--- a/README
+++ b/README
@@ -1702,6 +1702,13 @@ CBFS (Coreboot Filesystem) support
 		Normally display is black on white background; define
 		CONFIG_SYS_WHITE_ON_BLACK to get it inverted.
 
+		CONFIG_LCD_NOSTDOUT
+		Normally 'stdout' is redirected to LCD-screen after
+		initialization. Define CONFIG_LCD_NOSTDOUT to avoid this.
+		Useful in case where only lcd_puts(...), lcd_printf(...)
+		functions of the framework are used and 'normal' u-boot
+		console remains e.g. on serial-line.
+
 		CONFIG_LCD_ALIGNMENT
 
 		Normally the LCD is page-aligned (tyically 4KB). If this is
diff --git a/common/lcd.c b/common/lcd.c
index aa81522..eac1b87 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -400,12 +400,12 @@ __weak int lcd_get_size(int *line_length)
 
 int drv_lcd_init(void)
 {
-	struct stdio_dev lcddev;
-	int rc;
-
 	lcd_base = (void *) gd->fb_base;
 
 	lcd_init(lcd_base);		/* LCD initialization */
+#ifndef CONFIG_LCD_NOSTDOUT
+	struct stdio_dev lcddev;
+	int rc;
 
 	/* Device initialization */
 	memset(&lcddev, 0, sizeof(lcddev));
@@ -419,6 +419,9 @@ int drv_lcd_init(void)
 	rc = stdio_register(&lcddev);
 
 	return (rc == 0) ? 1 : rc;
+#else
+	return 0;
+#endif
 }
 
 /*----------------------------------------------------------------------*/
-- 
1.7.9.5

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

end of thread, other threads:[~2015-02-04  9:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 14:26 [U-Boot] [PATCH] lcd: Add support for CONFIG_LCD_NOSTDOUT Hannes Petermaier
2014-03-06 19:49 ` Gerhard Sittig
2014-03-06 20:28   ` Hannes Petermaier
2014-03-08 19:46   ` Hannes Petermaier
2014-03-10 19:44     ` Gerhard Sittig
2014-05-03 18:34 ` Jeroen Hofstee
2014-05-05  6:21   ` Hannes Petermaier
2014-08-11 13:52 ` Anatolij Gustschin
2015-02-04  9:05   ` Hannes Petermaier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox