[PATCH 5/9] Convert CONFIG_SYS_CFI_FLASH_STATUS_POLL to Kconfig

Tom Rini trini at konsulko.com
Thu May 19 01:47:48 CEST 2022


This converts the following to Kconfig:
   CONFIG_SYS_CFI_FLASH_STATUS_POLL

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 configs/3c120_defconfig              | 1 +
 configs/ae350_rv32_defconfig         | 1 +
 configs/ae350_rv32_spl_defconfig     | 1 +
 configs/ae350_rv32_spl_xip_defconfig | 1 +
 configs/ae350_rv32_xip_defconfig     | 1 +
 configs/ae350_rv64_defconfig         | 1 +
 configs/ae350_rv64_spl_defconfig     | 1 +
 configs/ae350_rv64_spl_xip_defconfig | 1 +
 configs/ae350_rv64_xip_defconfig     | 1 +
 drivers/mtd/Kconfig                  | 4 ++++
 include/configs/3c120_devboard.h     | 1 -
 include/configs/ax25-ae350.h         | 4 ----
 scripts/config_whitelist.txt         | 1 -
 13 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/configs/3c120_defconfig b/configs/3c120_defconfig
index 617b25a375b5..f266c0e5e41d 100644
--- a/configs/3c120_defconfig
+++ b/configs/3c120_defconfig
@@ -39,6 +39,7 @@ CONFIG_ALTERA_SYSID=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_CFI_FLASH=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/ae350_rv32_defconfig b/configs/ae350_rv32_defconfig
index 340ec49c461e..714a70759138 100644
--- a/configs/ae350_rv32_defconfig
+++ b/configs/ae350_rv32_defconfig
@@ -31,6 +31,7 @@ CONFIG_DM_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
 CONFIG_CFI_FLASH=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv32_spl_defconfig b/configs/ae350_rv32_spl_defconfig
index 7a7fd416b04b..cd9cc613cb50 100644
--- a/configs/ae350_rv32_spl_defconfig
+++ b/configs/ae350_rv32_spl_defconfig
@@ -33,6 +33,7 @@ CONFIG_FTSDC010_SDIO=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv32_spl_xip_defconfig b/configs/ae350_rv32_spl_xip_defconfig
index 9ba010a168c7..8f47e178636d 100644
--- a/configs/ae350_rv32_spl_xip_defconfig
+++ b/configs/ae350_rv32_spl_xip_defconfig
@@ -35,6 +35,7 @@ CONFIG_FTSDC010_SDIO=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv32_xip_defconfig b/configs/ae350_rv32_xip_defconfig
index 16ff634d15a9..f0b842f35edf 100644
--- a/configs/ae350_rv32_xip_defconfig
+++ b/configs/ae350_rv32_xip_defconfig
@@ -32,6 +32,7 @@ CONFIG_DM_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
 CONFIG_CFI_FLASH=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv64_defconfig b/configs/ae350_rv64_defconfig
index ba525c98c2ae..5425255a700f 100644
--- a/configs/ae350_rv64_defconfig
+++ b/configs/ae350_rv64_defconfig
@@ -32,6 +32,7 @@ CONFIG_DM_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
 CONFIG_CFI_FLASH=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv64_spl_defconfig b/configs/ae350_rv64_spl_defconfig
index 9e9f85a18699..33476f3fb1d2 100644
--- a/configs/ae350_rv64_spl_defconfig
+++ b/configs/ae350_rv64_spl_defconfig
@@ -34,6 +34,7 @@ CONFIG_FTSDC010_SDIO=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv64_spl_xip_defconfig b/configs/ae350_rv64_spl_xip_defconfig
index c1a6d89ae7ca..e6ed0efa5535 100644
--- a/configs/ae350_rv64_spl_xip_defconfig
+++ b/configs/ae350_rv64_spl_xip_defconfig
@@ -36,6 +36,7 @@ CONFIG_FTSDC010_SDIO=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/ae350_rv64_xip_defconfig b/configs/ae350_rv64_xip_defconfig
index 49511ab15493..d4b2e638b296 100644
--- a/configs/ae350_rv64_xip_defconfig
+++ b/configs/ae350_rv64_xip_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
 CONFIG_CFI_FLASH=y
+CONFIG_SYS_CFI_FLASH_STATUS_POLL=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index c3f5455347ed..d0ab7c18c649 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -96,6 +96,10 @@ config CFI_FLASH_USE_WEAK_ACCESSORS
 	  Enable this option to allow for the flash_{read,write}{8,16,32,64}
 	  functions to be overridden by the platform.
 
+config SYS_CFI_FLASH_STATUS_POLL
+	bool "Poll status on AMD flash chips"
+	depends on FLASH_CFI_DRIVER
+
 config SYS_FLASH_USE_BUFFER_WRITE
 	bool "Enable buffered writes to flash"
 	depends on FLASH_CFI_DRIVER
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h
index 9db0f0efb150..2d52dc6f6608 100644
--- a/include/configs/3c120_devboard.h
+++ b/include/configs/3c120_devboard.h
@@ -19,7 +19,6 @@
 /*
  * CFI Flash
  */
-#define CONFIG_SYS_CFI_FLASH_STATUS_POLL /* fix amd flash issue */
 #define CONFIG_SYS_MAX_FLASH_SECT	512
 
 /*
diff --git a/include/configs/ax25-ae350.h b/include/configs/ax25-ae350.h
index 03fe9469bf1a..264d708fa9f3 100644
--- a/include/configs/ax25-ae350.h
+++ b/include/configs/ax25-ae350.h
@@ -56,10 +56,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000000 - \
 					GENERATED_GBL_DATA_SIZE)
 
-/* use CFI framework */
-
-#define CONFIG_SYS_CFI_FLASH_STATUS_POLL
-
 /* support JEDEC */
 #define PHYS_FLASH_1			0x88000000	/* BANK 0 */
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 0cfb3ba4482c..a5e36698b1ff 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -666,7 +666,6 @@ CONFIG_SYS_CCSRBAR_PHYS
 CONFIG_SYS_CCSRBAR_PHYS_HIGH
 CONFIG_SYS_CCSRBAR_PHYS_LOW
 CONFIG_SYS_CCSR_DO_NOT_RELOCATE
-CONFIG_SYS_CFI_FLASH_STATUS_POLL
 CONFIG_SYS_CLK
 CONFIG_SYS_CLKTL_CBCDR
 CONFIG_SYS_CORE_SRAM
-- 
2.25.1



More information about the U-Boot mailing list