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 C53CFC19F2D for ; Tue, 9 Aug 2022 12:45:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DC3F84A02; Tue, 9 Aug 2022 14:45:30 +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="fD51Hfsh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98E5484A0C; Tue, 9 Aug 2022 14:45:27 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 2B910849FA for ; Tue, 9 Aug 2022 14:45:24 +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=kabel@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 C5F87B8118F; Tue, 9 Aug 2022 12:45:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FE98C433D6; Tue, 9 Aug 2022 12:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660049122; bh=N6pkj9tC7LiVwnPBOwLxhbZSCxg9pKTmDmwVP99Y+DE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fD51HfshNbJ2xwtQt+WarwrWMHp293+J3E9r2u132OsYEATUSGFmLfKlbAWNgfsRj 2EwQhcpgAU0bVT/qNgDoCZgCK229Rmfcw8cT3DSfIfxjPqm7F38cWTICDy69DRWDO1 02QXRi/EOKtv33qusNl8Xcj8F90PyFwB05KgoIO8jcr+tVhPLp8+Ww8z7dNA62fRj7 pdjC0fHG9HN/SwhMumzaTQu9G1o0cEs2lA6dw3iV7mp/IJnX2SB6Tq01Qqe2p2YOnI 59JAFsBQ7VzrmG6x1b2/OhFh07po+rbFJX5jGXHEJS0aV1bA29OKtaWciPDaPpFA2y Xo70Qpf5bvBmg== Date: Tue, 9 Aug 2022 14:45:03 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Stefan Roese , u-boot@lists.denx.de Subject: Re: [PATCH] arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL Message-ID: <20220809144503.4b2821ab@thinkpad> In-Reply-To: <20220809092709.7orpir5wreud5bxs@pali> References: <20220808171343.10176-1-pali@kernel.org> <20220809112012.5edd7f65@thinkpad> <20220809092709.7orpir5wreud5bxs@pali> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Tue, 9 Aug 2022 11:27:09 +0200 Pali Roh=C3=A1r wrote: > On Tuesday 09 August 2022 11:20:12 Marek Beh=C3=BAn wrote: > > On Mon, 8 Aug 2022 19:13:43 +0200 > > Pali Roh=C3=A1r wrote: > > =20 > > > SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by = BootROM. > > > Proper U-Boot removes this direct mapping. So it is available only in= SPL. > > > This applies for all 32-bit Armada BootROMs. SPL mvebu code is used o= nly on > > > 32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris > > > Omnia board to common SPL mvebu code and add proper checks for SPI0 C= S0. > > >=20 > > > Signed-off-by: Pali Roh=C3=A1r =20 > >=20 > > Do we know that this will work for all flash memories used on those > > other boards? Some boards may have non-compliant SPI-NORs soldered on. > >=20 > > But if BootROM on those boards also uses this mapping to read flash, it > > should be okay... =20 >=20 > IIRC this range is used by BootROM for reading SPL. >=20 > Ok, I can imagine some very special configuration where SPL kwbimage is > stored on eMMC, eMMC is used for BootROM booting, but ENV is stored on > non-standard SPI flash, which BootROM cannot access, but U-Boot yes. >=20 > So maybe I should add another #ifdef guard e.g. ? >=20 > #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI I don't think such non-standard configurations are used :) Lets do that only if someone complains. Marek