From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Petermaier Date: Tue, 3 Feb 2015 13:19:38 +0100 Subject: [U-Boot] [PATCH v2] intern: disable lcd-stdout In-Reply-To: <1422965980-3545-1-git-send-email-oe5hpm@oevsv.at> References: <1422965980-3545-1-git-send-email-oe5hpm@oevsv.at> Message-ID: <1422965980-3545-22-git-send-email-oe5hpm@oevsv.at> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de on B&R boards we want not redirect console to screen. Signed-off-by: Hannes Petermaier --- 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