From patchwork Sun Jun 30 10:12:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederic Leroy X-Patchwork-Id: 255872 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 072AE2C00A8 for ; Sun, 30 Jun 2013 20:13:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3289E4A087; Sun, 30 Jun 2013 12:12:58 +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 GxHnMWcqgjwO; Sun, 30 Jun 2013 12:12:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6EC4A4A03C; Sun, 30 Jun 2013 12:12:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 99E624A041 for ; Sun, 30 Jun 2013 12:12: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 gHPJTSh1NcTS for ; Sun, 30 Jun 2013 12:12:40 +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 sd-34071.dedibox.fr (sd-34071.dedibox.fr [88.191.154.35]) by theia.denx.de (Postfix) with ESMTP id 1616F4A03B for ; Sun, 30 Jun 2013 12:12:33 +0200 (CEST) Received: from sd-34071.dedibox.fr (localhost [127.0.0.1]) by sd-34071.dedibox.fr (Postfix) with ESMTP id BF1CC3FE6C; Sun, 30 Jun 2013 12:12:32 +0200 (CEST) Received: from localhost.localdomain (110.157.122.78.rev.sfr.net [78.122.157.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sd-34071.dedibox.fr (Postfix) with ESMTPSA id 4BA103FE6F; Sun, 30 Jun 2013 12:12:32 +0200 (CEST) From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= To: u-boot@lists.denx.de Date: Sun, 30 Jun 2013 12:12:29 +0200 Message-Id: <1372587149-8220-5-git-send-email-fredo@starox.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1372587149-8220-1-git-send-email-fredo@starox.org> References: <1372587149-8220-1-git-send-email-fredo@starox.org> In-Reply-To: <20130625182403.F02BA380468@gemini.denx.de> References: <20130625182403.F02BA380468@gemini.denx.de> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [U-Boot] [PATCH v2 4/4] arm: add machine ID for CloudBox 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 CloudBox device is device tree compliant, but older LaCie kernel uses machine ID method to boot. Signed-off-by: Frédéric Leroy --- arch/arm/include/asm/mach-types.h | 14 ++++++++++++++ board/LaCie/cloudbox/cloudbox.c | 7 ++++++- include/configs/lacie_kw.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 440b041..071bd11 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_OMAP5_SEVM 3777 #define MACH_TYPE_ARMADILLO_800EVA 3863 #define MACH_TYPE_KZM9G 4140 +#define MACH_TYPE_CLOUDBOX 4170 #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type @@ -14235,6 +14236,19 @@ extern unsigned int __machine_arch_type; # define machine_is_kzm9g() (0) #endif +#ifdef CONFIG_MACH_CLOUDBOX +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_CLOUDBOX +# endif +# define machine_cloudbox() (machine_arch_type == MACH_TYPE_CLOUDBOX) +#else +# define machine_cloudbox() (0) +#endif + + /* * These have not yet been registered */ diff --git a/board/LaCie/cloudbox/cloudbox.c b/board/LaCie/cloudbox/cloudbox.c index e5ee5a3..51b1f96 100644 --- a/board/LaCie/cloudbox/cloudbox.c +++ b/board/LaCie/cloudbox/cloudbox.c @@ -64,7 +64,12 @@ int board_early_init_f(void) int board_init(void) { - /* Nothing to do with fdt */ + /* Machine number */ + gd->bd->bi_arch_number = CONFIG_MACH_TYPE; + + /* Boot parameters address */ + gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100; + return 0; } diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h index 02e0882..b305bf6 100644 --- a/include/configs/lacie_kw.h +++ b/include/configs/lacie_kw.h @@ -22,6 +22,7 @@ * Machine number definition */ #if defined(CONFIG_CLOUDBOX) +#define CONFIG_MACH_TYPE MACH_TYPE_CLOUDBOX #define CONFIG_IDENT_STRING " CloudBox" #elif defined(CONFIG_D2NET_V2) #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2