From patchwork Thu Oct 27 14:47:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 79697 Delivered-To: patch@linaro.org Received: by 10.80.142.83 with SMTP id 19csp686320edx; Thu, 27 Oct 2016 07:49:44 -0700 (PDT) X-Received: by 10.28.173.141 with SMTP id w135mr7849830wme.90.1477579784090; Thu, 27 Oct 2016 07:49:44 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id f10si8958013wjl.93.2016.10.27.07.49.43; Thu, 27 Oct 2016 07:49:44 -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 651924B9F9; Thu, 27 Oct 2016 16:48:35 +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 FKAR9hDGP3d9; Thu, 27 Oct 2016 16:48:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C2E2B3845; Thu, 27 Oct 2016 16:48:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C1B48A756F for ; Thu, 27 Oct 2016 16:47:50 +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 BFwoUGPK45cJ for ; Thu, 27 Oct 2016 16:47:50 +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-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by theia.denx.de (Postfix) with ESMTPS id 59295B382B for ; Thu, 27 Oct 2016 16:47:48 +0200 (CEST) Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-07.nifty.com with ESMTP id u9RElDVP017011; Thu, 27 Oct 2016 23:47:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u9RElDVP017011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1477579645; bh=w5b/k+3lkqe19KvtD3sW5P/ftkog713smL7tPjIBXKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KEtgKF5mC13wzsoQPf4Z1iHnvL+hLQv6bup7brR6OEpzki5uR3WZonHVDPkJmY88U ngijzs3YxC7P/YZxr4A1Pwha1NZsrMayNJ6kppygOvtKGFXujCOcpNZWsfvOOVudTy wZwm81yWAj9yeQ/bQuOdRi131lWo9BUVqFrpwY3c4U5xmRuPw3gMyA0bG3hMHFvYF8 TKXWzB7rCWTvz9xQQrfxChZsymepHxAdIV5Bt86ARRXUUgwJ2kekFUVG/NnlrJbJTD nHz24+e5/WY8+HJUqNTxk98Yuq2L5WxVSxx9wDfvKNPeM/0u32EY0GEKyEI53A6dpD 4qja4MApSgPag== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 27 Oct 2016 23:47:06 +0900 Message-Id: <1477579630-9692-8-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477579630-9692-1-git-send-email-yamada.masahiro@socionext.com> References: <1477579630-9692-1-git-send-email-yamada.masahiro@socionext.com> Cc: Albert Aribaud Subject: [U-Boot] [PATCH 07/11] ARM: uniphier: do not run harmful code for USB boot mode of LD11 ES3 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" The USB boot without the stand-by MPU is available on ES3 or later of LD11 SoC, but the code in this if-conditional block must not be run when booting from USB. Check if the boot device is USB, and skip the code in the case. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/clk/clk-ld11.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 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/clk/clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-ld11.c index ca8737d..58069cb 100644 --- a/arch/arm/mach-uniphier/clk/clk-ld11.c +++ b/arch/arm/mach-uniphier/clk/clk-ld11.c @@ -5,18 +5,20 @@ */ #include +#include #include #include +#include "../boot-mode/boot-device.h" #include "../init.h" #include "../sc64-regs.h" #include "../sg-regs.h" void uniphier_ld11_clk_init(void) { - if (readl(SG_PINMON0) & BIT(27)) { - /* if booted without stand-by MPU */ - + /* if booted from a device other than USB, without stand-by MPU */ + if ((readl(SG_PINMON0) & BIT(27)) && + spl_boot_device_raw() != BOOT_DEVICE_USB) { writel(1, SG_ETPHYPSHUT); writel(1, SG_ETPHYCNT);