summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAnshul Dalal <[email protected]>2025-03-11 10:14:12 +0530
committerTom Rini <[email protected]>2025-03-30 09:15:31 -0600
commitbcb8cac2d550b6decfbcb2985be276afbec296cf (patch)
tree40177d925287ccb1b27c4d7662a55f4064490a61 /common
parentdb8bcdb00af59e4a88d72f7ce115200d554c8d2d (diff)
config: falcon: move CFG_SYS_SPI_* to Kconfig
CFG_SYS_SPI_* are used in falcon boot to specify the offsets and size of the respective payloads. This patch moves them to Kconfig keeping the values consistent for each of the affected boards. Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Anshul Dalal <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/spl/Kconfig18
-rw-r--r--common/spl/spl_spi.c9
2 files changed, 23 insertions, 4 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 36dd064c25a..c08045f9c8d 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1449,6 +1449,24 @@ config SYS_SPI_U_BOOT_OFFS
Address within SPI-Flash from where the u-boot payload is fetched
from.
+config SYS_SPI_KERNEL_OFFS
+ hex "Falcon mode: address of kernel payload in SPI flash"
+ depends on SPL_SPI_FLASH_SUPPORT && SPL_OS_BOOT
+ help
+ Address within SPI-Flash from where the kernel payload is fetched
+ in falcon boot.
+
+config SYS_SPI_ARGS_OFFS
+ hex "Falcon mode: address of args payload in SPI flash"
+ depends on SPL_SPI_FLASH_SUPPORT && SPL_OS_BOOT
+ help
+ Address within SPI-Flash from where the args payload (usually the
+ dtb) is fetched in falcon boot.
+
+config SYS_SPI_ARGS_SIZE
+ hex "Falcon mode: size of args payload in SPI flash"
+ depends on SPL_SPI_FLASH_SUPPORT && SPL_OS_BOOT
+
config SPL_THERMAL
bool "Driver support for thermal devices"
help
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 691a431a926..00dbd3011f0 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -82,13 +82,14 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
#if CONFIG_IS_ENABLED(OS_BOOT)
if (spl_start_uboot()) {
int err = spl_load(spl_image, bootdev, &load, 0,
- CFG_SYS_SPI_KERNEL_OFFS);
+ CONFIG_SYS_SPI_KERNEL_OFFS);
if (!err)
/* Read device tree. */
- return spi_flash_read(flash, CFG_SYS_SPI_ARGS_OFFS,
- CFG_SYS_SPI_ARGS_SIZE,
- (void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR);
+ return spi_flash_read(
+ flash, CONFIG_SYS_SPI_ARGS_OFFS,
+ CONFIG_SYS_SPI_ARGS_SIZE,
+ (void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR);
}
#endif