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: 630180 X-Patchwork-Delegate: yamada.m@jp.panasonic.com 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 3rMMX71lVWz9sxS for ; Sat, 4 Jun 2016 23:39:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b=dB3+0OeM; dkim-atps=neutral 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(-) 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();