From patchwork Thu Mar 6 14:26:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Schmelzer X-Patchwork-Id: 327454 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 642422C00D2 for ; Fri, 7 Mar 2014 01:27:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9F5F24B672; Thu, 6 Mar 2014 15:27:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FEXbidYlqJMa; Thu, 6 Mar 2014 15:27:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A04DC4B664; Thu, 6 Mar 2014 15:27:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A5ED64B664 for ; Thu, 6 Mar 2014 15:26:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6LKL2DE+BHzx for ; Thu, 6 Mar 2014 15:26:53 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from s15287728.onlinehome-server.info (hamspirit.at [87.106.47.214]) by theia.denx.de (Postfix) with ESMTP id D29654B662 for ; Thu, 6 Mar 2014 15:26:49 +0100 (CET) Received: from localhost (s15287728.onlinehome-server.info [127.0.0.1]) by s15287728.onlinehome-server.info (Postfix) with ESMTP id C45DB1FC4166; Thu, 6 Mar 2014 14:26:48 +0000 (UTC) Received: from s15287728.onlinehome-server.info ([127.0.0.1]) by localhost (s15287728.onlinehome-server.info [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kRnkWAO7CTiQ; Thu, 6 Mar 2014 14:26:43 +0000 (UTC) Received: from hannes-werkstatt.scm.lan (93-82-12-198.adsl.highway.telekom.at [93.82.12.198]) by s15287728.onlinehome-server.info (Postfix) with ESMTP id 61A0C1FC4165; Thu, 6 Mar 2014 14:26:43 +0000 (UTC) From: Hannes Petermaier To: u-boot@lists.denx.de Date: Thu, 6 Mar 2014 15:26:11 +0100 Message-Id: <1394115971-22079-1-git-send-email-oe5hpm@oevsv.at> X-Mailer: git-send-email 1.7.9.5 Cc: Hannes Petermaier Subject: [U-Boot] [PATCH] lcd: Add support for CONFIG_LCD_NOSTDOUT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de - 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 --- 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 } /*----------------------------------------------------------------------*/