[PATCH] arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL

Stefan Roese sr at denx.de
Tue Aug 9 15:12:48 CEST 2022


On 09.08.22 14:45, Marek Behún wrote:
> On Tue, 9 Aug 2022 11:27:09 +0200
> Pali Rohár <pali at kernel.org> wrote:
> 
>> On Tuesday 09 August 2022 11:20:12 Marek Behún wrote:
>>> On Mon,  8 Aug 2022 19:13:43 +0200
>>> Pali Rohár <pali at kernel.org> wrote:
>>>    
>>>> 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 only 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 CS0.
>>>>
>>>> Signed-off-by: Pali Rohár <pali at kernel.org>
>>>
>>> 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.
>>>
>>> But if BootROM on those boards also uses this mapping to read flash, it
>>> should be okay...
>>
>> IIRC this range is used by BootROM for reading SPL.
>>
>> 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.
>>
>> So maybe I should add another #ifdef guard e.g. ?
>>
>>    #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI
> 
> I don't think such non-standard configurations are used :) Lets do that
> only if someone complains.

Agreed.

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan


More information about the U-Boot mailing list