From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31097C00140 for ; Tue, 2 Aug 2022 09:55:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9DFDA84514; Tue, 2 Aug 2022 11:55:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="e60E8n7Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 649AF84507; Tue, 2 Aug 2022 11:55:37 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2C25284507 for ; Tue, 2 Aug 2022 11:55:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BE492B819EF; Tue, 2 Aug 2022 09:55:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A9A5C433D6; Tue, 2 Aug 2022 09:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659434133; bh=+3Qldsy9sSC3OmOcwL4iKwbrYjZYyVF323LmrIQGabs=; h=From:To:Cc:Subject:Date:From; b=e60E8n7QF9entro++6Tvl9AEgvV9D3Iwh2NSkhqMX6lNbK13RSUgZwmEVHtNV9udr t0Ea29O9xG+GJWYXWUBNKttpmXlBqgT0yoXMsokbW/Qbz0ThjA3nhkHkwMr1NX9Id4 tcxU3F0PGlh26v85bS7Vmr9vdssuKuqqhGuChRaTFRUCYNd6iOi+VHbFQVWaaPgSBU NO/ZC/ln/6D6KSYuc//T34am/+s2pR2Onv7z6FuXhQykSJybp6aw12cRm5StLgM2qm Me0/FNwDrQWW2WFLfWFxKYUM3RUFrMPBw+BQ7zcuzBbPpaiT9vpHAwnUbo2NtLiPeh ixNCDFdowJ2fQ== Received: by pali.im (Postfix) id 7BF10F81; Tue, 2 Aug 2022 11:55:30 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Tony Dinh Cc: u-boot@lists.denx.de Subject: [PATCH] arm: mvebu: spl: Always fallback to BootROM boot method Date: Tue, 2 Aug 2022 11:55:19 +0200 Message-Id: <20220802095519.17352-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean BootROM boot method should always work so always add it as fallback method to spl_boot_list. In case U-Boot SPI driver fails it is better to try using BootROM than hanging as by default only one boot method is specified. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/spl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 13c99913c380..bfcba2e73bab 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -271,6 +271,13 @@ u32 spl_boot_device(void) } } +void board_boot_order(u32 *spl_boot_list) +{ + spl_boot_list[0] = spl_boot_device(); + if (spl_boot_list[0] != BOOT_DEVICE_BOOTROM) + spl_boot_list[1] = BOOT_DEVICE_BOOTROM; +} + #else u32 spl_boot_device(void) -- 2.20.1