[U-Boot] [PATCH 22/41] Convert CONFIG_CMD_SF_TEST to Kconfig

Simon Glass sjg at chromium.org
Fri Jul 21 23:11:21 UTC 2017


This converts the following to Kconfig:
   CONFIG_CMD_SF_TEST

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 README                                   |  6 ------
 arch/Kconfig                             |  1 +
 arch/x86/cpu/baytrail/Kconfig            |  1 +
 cmd/Kconfig                              | 11 +++++++++++
 configs/chromebit_mickey_defconfig       |  1 +
 configs/chromebook_jerry_defconfig       |  1 +
 configs/chromebook_link64_defconfig      |  1 +
 configs/chromebook_link_defconfig        |  1 +
 configs/chromebook_minnie_defconfig      |  1 +
 configs/chromebook_samus_defconfig       |  1 +
 configs/chromebox_panther_defconfig      |  1 +
 configs/coreboot-x86_defconfig           |  1 +
 configs/cougarcanyon2_defconfig          |  1 +
 configs/crownbay_defconfig               |  1 +
 configs/galileo_defconfig                |  1 +
 configs/qemu-x86_64_defconfig            |  1 +
 configs/qemu-x86_defconfig               |  1 +
 configs/qemu-x86_efi_payload32_defconfig |  1 +
 configs/qemu-x86_efi_payload64_defconfig |  1 +
 configs/sandbox_defconfig                |  4 +---
 include/configs/efi-x86.h                |  2 --
 include/configs/sandbox.h                |  1 -
 include/configs/veyron.h                 |  2 --
 include/configs/x86-common.h             |  1 -
 scripts/config_whitelist.txt             |  1 -
 25 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/README b/README
index 3958821f57..d0d6fe2b8d 100644
--- a/README
+++ b/README
@@ -2506,12 +2506,6 @@ The following options need to be configured:
 		CONFIG_SF_DEFAULT_MODE 		(see include/spi.h)
 		CONFIG_SF_DEFAULT_SPEED		in Hz
 
-		CONFIG_CMD_SF_TEST
-
-		Define this option to include a destructive SPI flash
-		test ('sf test').
-
-- SystemACE Support:
 		CONFIG_SYSTEMACE
 
 		Adding this option adds support for Xilinx SystemACE
diff --git a/arch/Kconfig b/arch/Kconfig
index 7e76abdbf3..a3c9b99ea5 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -77,6 +77,7 @@ config SANDBOX
 	imply LZMA
 	imply SCSI
 	imply CMD_SATA
+	imply CMD_SF_TEST
 
 config SH
 	bool "SuperH architecture"
diff --git a/arch/x86/cpu/baytrail/Kconfig b/arch/x86/cpu/baytrail/Kconfig
index 6c85186486..31e988c6ea 100644
--- a/arch/x86/cpu/baytrail/Kconfig
+++ b/arch/x86/cpu/baytrail/Kconfig
@@ -7,6 +7,7 @@
 config INTEL_BAYTRAIL
 	bool
 	select HAVE_FSP if !EFI
+	imply CMD_SF_TEST
 
 if INTEL_BAYTRAIL
 config INTERNAL_UART
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 28aba0e780..d01fda2450 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -811,6 +811,17 @@ config CMD_SDRAM
 	  SDRAM has an EEPROM with information that can be read using the
 	  I2C bus. This is only available on some boards.
 
+config CMD_SF_TEST
+	bool "sf test - Allow testing of SPI flash"
+	help
+	  Provides a way to test that SPI flash is working correctly. the
+	  test is destructive, in that an area of SPI flash must be provided
+	  for the test to use. Performance informatoin is also provided,
+	  measuring the performance of reading, writing and erasing in
+	  Mbps (Million Bits Per Second). This value shold approximately
+	  equal the SPI bus speed for a single-bit-wide SPI bus, assuming
+	  everything is working properly.
+
 endmenu
 
 
diff --git a/configs/chromebit_mickey_defconfig b/configs/chromebit_mickey_defconfig
index 7d0351e324..a3bba8e5a2 100644
--- a/configs/chromebit_mickey_defconfig
+++ b/configs/chromebit_mickey_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index 8f33bb8316..3dea406d4c 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -21,6 +21,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
diff --git a/configs/chromebook_link64_defconfig b/configs/chromebook_link64_defconfig
index 8fdd09d0a1..545cbdf066 100644
--- a/configs/chromebook_link64_defconfig
+++ b/configs/chromebook_link64_defconfig
@@ -38,6 +38,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig
index fdc3079046..05c55e6bcb 100644
--- a/configs/chromebook_link_defconfig
+++ b/configs/chromebook_link_defconfig
@@ -22,6 +22,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/chromebook_minnie_defconfig b/configs/chromebook_minnie_defconfig
index db1488a2ad..19ae3df239 100644
--- a/configs/chromebook_minnie_defconfig
+++ b/configs/chromebook_minnie_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
diff --git a/configs/chromebook_samus_defconfig b/configs/chromebook_samus_defconfig
index 3c0c10a05e..4e4d64c405 100644
--- a/configs/chromebook_samus_defconfig
+++ b/configs/chromebook_samus_defconfig
@@ -22,6 +22,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/chromebox_panther_defconfig b/configs/chromebox_panther_defconfig
index d8490bf062..a2cbfe08fd 100644
--- a/configs/chromebox_panther_defconfig
+++ b/configs/chromebox_panther_defconfig
@@ -18,6 +18,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/coreboot-x86_defconfig b/configs/coreboot-x86_defconfig
index 9e9f112b85..8eb06df15a 100644
--- a/configs/coreboot-x86_defconfig
+++ b/configs/coreboot-x86_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/cougarcanyon2_defconfig b/configs/cougarcanyon2_defconfig
index b356532880..abe7b1d17b 100644
--- a/configs/cougarcanyon2_defconfig
+++ b/configs/cougarcanyon2_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/crownbay_defconfig b/configs/crownbay_defconfig
index 678daa98d2..549abc8196 100644
--- a/configs/crownbay_defconfig
+++ b/configs/crownbay_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
index f3b32c101f..67a7df9611 100644
--- a/configs/galileo_defconfig
+++ b/configs/galileo_defconfig
@@ -23,6 +23,7 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
index c31e6407cc..55355c5be3 100644
--- a/configs/qemu-x86_64_defconfig
+++ b/configs/qemu-x86_64_defconfig
@@ -39,6 +39,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index c356073161..b028942197 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/qemu-x86_efi_payload32_defconfig b/configs/qemu-x86_efi_payload32_defconfig
index 47e590cdf4..a68cd16cfc 100644
--- a/configs/qemu-x86_efi_payload32_defconfig
+++ b/configs/qemu-x86_efi_payload32_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/qemu-x86_efi_payload64_defconfig b/configs/qemu-x86_efi_payload64_defconfig
index bd066645b8..314cae6a34 100644
--- a/configs/qemu-x86_efi_payload64_defconfig
+++ b/configs/qemu-x86_efi_payload64_defconfig
@@ -18,6 +18,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 0e839dce73..7ceae2d582 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_REMOTEPROC=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PCI=y
+CONFIG_CMD_READ=y
 CONFIG_CMD_TFTPPUT=y
 CONFIG_CMD_TFTPSRV=y
 CONFIG_CMD_RARP=y
@@ -192,6 +193,3 @@ CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
 CONFIG_UT_ENV=y
-CONFIG_CMD_MTDPARTS=y
-CONFIG_CMD_MTDPARTS_SPREAD=y
-CONFIG_CMD_READ=y
diff --git a/include/configs/efi-x86.h b/include/configs/efi-x86.h
index 9dcb481707..c455b592ae 100644
--- a/include/configs/efi-x86.h
+++ b/include/configs/efi-x86.h
@@ -9,8 +9,6 @@
 
 #include <configs/x86-common.h>
 
-#undef CONFIG_CMD_SF_TEST
-
 #undef CONFIG_TPM_TIS_BASE_ADDRESS
 
 #undef CONFIG_ENV_IS_IN_SPI_FLASH
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 5af382969b..fd579f72a8 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -53,7 +53,6 @@
 #define CONFIG_ENV_IS_NOWHERE
 
 /* SPI - enable all SPI flash types for testing purposes */
-#define CONFIG_CMD_SF_TEST
 
 #define CONFIG_I2C_EDID
 
diff --git a/include/configs/veyron.h b/include/configs/veyron.h
index 3bd8dd60b5..68835165e6 100644
--- a/include/configs/veyron.h
+++ b/include/configs/veyron.h
@@ -18,8 +18,6 @@
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPI_FLASH_GIGADEVICE
 
-#define CONFIG_CMD_SF_TEST
-
 #define CONFIG_KEYBOARD
 
 #endif
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index b8f46a1f54..028eb2e57c 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -111,7 +111,6 @@
 /*-----------------------------------------------------------------------
  * FLASH configuration
  */
-#define CONFIG_CMD_SF_TEST
 #define CONFIG_SPI
 
 /*-----------------------------------------------------------------------
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 6d61b4a526..d6f52068ff 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -296,7 +296,6 @@ CONFIG_CM922T_XA10
 CONFIG_CMDLINE_EDITING
 CONFIG_CMDLINE_PS_SUPPORT
 CONFIG_CMDLINE_TAG
-CONFIG_CMD_SF_TEST
 CONFIG_CMD_SH_ZIMAGEBOOT
 CONFIG_CMD_SPL
 CONFIG_CMD_SPL_NAND_OFS
-- 
2.14.0.rc0.284.gd933b75aa4-goog



More information about the U-Boot mailing list