[U-Boot] [PATCH v2 22/24] intern: disable lcd-stdout

Hannes Petermaier oe5hpm at oevsv.at
Tue Feb 3 13:22:44 CET 2015


on B&R boards we want not redirect console to screen.

Signed-off-by: Hannes Petermaier <oe5hpm at oevsv.at>

---
Changes for V2: None
---
 README       |    7 +++++++
 common/lcd.c |   10 ++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/README b/README
index fefa71c..8f9865c 100644
--- a/README
+++ b/README
@@ -1959,6 +1959,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 (typically 4KB). If this is
diff --git a/common/lcd.c b/common/lcd.c
index cc34b8a..3ed6d20 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -194,12 +194,11 @@ __weak int lcd_get_size(int *line_length)
 
 int drv_lcd_init(void)
 {
-	struct stdio_dev lcddev;
-	int rc;
-
 	lcd_base = map_sysmem(gd->fb_base, 0);
-
 	lcd_init(lcd_base);		/* LCD initialization */
+#ifndef CONFIG_LCD_NOSTDOUT
+	struct stdio_dev lcddev;
+	int rc;
 
 	/* Device initialization */
 	memset(&lcddev, 0, sizeof(lcddev));
@@ -213,6 +212,9 @@ int drv_lcd_init(void)
 	rc = stdio_register(&lcddev);
 
 	return (rc == 0) ? 1 : rc;
+#else
+	return 0;
+#endif
 }
 
 /*----------------------------------------------------------------------*/
-- 
1.7.10.4



More information about the U-Boot mailing list