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 <[email protected]> > --- > 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... bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]

