From patchwork Sun Aug 20 13:46:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 803707 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xZyms04d5z9sNv for ; Sun, 20 Aug 2017 23:47:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 34E63C21FCA; Sun, 20 Aug 2017 13:47:13 +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=none 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 1E6F8C21D19; Sun, 20 Aug 2017 13:47:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0555DC21D19; Sun, 20 Aug 2017 13:47:09 +0000 (UTC) Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by lists.denx.de (Postfix) with ESMTPS id 7C5D8C21C40 for ; Sun, 20 Aug 2017 13:47:09 +0000 (UTC) Received: from sapphire.tkos.co.il (unknown [10.0.4.3]) by mx.tkos.co.il (Postfix) with ESMTPA id 2D57B440583; Sun, 20 Aug 2017 16:47:07 +0300 (IDT) From: Baruch Siach To: Prafulla Wadaskar , Luka Perkov , Stefan Roese Date: Sun, 20 Aug 2017 16:46:56 +0300 Message-Id: <720dccfe4e8bfa63d0e9bf8a00cd425383780582.1503236817.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.14.1 Cc: u-boot@lists.denx.de, Baruch Siach Subject: [U-Boot] [PATCH 1/2] arm: mvebu: fix boot from UART on ClearFog Base 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" The ClearFog Base boot from UART when setting the DIP switches to 01001. Unfortunately, the SPL code sometimes fails to detect the UART boot method at run-time. Add an alternative SAR UART boot value to fix this. Signed-off-by: Baruch Siach --- arch/arm/mach-mvebu/include/mach/soc.h | 1 + arch/arm/mach-mvebu/spl.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index 0900e4008c12..44bac63b4447 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -139,6 +139,7 @@ #define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS) #define BOOT_FROM_UART 0x28 +#define BOOT_FROM_UART_ALT 0x3f #define BOOT_FROM_SPI 0x32 #define BOOT_FROM_MMC 0x30 #define BOOT_FROM_MMC_ALT 0x31 diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 3cf02a54cea2..4b9c41360589 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -42,6 +42,7 @@ static u32 get_boot_device(void) return BOOT_DEVICE_MMC1; #endif case BOOT_FROM_UART: + case BOOT_FROM_UART_ALT: return BOOT_DEVICE_UART; case BOOT_FROM_SPI: default: