From patchwork Sat Jun 4 13:39:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 69323 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp714629qgf; Sat, 4 Jun 2016 06:39:47 -0700 (PDT) X-Received: by 10.194.200.129 with SMTP id js1mr7093610wjc.82.1465047587041; Sat, 04 Jun 2016 06:39:47 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id z65si6173040wmg.40.2016.06.04.06.39.46; Sat, 04 Jun 2016 06:39:47 -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 45792A74D2; Sat, 4 Jun 2016 15:39:45 +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 xscPIvFyGlAD; Sat, 4 Jun 2016 15:39:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A19354BE95; Sat, 4 Jun 2016 15:39:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D2E1D4BED0 for ; Sat, 4 Jun 2016 15:39:39 +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 Kf7J2mSEkB6t for ; Sat, 4 Jun 2016 15:39:39 +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-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by theia.denx.de (Postfix) with ESMTPS id 1ED074BDE9 for ; Sat, 4 Jun 2016 15:39:34 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-12.nifty.com with ESMTP id u54DdCGN024904; Sat, 4 Jun 2016 22:39:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u54DdCGN024904 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465047557; bh=snUwWNjJL/Mel0kvaTmX054wThaAlRkV7JeSqO/Ssfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dB3+0OeMvvS4kj75Poomck9ntoPoNeh/t1uocBgrCSBqEbBQn7WwM9Pln98v4xhb/ ouXTbQtREopCgrukaL30VHh7xVfyBgoK0Gb4JJ4jgDvDdoE608XBug+comNJmkpNuY O8FKs/oU/loeZ8zR9l+dGth1LYDJ6n/ytHnWcJmUAzi51PqdCBoropHkqnSTFQYGZH 2R8iWK64VJH/bC5MSJ6Sd3Ze0tn6zEQ9AAeOLlIFYSLlm955DNZZDz6zwQZXdht5JA WzlQ8TMsDJI/CKfgDYbaZ0IOHsZ1Ym1BZzl1MdXs/JHmgiQCCIzVhp+IQq+1/s51GR qcSRJYVNxAZZg== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 4 Jun 2016 22:39:09 +0900 Message-Id: <1465047549-8375-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465047549-8375-1-git-send-email-yamada.masahiro@socionext.com> References: <1465047549-8375-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 2/2] ARM: uniphier: fix boot mode for PH1-LD11 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 function is shared between PH1-LD11 and PH1-LD20. The difference is the boot-mode latch for the USB boot mode. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 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/boot-mode/boot-mode-ld20.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c index 96a1270..24255a0 100644 --- a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c +++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld20.c @@ -9,6 +9,7 @@ #include #include "../sg-regs.h" +#include "../soc-info.h" #include "boot-device.h" static struct boot_device_info boot_device_table[] = { @@ -54,8 +55,24 @@ static int get_boot_mode_sel(void) u32 uniphier_ld20_boot_device(void) { int boot_mode; + u32 usb_boot_mask; - if (~readl(SG_PINMON0) & 0x00000780) + switch (uniphier_get_soc_type()) { +#if defined(CONFIG_ARCH_UNIPHIER_LD11) + case SOC_UNIPHIER_LD11: + usb_boot_mask = 0x00000080; + break; +#endif +#if defined(CONFIG_ARCH_UNIPHIER_LD20) + case SOC_UNIPHIER_LD20: + usb_boot_mask = 0x00000780; + break; +#endif + default: + BUG(); + } + + if (~readl(SG_PINMON0) & usb_boot_mask) return BOOT_DEVICE_USB; boot_mode = get_boot_mode_sel();