From patchwork Tue May 31 12:57:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 68930 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1934251qge; Tue, 31 May 2016 05:57:07 -0700 (PDT) X-Received: by 10.194.117.3 with SMTP id ka3mr31708863wjb.38.1464699427836; Tue, 31 May 2016 05:57:07 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id el5si50537954wjd.31.2016.05.31.05.57.07; Tue, 31 May 2016 05:57:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1DBB3A7535; Tue, 31 May 2016 14:57:07 +0200 (CEST) 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 RMcLrabQbn3O; Tue, 31 May 2016 14:57:06 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 935C3A74D6; Tue, 31 May 2016 14:57:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BB318A74D6 for ; Tue, 31 May 2016 14:56:56 +0200 (CEST) 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 Y4nd8FyN1q5w for ; Tue, 31 May 2016 14:56:56 +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 conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by theia.denx.de (Postfix) with ESMTPS id 08645A7498 for ; Tue, 31 May 2016 14:56:52 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id u4VCuRuA009578; Tue, 31 May 2016 21:56:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u4VCuRuA009578 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1464699388; bh=M7D5nNYzhz+MAmgEg4f4q7H5K74KgYXixgPC/iSFUyg=; h=From:To:Cc:Subject:Date:From; b=PYjj/xZL826pWysYcJBWHPZHf0zyPn25NspOmWbpQG++CuPM7sonSAXjOEsJHONQI W7cXHzPpi/ZHLxrXk1NCEzoFGIe8n2+ZAMp4sa670tmA7j8p4j3sVM3TnoNmZt/Gvg WlgMub6yVHUBmEEudgmWADhK831rpx5RV9N2whBhnxxUJRewde4TUgkCluRaLz51PJ 1vmBiKG0figXGbqVHlVo/EJZo7am6M7lKvgZRzHjdKiARnQN359ZzrtbpoYzPrK3Ev eVhdfMnS03/YeH7uHlwnqvz9wuS1r5VJywmOWqCAcCRXNR9WEjUrNNa1Eu5rsxcloD 43+udrD9SmsXg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 31 May 2016 21:57:40 +0900 Message-Id: <1464699461-8743-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] ARM: uniphier: do not overwrite fdt_file environment X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" This code auto-detects the best-match FDT file name, but it should respect the user's choice if "fdt_file" environment is found in a non-volatile device. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/board_late_init.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 845f047..eabf2b5 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -39,6 +39,9 @@ static int uniphier_set_fdt_file(void) int buf_len = 256; int ret; + if (getenv("fdt_file")) + return 0; /* do nothing if it is already set */ + ret = fdt_get_string(gd->fdt_blob, 0, "compatible", &compat); if (ret) return -EINVAL;