[U-Boot] [PATCH] lcd: Add support for CONFIG_LCD_NOSTDOUT
Hannes Petermaier
oe5hpm at oevsv.at
Thu Mar 6 15:26:11 CET 2014
- 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 at 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
More information about the U-Boot
mailing list