From patchwork Sun Nov 8 15:11:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Kiryanov X-Patchwork-Id: 541451 X-Patchwork-Delegate: trini@ti.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 73E591402D9 for ; Mon, 9 Nov 2015 02:14:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=compulab.co.il header.i=@compulab.co.il header.b=2DCJMtxq; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D321A4BF41; Sun, 8 Nov 2015 16:13:06 +0100 (CET) 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 weR_ee1JxVIJ; Sun, 8 Nov 2015 16:13:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD66E4BED8; Sun, 8 Nov 2015 16:12:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B4B204BE55 for ; Sun, 8 Nov 2015 16:12:08 +0100 (CET) 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 MxzWX8E2sApK for ; Sun, 8 Nov 2015 16:12:08 +0100 (CET) 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 compulab.co.il (softlayer.compulab.co.il [50.23.254.55]) by theia.denx.de (Postfix) with ESMTPS id 306804BE59 for ; Sun, 8 Nov 2015 16:12:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=compulab.co.il; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From; bh=vRtjZgBaCew/F2io7QWXgPDTgz1kfTqXIGdntcOPWVg=; b=2DCJMtxqvwXM8 tEVneceJ4d2E/AJ+dT+a8DrzpkouXhNpzRrdVp+xk40ooo9cfbYZ2gFgFExjNTbEpqM1nYSZXvgV1 f0gs9JyWxrhd9SRRs/kx/JX3YW7ZFit5yCDnlwYEL3pVrv4TaWyICuNH0P9SU83jl7B9ZC5yUNqjP UNN8=; Received: from [62.90.235.247] (port=45558 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.86) (envelope-from ) id 1ZvRdS-0006gE-Tf; Sun, 08 Nov 2015 17:12:03 +0200 Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 0E305483750; Sun, 8 Nov 2015 17:12:02 +0200 (IST) Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hw3FX6Zhi8Fl; Sun, 8 Nov 2015 17:12:01 +0200 (IST) Received: from localhost (localhost [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 1A7B8483774; Sun, 8 Nov 2015 17:12:01 +0200 (IST) X-Virus-Scanned: amavisd-new at zimbra-mta.compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Z9W9gFqqY-Mw; Sun, 8 Nov 2015 17:12:01 +0200 (IST) Received: from skynet.compulab.local (nikita-pc.compulab.local [192.168.11.211]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id E61CF483779; Sun, 8 Nov 2015 17:12:00 +0200 (IST) From: Nikita Kiryanov To: u-boot@lists.denx.de Date: Sun, 8 Nov 2015 17:11:53 +0200 Message-Id: <1446995514-26357-13-git-send-email-nikita@compulab.co.il> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446995514-26357-1-git-send-email-nikita@compulab.co.il> References: <1446995514-26357-1-git-send-email-nikita@compulab.co.il> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_recent_authed_mail_ips_text_entry: nikita@compulab.co.il|compulab.co.il X-Authenticated-Sender: softlayer.compulab.co.il: nikita@compulab.co.il Cc: Tom Rini Subject: [U-Boot] [PATCH V4 12/13] arm: mx6: cm-fx6: define fallback boot devices for spl 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" Use spl alternate boot device feature to define fallback to the main boot device as it is defined by hardware. Signed-off-by: Nikita Kiryanov Cc: Igor Grinberg Cc: Stefano Babic Cc: Tom Rini Reviewed-by: Tom Rini Reviewed-by: Stefano Babic --- Changes in V4: - No changes. Changes in V3: - No changes. Changes in V2: - No changes. board/compulab/cm_fx6/spl.c | 19 ++++++++++--------- include/configs/cm_fx6.h | 1 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index d94ced9..d8328fd 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -337,16 +337,17 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void spl_board_init(void) +void board_boot_order(u32 *spl_boot_list) { - u32 boot_device = spl_boot_device(); - - if (boot_device == BOOT_DEVICE_SPI) - puts("Booting from SPI flash\n"); - else if (boot_device == BOOT_DEVICE_MMC1) - puts("Booting from MMC\n"); - else - puts("Unknown boot device\n"); + spl_boot_list[0] = spl_boot_device(); + switch (spl_boot_list[0]) { + case BOOT_DEVICE_SPI: + spl_boot_list[1] = BOOT_DEVICE_MMC1; + break; + case BOOT_DEVICE_MMC1: + spl_boot_list[1] = BOOT_DEVICE_SPI; + break; + } } #ifdef CONFIG_SPL_MMC_SUPPORT diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 0513204..180ea28 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -230,7 +230,6 @@ /* SPL */ #include "imx6_spl.h" -#define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_MMC_SUPPORT #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */ #define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024)