[EXTERNAL] Re: [PATCH 1/2] common: spl: spl_spi: add support for dynamic detection of sf bus
Vaishnav Achath
vaishnav.a at ti.com
Wed May 11 08:03:32 CEST 2022
Hi Heiko,
On 09/05/22 12:49, Heiko Schocher wrote:
> Hello Achat,
>
> On 09.05.22 08:43, Vaishnav Achath wrote:
>> Currently the SPI flash to load from is defined through the compile
>> time config CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS, this
>> prevents the loading of binaries from different SPI flash using the
>> same build.E.g. supporting QSPI flash boot and OSPI flash boot
>> on J721E platform is not possible due to this limitation.
>>
>> This commit adds lookup functions spl_spi_boot_bus()
>> and spl_spi_boot_cs for identifying the flash device based on the
>> selected boot devic, when not overridden the lookup functions are
>> weakly defined in common/spl/spl_spi.c.
>>
>> Signed-off-by: Vaishnav Achath <vaishnav.a at ti.com>
>> ---
>> common/spl/Kconfig | 4 ++++
>> common/spl/spl_spi.c | 19 +++++++++++++++++--
>> include/spl.h | 18 ++++++++++++++++++
>> 3 files changed, 39 insertions(+), 2 deletions(-)
>>
>> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
>> index ac61b25a06..b13492b6a2 100644
>> --- a/common/spl/Kconfig
>> +++ b/common/spl/Kconfig
>> @@ -1103,6 +1103,10 @@ config SPL_SPI_FLASH_SUPPORT
>> lines). This enables the drivers in drivers/mtd/spi as part of an
>> SPL build. This normally requires SPL_SPI.
>>
>> +config SPL_DYNAMIC_SF_BUS_DETECT
>> + bool "Detect which SPI flash to load from"
>> + depends on SPL_SPI_FLASH_SUPPORT
>
> Do you really need here a new Kconfig option? I think you can drop it...
>
adding the Kconfig option is not necessary, will drop it in V2.
Thank you for the feedback.
> bye,
> Heiko
>
--
Thanks and Regards,
Vaishnav
More information about the U-Boot
mailing list