From patchwork Thu Jul 14 18:02:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Harvey X-Patchwork-Id: 104704 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 12592B6F62 for ; Fri, 15 Jul 2011 04:02:50 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A4FC628083; Thu, 14 Jul 2011 20:02:48 +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 7GBCYjIJ3iMP; Thu, 14 Jul 2011 20:02:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C67FF2807D; Thu, 14 Jul 2011 20:02:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 973D12807D for ; Thu, 14 Jul 2011 20:02:43 +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 Rqj7EYaWVPMy for ; Thu, 14 Jul 2011 20:02:42 +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 mtxmxout1.matrox.com (mtxmxout1.matrox.com [138.11.2.91]) by theia.denx.de (Postfix) with ESMTP id 3E0322807C for ; Thu, 14 Jul 2011 20:02:40 +0200 (CEST) Received: from venus.matrox.com (venus.matrox.com [192.168.1.30]) by mtxmxout1.matrox.com (Postfix) with ESMTP id 98AB245AD12 for ; Thu, 14 Jul 2011 14:02:39 -0400 (EDT) Received: (from ssmsp@localhost) by venus.matrox.com (8.14.4/8.13.2) id p6EI2dEJ022066 for u-boot@lists.denx.de; Thu, 14 Jul 2011 14:02:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by venus.matrox.com (Postfix) with ESMTP id 3D570F4DBF for ; Thu, 14 Jul 2011 14:02:39 -0400 (EDT) X-Virus-MTX-Scanned: by Matrox Virus scanner at venus.matrox.com Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by venus.matrox.com (Postfix) with ESMTP id 227CEF4DB6 for ; Thu, 14 Jul 2011 14:02:39 -0400 (EDT) Received: from harvey-pc.matrox.com (dyn-152-116.matrox.com [192.168.152.116]) by pluton.matrox.com (Postfix) with ESMTP id 12D637F45A for ; Thu, 14 Jul 2011 14:02:39 -0400 (EDT) Date: Thu, 14 Jul 2011 14:02:40 -0400 From: Christopher Harvey To: u-boot@lists.denx.de Message-ID: <20110714180240.GA21529@harvey-pc.matrox.com> References: <20110707143424.GD5438@harvey-pc.matrox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110707143424.GD5438@harvey-pc.matrox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: [U-Boot] [PATCH V3 3/4] ARM: Warn when the machine ID isn't set. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Linux cannot boot without it. Signed-off-by: Christopher Harvey --- V2: Used a #define instead of a constant. Used a printf instead of a debug. --- V3: Moved gd->bd->bi_arch_number = BI_ARCH_NUMBER_INVALID; before the init_sequence loop, so it doesn't overwrite existing values. Removed unneeded braces. Reminder, in V2 of this series there are 3 uncommited patches that have no comments. arch/arm/include/asm/u-boot.h | 2 ++ arch/arm/lib/board.c | 2 ++ arch/arm/lib/bootm.c | 5 +++++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h index ed33327..81735de 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -48,4 +48,6 @@ typedef struct bd_info { } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#define BI_ARCH_NUMBER_INVALID 0xffffffff + #endif /* _U_BOOT_H_ */ diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index fc52a26..1635aa1 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -281,6 +281,8 @@ void board_init_f (ulong bootflag) gd->mon_len = _bss_end_ofs; + gd->bd->bi_arch_number = BI_ARCH_NUMBER_INVALID; + for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { hang (); diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 802e833..8e75b5a 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -113,6 +113,11 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) printf ("Using machid 0x%x from environment\n", machid); } +#ifdef DEBUG + if (machid == BI_ARCH_NUMBER_INVALID) + printf("Warning: machid not set.\n"); +#endif + show_boot_progress (15); #ifdef CONFIG_OF_LIBFDT