Convert CONFIG_ENV_SPI_BUS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_SPI_BUS
   CONFIG_ENV_SPI_CS
   CONFIG_ENV_SPI_MAX_HZ
   CONFIG_ENV_SPI_MODE

As part of this, we use Kconfig to provide the defaults now that were
done in include/spi_flash.h.  We also in some cases change from using
CONFIG_ENV_SPI_FOO to CONFIG_SF_DEFAULT_FOO as those were the values in
use anyhow as ENV was not enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2021-12-11 14:55:48 -05:00
parent 5fd4a7ed0c
commit 7e6a6fd821
94 changed files with 40 additions and 256 deletions

View File

@@ -25,8 +25,6 @@
*/
#define CONFIG_SYS_NS16550_CLK 25000000
#define CONFIG_ENV_SPI_MAX_HZ 25000000
/* Miscellaneous configurable options */
/*

View File

@@ -109,15 +109,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80200000
/* Default environment is in SD */
#ifdef CONFIG_QSPI_BOOT
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#endif
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
/* On LPDDR4 board, USDHC1 is for eMMC, USDHC2 is for SD on CPU board,

View File

@@ -24,8 +24,6 @@
func(DHCP, dhcp, na)
/* Environment at end of QSPI, in the VER partition */
#define CONFIG_ENV_SPI_MAX_HZ 48000000
#define CONFIG_ENV_SPI_MODE SPI_MODE_0
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
#define CONFIG_PREBOOT

View File

@@ -30,12 +30,6 @@
#endif
#ifdef CONFIG_QSPI_BOOT
#undef CONFIG_ENV_SPI_BUS
#define CONFIG_ENV_SPI_BUS 1
#endif
/* SPL */
#define CONFIG_SPL_MAX_SIZE 0x10000
#define CONFIG_SPL_BSS_START_ADDR 0x20000000

View File

@@ -14,20 +14,6 @@
struct udevice;
/* by default ENV use the same parameters than SF command */
#ifndef CONFIG_ENV_SPI_BUS
# define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#endif
#ifndef CONFIG_ENV_SPI_CS
# define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#endif
#ifndef CONFIG_ENV_SPI_MAX_HZ
# define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#endif
#ifndef CONFIG_ENV_SPI_MODE
# define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#endif
struct spi_slave;
struct dm_spi_flash_ops {