]> git.baikalelectronics.ru Git - uboot.git/commit
common: spl: spl_spi: add support for dynamic override of sf bus
authorVaishnav Achath <vaishnav.a@ti.com>
Fri, 3 Jun 2022 06:02:15 +0000 (11:32 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 6 Jul 2022 18:30:08 +0000 (14:30 -0400)
commit2f00a9a10dc60631185236b0e8a157e56219db1b
tree211bde0ca6557e499f63bf6a7bca1a98bffa6dd9
parent84a94b4bd9418214e9154e72057393dc45d3fe3c
common: spl: spl_spi: add support for dynamic override of sf bus

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 device, when not overridden the lookup functions are
weakly defined in common/spl/spl_spi.c.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
common/spl/spl_spi.c
include/spl.h