[PoC 169/241] global: Migrate CONFIG_SANDBOX_SPI_MAX_CS to CFG
Tom Rini
trini at konsulko.com
Sun Nov 20 15:07:59 CET 2022
Signed-off-by: Tom Rini <trini at konsulko.com>
---
arch/sandbox/include/asm/config.h | 4 ++--
arch/sandbox/include/asm/state.h | 2 +-
drivers/spi/sandbox_spi.c | 2 +-
scripts/config_whitelist.txt | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/sandbox/include/asm/config.h b/arch/sandbox/include/asm/config.h
index 36833987330c..2ffe94f10bc8 100644
--- a/arch/sandbox/include/asm/config.h
+++ b/arch/sandbox/include/asm/config.h
@@ -12,8 +12,8 @@
#ifndef CFG_SANDBOX_SPI_MAX_BUS
#define CFG_SANDBOX_SPI_MAX_BUS 1
#endif
-#ifndef CONFIG_SANDBOX_SPI_MAX_CS
-#define CONFIG_SANDBOX_SPI_MAX_CS 10
+#ifndef CFG_SANDBOX_SPI_MAX_CS
+#define CFG_SANDBOX_SPI_MAX_CS 10
#endif
#endif
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index ada85be5cb1a..e99a7d04e8da 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -99,7 +99,7 @@ struct sandbox_state {
/* Pointer to information for each SPI bus/cs */
struct sandbox_spi_info spi[CFG_SANDBOX_SPI_MAX_BUS]
- [CONFIG_SANDBOX_SPI_MAX_CS];
+ [CFG_SANDBOX_SPI_MAX_CS];
/* Information about Watchdog */
struct sandbox_wdt_info wdt;
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 0c645904da14..0065a5c65755 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -90,7 +90,7 @@ static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen,
busnum = dev_seq(bus);
cs = spi_chip_select(slave);
if (busnum >= CFG_SANDBOX_SPI_MAX_BUS ||
- cs >= CONFIG_SANDBOX_SPI_MAX_CS) {
+ cs >= CFG_SANDBOX_SPI_MAX_CS) {
printf("%s: busnum=%u, cs=%u: out of range\n", __func__,
busnum, cs);
return -ENOENT;
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 815d8f8f12ba..7af096ee8f63 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -178,7 +178,7 @@ CFG_ROCKCHIP_SDHCI_MAX_FREQ
CFG_ROOTPATH
CFG_SANDBOX_ARCH
CFG_SANDBOX_SPI_MAX_BUS
-CONFIG_SANDBOX_SPI_MAX_CS
+CFG_SANDBOX_SPI_MAX_CS
CONFIG_SAR2_REG
CONFIG_SAR_REG
CONFIG_SCIF_A
--
2.25.1
More information about the U-Boot
mailing list