From patchwork Fri Mar 24 03:34:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 743048 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3vq8Q60kPYz9s82 for ; Fri, 24 Mar 2017 14:42:54 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id AD869C21C60; Fri, 24 Mar 2017 03:42:33 +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 3B921C21C68; Fri, 24 Mar 2017 03:42:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AED37C21C31; Fri, 24 Mar 2017 03:41:59 +0000 (UTC) Received: from ussmtp01.atmel.com (nasmtp01.atmel.com [192.199.1.245]) by lists.denx.de (Postfix) with ESMTPS id BD6DBC21C46 for ; Fri, 24 Mar 2017 03:41:54 +0000 (UTC) Received: from apsmtp01.atmel.com (10.168.254.30) by DVREDG01.corp.atmel.com (10.42.103.30) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 23 Mar 2017 21:41:46 -0600 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.corp.atmel.com (10.168.254.30) with Microsoft SMTP Server id 14.3.235.1; Fri, 24 Mar 2017 11:46:56 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Fri, 24 Mar 2017 11:34:03 +0800 Message-ID: <20170324033406.16457-2-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170324033406.16457-1-wenyou.yang@atmel.com> References: <20170324033406.16457-1-wenyou.yang@atmel.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 1/4] ARM: at91: spl: specify MMC and NAND boot device 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When OF_CONTROL is enabled, MMC boot device should not be detected automatically, it should be MMC1 fixedly only the status "enabled" is available. Add NAND Flash boot device as well. Signed-off-by: Wenyou Yang --- Changes in v2: None arch/arm/mach-at91/spl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c index 98f280cbf7..e113336b7b 100644 --- a/arch/arm/mach-at91/spl.c +++ b/arch/arm/mach-at91/spl.c @@ -39,12 +39,16 @@ u32 spl_boot_device(void) #if defined(CONFIG_SYS_USE_MMC) if (dev == ATMEL_SAMA5_BOOT_FROM_MCI) { +#if defined(CONFIG_SPL_OF_CONTROL) + return BOOT_DEVICE_MMC1; +#else if (off == 0) return BOOT_DEVICE_MMC1; if (off == 1) return BOOT_DEVICE_MMC2; printf("ERROR: MMC controller %i not present!\n", dev); hang(); +#endif } #endif @@ -53,6 +57,9 @@ u32 spl_boot_device(void) return BOOT_DEVICE_SPI; #endif + if (dev == ATMEL_SAMA5_BOOT_FROM_SMC) + return BOOT_DEVICE_NAND; + if (dev == ATMEL_SAMA5_BOOT_FROM_SAMBA) return BOOT_DEVICE_USB;