From patchwork Fri Aug 2 20:26:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 264336 X-Patchwork-Delegate: trini@ti.com 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 5ECED2C0092 for ; Sat, 3 Aug 2013 06:28:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F023A4A090; Fri, 2 Aug 2013 22:27:42 +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 IJFAiMxHtBFN; Fri, 2 Aug 2013 22:27:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 52D604A037; Fri, 2 Aug 2013 22:27:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 730C24A01E for ; Fri, 2 Aug 2013 22:26:52 +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 c-o6DfGmtP4e for ; Fri, 2 Aug 2013 22:26:46 +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 mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by theia.denx.de (Postfix) with ESMTPS id 303324A027 for ; Fri, 2 Aug 2013 22:26:31 +0200 (CEST) Received: by mail-qc0-f173.google.com with SMTP id z10so574754qcx.32 for ; Fri, 02 Aug 2013 13:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=I6liXU6TbfLe95TPK+HkZ+3BEI34AtF/liKI9CrDkRs=; b=WvYZVWri8nPRA+yH6mSjlDvCuN/hCMPBSIOfZB0PFP3jCPacQJ3KmIKOZH7rdCu4CB iCXwpnzHEvVW4+ZZxVOdtc8Dp4lDScq/Yn5fq/c8BJt4SnDn+xqzdP+XHvQk5kiVC11L hqrJ+N30gXhKRIiBD90QqKUq/aIBwkumIXiCAWy6LYm3aG/65Mr9e4PY+rP00ZYQupjv lzuOZo0ISyMCuhOe1THswRz2zyRYBvVGtlFiDHeK4hKSLOkFL9TH4e6BFeMlSV38PJoZ 2z3N/BfL4K1sTD7uPcjB2T0JZkhcQFg5xDflkiLF0atLERp9HwEoGDjssZLDEk3zRaLj fORg== X-Received: by 10.49.104.163 with SMTP id gf3mr11428895qeb.73.1375475189108; Fri, 02 Aug 2013 13:26:29 -0700 (PDT) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPSA id i12sm7300169qej.1.2013.08.02.13.26.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 Aug 2013 13:26:28 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 2 Aug 2013 16:26:10 -0400 Message-Id: <1375475175-5073-6-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375475175-5073-1-git-send-email-trini@ti.com> References: <1375475175-5073-1-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH 05/10] arm: spl: For Falcon Mode, set a default machid of ~0 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 With device trees, boards do not always set CONFIG_MACH_TYPE now, so we must not rely on this define being set. The kernel uses ~0 to see if we have a valid machine number or not, so set that as the default, invalid machine, id and only fix if CONFIG_MACH_TYPE is set. Cc: Albert ARIBAUD Signed-off-by: Tom Rini Tested-by: Heiko Schocher Acked-by: Dan Murphy Reviewed-by: Dan Murphy --- arch/arm/lib/spl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index 583bdb3..26d0be4 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -45,12 +45,17 @@ void __weak board_init_f(ulong dummy) #ifdef CONFIG_SPL_OS_BOOT void __noreturn jump_to_image_linux(void *arg) { + unsigned long machid = 0xffffffff; +#ifdef CONFIG_MACH_TYPE + machid = CONFIG_MACH_TYPE; +#endif + debug("Entering kernel arg pointer: 0x%p\n", arg); typedef void (*image_entry_arg_t)(int, int, void *) __attribute__ ((noreturn)); image_entry_arg_t image_entry = (image_entry_arg_t) spl_image.entry_point; cleanup_before_linux(); - image_entry(0, CONFIG_MACH_TYPE, arg); + image_entry(0, machid, arg); } #endif