From patchwork Wed Apr 11 10:38:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume GARDET X-Patchwork-Id: 897135 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40LgYN4JFDz9s3B for ; Wed, 11 Apr 2018 20:40:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4561FC21DAF; Wed, 11 Apr 2018 10:39:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8B10DC21C2F; Wed, 11 Apr 2018 10:39:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 30C45C21DE8; Wed, 11 Apr 2018 10:39:14 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by lists.denx.de (Postfix) with ESMTPS id 3C122C21DB5 for ; Wed, 11 Apr 2018 10:39:11 +0000 (UTC) Received: from localhost.localdomain (unknown [82.244.147.214]) by smtp2-g21.free.fr (Postfix) with ESMTP id 5408C2003CB; Wed, 11 Apr 2018 12:39:10 +0200 (CEST) From: Guillaume GARDET To: u-boot@lists.denx.de Date: Wed, 11 Apr 2018 12:38:48 +0200 Message-Id: <20180411103850.13539-2-guillaume.gardet@free.fr> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180411103850.13539-1-guillaume.gardet@free.fr> References: <20180409063941.7754-1-guillaume.gardet@free.fr> <20180411103850.13539-1-guillaume.gardet@free.fr> Cc: Fabio Estevam , Gary Bisson , Guillaume GARDET Subject: [U-Boot] [PATCH V3 1/3] imx6: Define 'soc' env var for imx6 SoC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Guillaume GARDET Cc: Troy Kisky Cc: Stefano Babic Cc: Fabio Estevam Cc: Gary Bisson --- arch/arm/mach-imx/mx6/soc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 9b3d8f69b2..c4cb752c76 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -446,6 +446,40 @@ int arch_cpu_init(void) return 0; } + #ifdef CONFIG_ARCH_MISC_INIT + int arch_misc_init(void) + { + #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG + if (is_cpu_type(MXC_CPU_MX6QP)) + env_set("soc", "imx6qp"); + else if (is_cpu_type(MXC_CPU_MX6Q)) + env_set("soc", "imx6q"); + else if (is_cpu_type(MXC_CPU_MX6DP)) + env_set("soc", "imx6dp"); + else if (is_cpu_type(MXC_CPU_MX6D)) + env_set("soc", "imx6d"); + else if (is_mx6dl( )) + env_set("soc", "imx6dl"); + else if (is_mx6sx( )) + env_set("soc", "imx6sx"); + else if (is_mx6sl( )) + env_set("soc", "imx6sl"); + else if (is_mx6solo( )) + env_set("soc", "imx6solo"); + else if (is_mx6ul( )) + env_set("soc", "imx6ul"); + else if (is_mx6ull( )) + env_set("soc", "imx6ull"); + else if (is_mx6sll( )) + env_set("soc", "imx6sll"); + else + env_set("soc", "imx6"); + #endif + + return 0; + } + #endif + #ifdef CONFIG_ENV_IS_IN_MMC __weak int board_mmc_get_env_dev(int devno) {