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 <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 36dd064c..c08045f 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1449,6 +1449,24 @@
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 691a431..00dbd30 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -82,13 +82,14 @@
#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