summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVaishnav Achath <vaishnav.a@ti.com>2022-05-30 12:16:42 +0530
committerAnand Gadiyar <gadiyar@ti.com>2022-06-02 20:10:00 -0500
commit6fc85e5c8bf51ac680cfcfff074809c69bef2d89 (patch)
treee4efa30808c89baa1ec949850d6fb92e0a3d01fc /include
parent76952048bb80dddea35475985232e73a9ff5d501 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/spl.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index b72dfc7e3d..fb6055ad33 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -257,6 +257,22 @@ void preloader_console_init(void);
u32 spl_boot_device(void);
/**
+ * spl_spi_boot_bus() - Lookup function for the SPI boot bus source.
+ *
+ * This function returns the SF bus to load from.
+ * If not overridden, it is weakly defined in common/spl/spl_spi.c.
+ */
+u32 spl_spi_boot_bus(void);
+
+/**
+ * spl_spi_boot_cs() - Lookup function for the SPI boot CS source.
+ *
+ * This function returns the SF CS to load from.
+ * If not overridden, it is weakly defined in common/spl/spl_spi.c.
+ */
+u32 spl_spi_boot_cs(void);
+
+/**
* spl_mmc_boot_mode() - Lookup function for the mode of an MMC boot source.
* @boot_device: ID of the device which the MMC driver wants to read
* from. Common values are e.g. BOOT_DEVICE_MMC1,