From patchwork Sat Aug 3 05:22:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 264390 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 A431D2C0087 for ; Sat, 3 Aug 2013 15:24:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 771814A046; Sat, 3 Aug 2013 07:23:46 +0200 (CEST) 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 sOxTRD0+h+cL; Sat, 3 Aug 2013 07:23:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 72BD94A047; Sat, 3 Aug 2013 07:23:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E0434A023 for ; Sat, 3 Aug 2013 07:23:08 +0200 (CEST) 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 OZUpdztwKNkS for ; Sat, 3 Aug 2013 07:23:08 +0200 (CEST) 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 pollux.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by theia.denx.de (Postfix) with ESMTP id 635FF4A021 for ; Sat, 3 Aug 2013 07:23:01 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id A7A1F243B; Sat, 3 Aug 2013 07:22:59 +0200 (CEST) From: Heiko Schocher To: u-boot@lists.denx.de Date: Sat, 3 Aug 2013 07:22:53 +0200 Message-Id: <1375507373-13785-8-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1375507373-13785-1-git-send-email-hs@denx.de> References: <1375507373-13785-1-git-send-email-hs@denx.de> MIME-Version: 1.0 Cc: Heiko Schocher Subject: [U-Boot] =?utf-8?q?=5BPATCH_7/7=5D_video=3A_add_an_option_to_skip?= =?utf-8?q?_cfb_console_init?= 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch add an option to skip cfb console init for boards who want to show a logo, but not use the cfb console. This is needed for the siemens boards, which have a bmp bootlogo, but do not need the cfb console. Signed-off-by: Heiko Schocher Cc: Anatolij Gustschin --- drivers/video/cfb_console.c | 18 ++++++++++++++++++ 1 Datei geändert, 18 Zeilen hinzugefügt(+) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 96ef8f9..822ed28 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -431,6 +431,19 @@ static const int video_font_draw_table32[16][4] = { {0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff} }; +/* + * Implement a weak default function for boards that optionally + * need to skip the cfb initialization. + */ +int __board_cfb_skip(void) +{ + /* As default, don't skip cfb init */ + return 0; +} + +int board_cfb_skip(void) + __attribute__ ((weak, alias("__board_cfb_skip"))); + static void video_drawchars(int xx, int yy, unsigned char *s, int count) { u8 *cdat, *dest, *dest0; @@ -1996,6 +2009,8 @@ static void *video_logo(void) return video_fb_address + video_logo_height * VIDEO_LINE_LEN; } #endif + if (board_cfb_skip()) + return 0; sprintf(info, " %s", version_string); @@ -2205,6 +2220,9 @@ int drv_video_init(void) /* Init video chip - returns with framebuffer cleared */ skip_dev_init = (video_init() == -1); + if (board_cfb_skip()) + return 0; + #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE) debug("KBD: Keyboard init ...\n"); skip_dev_init |= (VIDEO_KBD_INIT_FCT == -1);