From patchwork Thu Nov 1 23:42:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 196416 X-Patchwork-Delegate: albert.aribaud@free.fr 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 AAE082C0343 for ; Fri, 2 Nov 2012 10:43:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 78F654A69D; Fri, 2 Nov 2012 00:43:34 +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 SR6E4vOW0jqg; Fri, 2 Nov 2012 00:43:34 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FB244A69F; Fri, 2 Nov 2012 00:43:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D43764A68B for ; Fri, 2 Nov 2012 00:43:18 +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 H7nXXaZWBi0L for ; Fri, 2 Nov 2012 00:43:18 +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 mail-qa0-f74.google.com (mail-qa0-f74.google.com [209.85.216.74]) by theia.denx.de (Postfix) with ESMTPS id EC4AD4A68C for ; Fri, 2 Nov 2012 00:43:16 +0100 (CET) Received: by mail-qa0-f74.google.com with SMTP id a16so116179qae.3 for ; Thu, 01 Nov 2012 16:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=G9NJjjcODEF6Xt8RtzIA46S/SnH9xb9POKaQR4ZUqrk=; b=faO+LI0Ds4AbFd5s7hyq2oHRIxXM517xKdDD8Rf1GisUDzdWJoNX24VhB3f2kzBIGb gVT/UDvW7XvvU+M4VX7HcmpfxmxL7t1KJVnj0VxxaCGbuqS5Ykv/1hhyMydZg6gHjT3x 3IZZbojuR4ogfyd5WtGEPE38y2ZrOrwaKld5OvC5C7tzqWInStYnH6vL70MT0Yrq8Z3M lSDnew7Qd2AqUrbAxofduE/utpm1RoBe71lMi82lffIOL0S2UIHU//b03ePSb+uRMQ02 GftiNSTAnOBswHbkWyERoc5Fb+w9u3k28xZX3hcauFka/r+KyVNmLbD1ovuHiIQsoDx/ 1uIQ== Received: by 10.101.176.10 with SMTP id d10mr7320anp.12.1351813395336; Thu, 01 Nov 2012 16:43:15 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id l20si531361yhi.2.2012.11.01.16.43.15 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 01 Nov 2012 16:43:15 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id D0FBF10004A; Thu, 1 Nov 2012 16:43:14 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 843E1160DFF; Thu, 1 Nov 2012 16:43:14 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 1 Nov 2012 16:42:06 -0700 Message-Id: <1351813330-23741-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1351813330-23741-1-git-send-email-sjg@chromium.org> References: <1351813330-23741-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmfn/YUI0zCiZ7Pfv/EA9CYGcwtimeFkyYMFWJkclXiwQbrDPKGjcijvDJLluptxLiLtXgxpoxDNocQJsgl6qEAJJkyeusnAmNuEUliHwXLs9EGowMyD/qsVnbT+p6odK90iKPsXKcCbygZkJwzC2Bdo/nUn63NzkDPWFGYXVd9SrcnQHIKgKR1FHtJcujptBR/8cR5 Subject: [U-Boot] [PATCH 06/10] arm: Add CONFIG_DISPLAY_BOARDINFO_LATE to display board info on LCD 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 This option displays board info after stdio is running, so that it will appear on the LCD. If it is displayed earlier, the board info will appear on the serial console but not on the LCD. Signed-off-by: Simon Glass --- README | 9 +++++++++ arch/arm/lib/board.c | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/README b/README index 589e22a..76a8436 100644 --- a/README +++ b/README @@ -3290,6 +3290,15 @@ use the "saveenv" command to store a valid environment. space for already greatly restricted images, including but not limited to NAND_SPL configurations. +- CONFIG_DISPLAY_BOARDINFO + Display information about the board that U-Boot is running on + when U-Boot starts up. + +- CONFIG_DISPLAY_BOARDINFO_LATE + Similar to the previous option, but display this information + later, once stdio is running and output goes to the LCD, if + present. + Low Level (hardware related) configuration options: --------------------------------------------------- diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index d3053d8..b879507 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -491,6 +491,16 @@ static int should_load_env(void) #endif } +#if defined(CONFIG_DISPLAY_BOARDINFO_LATE) && defined(CONFIG_OF_CONTROL) +static void display_fdt_model(const void *blob) +{ + const char *model; + + model = (char *)fdt_getprop(blob, 0, "model", NULL); + printf("Model: %s\n", model ? model : ""); +} +#endif + /************************************************************************ * * This is the next part if the initialization sequence: we are now @@ -617,6 +627,15 @@ void board_init_r(gd_t *id, ulong dest_addr) console_init_r(); /* fully init console as a device */ +#ifdef CONFIG_DISPLAY_BOARDINFO_LATE +# ifdef CONFIG_OF_CONTROL + /* Put this here so it appears on the LCD, now it is ready */ + display_fdt_model(gd->fdt_blob); +# else + checkboard(); +# endif +#endif + #if defined(CONFIG_ARCH_MISC_INIT) /* miscellaneous arch dependent initialisations */ arch_misc_init();