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>
This commit is contained in:
Anshul Dalal
2025-03-11 10:14:12 +05:30
committed by Tom Rini
parent db8bcdb00a
commit bcb8cac2d5
20 changed files with 59 additions and 63 deletions

View File

@@ -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

View File

@@ -82,12 +82,13 @@ 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,
return spi_flash_read(
flash, CONFIG_SYS_SPI_ARGS_OFFS,
CONFIG_SYS_SPI_ARGS_SIZE,
(void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR);
}
#endif

View File

@@ -40,6 +40,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x1500
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x200
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
CONFIG_SYS_SPI_KERNEL_OFFS=0x1E0000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_ADTIMG=y
CONFIG_CMD_ABOOTIMG=y

View File

@@ -38,6 +38,9 @@ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
CONFIG_SYS_SPI_KERNEL_OFFS=0x1E0000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_ADTIMG=y
CONFIG_CMD_ABOOTIMG=y

View File

@@ -41,6 +41,9 @@ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
CONFIG_SYS_SPI_KERNEL_OFFS=0x1E0000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_ADTIMG=y
CONFIG_CMD_ABOOTIMG=y

View File

@@ -53,6 +53,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x3F00
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x10
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
CONFIG_SYS_SPI_KERNEL_OFFS=0x150000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x10000
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="display5 > "
CONFIG_SYS_MAXARGS=32

View File

@@ -48,6 +48,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x3F00
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x10
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
CONFIG_SYS_SPI_KERNEL_OFFS=0x150000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x10000
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="display5 factory > "
CONFIG_SYS_MAXARGS=32

View File

@@ -43,6 +43,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x1500
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x200
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
CONFIG_SYS_SPI_KERNEL_OFFS=0x1E0000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_CMD_SPL=y
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_CMD_NAND=y

View File

@@ -40,6 +40,9 @@ CONFIG_SPL_NAND_ECC=y
CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
CONFIG_SYS_SPI_KERNEL_OFFS=0x1E0000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_CMD_NAND=y
CONFIG_BOOTP_DNS2=y

View File

@@ -39,6 +39,9 @@ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
CONFIG_SYS_SPI_KERNEL_OFFS=0x1E0000
CONFIG_SYS_SPI_ARGS_OFFS=0x140000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
# CONFIG_CMD_SETEXPR is not set

View File

@@ -63,6 +63,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x400
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x40
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x10000
CONFIG_SYS_SPI_KERNEL_OFFS=0x100000
CONFIG_SYS_SPI_ARGS_OFFS=0x80000
CONFIG_SYS_SPI_ARGS_SIZE=0x8000
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=32

View File

@@ -51,6 +51,9 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SPL_PAYLOAD_ARGS_ADDR=0x10000000
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
CONFIG_SYS_SPI_KERNEL_OFFS=0x280000
CONFIG_SYS_SPI_ARGS_OFFS=0x200000
CONFIG_SYS_SPI_ARGS_SIZE=0x80000
CONFIG_SYS_MAXARGS=32
# CONFIG_BOOTM_NETBSD is not set
CONFIG_CMD_IMLS=y

View File

@@ -58,6 +58,9 @@ CONFIG_SPL_PAYLOAD_ARGS_ADDR=0x8000000
CONFIG_SPL_RAM_DEVICE=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000
CONFIG_SYS_SPI_KERNEL_OFFS=0x80000
CONFIG_SYS_SPI_ARGS_OFFS=0xa0000
CONFIG_SYS_SPI_ARGS_SIZE=0xa0000
CONFIG_SPL_ATF=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_CMD_SMBIOS=y

View File

@@ -56,6 +56,9 @@ CONFIG_SPL_PAYLOAD_ARGS_ADDR=0x8000000
CONFIG_SPL_RAM_DEVICE=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
CONFIG_SYS_SPI_KERNEL_OFFS=0x80000
CONFIG_SYS_SPI_ARGS_OFFS=0xa0000
CONFIG_SYS_SPI_ARGS_SIZE=0xa0000
CONFIG_SPL_ATF=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_CMD_SMBIOS=y

View File

@@ -37,20 +37,4 @@
/* CPSW Ethernet */
/*
* Default to using SPI for environment, etc.
* 0x000000 - 0x040000 : QSPI.SPL (256KiB)
* 0x040000 - 0x140000 : QSPI.u-boot (1MiB)
* 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB)
* 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB)
* 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB)
* 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB)
* 0x9E0000 - 0x2000000 : USERLAND
*/
#define CFG_SYS_SPI_KERNEL_OFFS 0x1E0000
#define CFG_SYS_SPI_ARGS_OFFS 0x140000
#define CFG_SYS_SPI_ARGS_SIZE 0x80000
/* SPI SPL */
#endif /* __CONFIG_AM57XX_EVM_H */

View File

@@ -29,11 +29,6 @@
* 0x1F00000 - 0x2000000 : SPI.factory (1MiB)
*/
/* Below values are "dummy" - only to avoid build break */
#define CFG_SYS_SPI_KERNEL_OFFS 0x150000
#define CFG_SYS_SPI_ARGS_OFFS 0x140000
#define CFG_SYS_SPI_ARGS_SIZE 0x10000
#define CFG_MXC_UART_BASE UART5_BASE
/* MMC Configs */

View File

@@ -47,22 +47,6 @@
#include <configs/ti_omap5_common.h>
/*
* Default to using SPI for environment, etc.
* 0x000000 - 0x040000 : QSPI.SPL (256KiB)
* 0x040000 - 0x140000 : QSPI.u-boot (1MiB)
* 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB)
* 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB)
* 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB)
* 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB)
* 0x9E0000 - 0x2000000 : USERLAND
*/
#define CFG_SYS_SPI_KERNEL_OFFS 0x1E0000
#define CFG_SYS_SPI_ARGS_OFFS 0x140000
#define CFG_SYS_SPI_ARGS_SIZE 0x80000
/* SPI SPL */
/* NAND support */
#ifdef CONFIG_MTD_RAW_NAND
/* NAND: device related configs */

View File

@@ -12,14 +12,6 @@
#ifndef __CONFIGS_XEA_H__
#define __CONFIGS_XEA_H__
#include <linux/sizes.h>
/* SPL */
#define CFG_SYS_SPI_KERNEL_OFFS SZ_1M
#define CFG_SYS_SPI_ARGS_OFFS SZ_512K
#define CFG_SYS_SPI_ARGS_SIZE SZ_32K
/* Memory configuration */
#define PHYS_SDRAM_1 0x40000000 /* Base address */
#define PHYS_SDRAM_1_SIZE 0x10000000 /* Max 256 MB RAM */

View File

@@ -194,12 +194,6 @@
"dfu_bufsiz=0x1000\0"
#endif
#if defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
# define CFG_SYS_SPI_KERNEL_OFFS 0x80000
# define CFG_SYS_SPI_ARGS_OFFS 0xa0000
# define CFG_SYS_SPI_ARGS_SIZE 0xa0000
#endif
#ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE
# error "Disable CONFIG_SPL_SYS_MALLOC_SIMPLE. Full malloc needs to be used"
#endif

View File

@@ -191,14 +191,6 @@
/* Not using MMC raw mode - just for compilation purpose */
/* qspi mode is working fine */
#ifdef CONFIG_ZYNQ_QSPI
#define CFG_SYS_SPI_ARGS_OFFS 0x200000
#define CFG_SYS_SPI_ARGS_SIZE 0x80000
#define CFG_SYS_SPI_KERNEL_OFFS (CFG_SYS_SPI_ARGS_OFFS + \
CFG_SYS_SPI_ARGS_SIZE)
#endif
/* SP location before relocation, must use scratch RAM */
/* 3 * 64kB blocks of OCM - one is on the top because of bootrom */