[PATCH 7/9] Convert CONFIG_SPL_NAND_RAW_ONLY et al to Kconfig

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


This converts the following to Kconfig:
   CONFIG_SPL_NAND_RAW_ONLY
   CONFIG_SPL_NAND_SOFTECC

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 README                                          |  4 ----
 common/spl/Kconfig                              | 12 +++++++++++-
 configs/axm_defconfig                           |  2 ++
 configs/corvus_defconfig                        |  2 ++
 configs/devkit3250_defconfig                    |  2 ++
 configs/gardena-smart-gateway-at91sam_defconfig |  1 +
 configs/smartweb_defconfig                      |  2 ++
 configs/taurus_defconfig                        |  2 ++
 include/configs/at91sam9m10g45ek.h              |  1 -
 include/configs/corvus.h                        |  2 --
 include/configs/devkit3250.h                    |  5 -----
 include/configs/gardena-smart-gateway-at91sam.h |  1 -
 include/configs/pm9g45.h                        |  1 -
 include/configs/smartweb.h                      |  2 --
 include/configs/taurus.h                        |  2 --
 scripts/config_whitelist.txt                    |  2 --
 16 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/README b/README
index 484a2c500ccf..0fd92cfaebc5 100644
--- a/README
+++ b/README
@@ -1743,10 +1743,6 @@ The following options need to be configured:
 		Support for a lightweight UBI (fastmap) scanner and
 		loader
 
-		CONFIG_SPL_NAND_RAW_ONLY
-		Support to boot only raw u-boot.bin images. Use this only
-		if you need to save space.
-
 		CONFIG_SPL_COMMON_INIT_DDR
 		Set for common ddr init with serial presence detect in
 		SPL binary.
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 42681211d0df..b45607b3f758 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -763,13 +763,23 @@ config SPL_NAND_SUPPORT
 	  This enables the drivers in drivers/mtd/nand/raw as part of an SPL
 	  build.
 
+config SPL_NAND_RAW_ONLY
+	bool "Support to boot only raw u-boot.bin images"
+	depends on SPL_NAND_SUPPORT
+	help
+	  Use this only if you need to save space.
+
 config SPL_NAND_DRIVERS
 	bool "Use standard NAND driver"
 	help
 	  SPL uses normal NAND drivers, not minimal drivers.
 
 config SPL_NAND_ECC
-	bool "Include standard software ECC in the SPL"
+	bool "Include standard ECC in SPL"
+
+config SPL_NAND_SOFTECC
+	bool "Use software ECC in SPL"
+	depends on SPL_NAND_ECC
 
 config SPL_NAND_SIMPLE
 	bool "Support simple NAND drivers in SPL"
diff --git a/configs/axm_defconfig b/configs/axm_defconfig
index d17cdd29c562..ebda5a49fe99 100644
--- a/configs/axm_defconfig
+++ b/configs/axm_defconfig
@@ -39,8 +39,10 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_CRC32=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_NAND_RAW_ONLY=y
 CONFIG_SPL_NAND_DRIVERS=y
 CONFIG_SPL_NAND_ECC=y
+CONFIG_SPL_NAND_SOFTECC=y
 CONFIG_SPL_NAND_BASE=y
 CONFIG_SPL_DM_SPI_FLASH=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/corvus_defconfig b/configs/corvus_defconfig
index 443f15e71d38..9b55d9e87db0 100644
--- a/configs/corvus_defconfig
+++ b/configs/corvus_defconfig
@@ -32,8 +32,10 @@ CONFIG_BOOTCOMMAND="nand read 0x70000000 0x200000 0x300000;bootm 0x70000000"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_NAND_RAW_ONLY=y
 CONFIG_SPL_NAND_DRIVERS=y
 CONFIG_SPL_NAND_ECC=y
+CONFIG_SPL_NAND_SOFTECC=y
 CONFIG_SPL_NAND_BASE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig
index 71e80e804853..5b25463df969 100644
--- a/configs/devkit3250_defconfig
+++ b/configs/devkit3250_defconfig
@@ -26,8 +26,10 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_NAND_RAW_ONLY=y
 CONFIG_SPL_NAND_DRIVERS=y
 CONFIG_SPL_NAND_ECC=y
+CONFIG_SPL_NAND_SOFTECC=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GPIO=y
diff --git a/configs/gardena-smart-gateway-at91sam_defconfig b/configs/gardena-smart-gateway-at91sam_defconfig
index 0dbd0849581a..2ee716365341 100644
--- a/configs/gardena-smart-gateway-at91sam_defconfig
+++ b/configs/gardena-smart-gateway-at91sam_defconfig
@@ -35,6 +35,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_NAND_RAW_ONLY=y
 CONFIG_SPL_NAND_DRIVERS=y
 CONFIG_SPL_NAND_BASE=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index a9f90e907538..b3c6d23e717b 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -33,8 +33,10 @@ CONFIG_BOOTCOMMAND="run flashboot"
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_NAND_RAW_ONLY=y
 CONFIG_SPL_NAND_DRIVERS=y
 CONFIG_SPL_NAND_ECC=y
+CONFIG_SPL_NAND_SOFTECC=y
 CONFIG_SPL_NAND_BASE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot# "
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index 90f9133cb62d..8bc5afdc2e51 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -43,8 +43,10 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_CRC32=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_NAND_RAW_ONLY=y
 CONFIG_SPL_NAND_DRIVERS=y
 CONFIG_SPL_NAND_ECC=y
+CONFIG_SPL_NAND_SOFTECC=y
 CONFIG_SPL_NAND_BASE=y
 CONFIG_SPL_DM_SPI_FLASH=y
 CONFIG_HUSH_PARSER=y
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 38b9061080ab..2930d7a1499f 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -56,7 +56,6 @@
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
 #elif CONFIG_NAND_BOOT
-#define CONFIG_SPL_NAND_SOFTECC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	0x80000
 
 #define CONFIG_SYS_NAND_ECCSIZE		256
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index 4809b59ecc39..b4fef73121af 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -63,8 +63,6 @@
 #define CONFIG_SPL_BSS_START_ADDR	CONFIG_SPL_MAX_SIZE
 #define CONFIG_SPL_BSS_MAX_SIZE		(SZ_2K)
 
-#define CONFIG_SPL_NAND_RAW_ONLY
-#define CONFIG_SPL_NAND_SOFTECC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	0x80000
 #define	CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 93a704cc31d6..d2a760e9b1f6 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -97,11 +97,6 @@
 
 /* SPL will use serial */
 
-/* SPL loads an image from NAND */
-#define CONFIG_SPL_NAND_RAW_ONLY
-
-#define CONFIG_SPL_NAND_SOFTECC
-
 #define CONFIG_SPL_MAX_SIZE		0x20000
 #define CONFIG_SPL_PAD_TO		CONFIG_SPL_MAX_SIZE
 
diff --git a/include/configs/gardena-smart-gateway-at91sam.h b/include/configs/gardena-smart-gateway-at91sam.h
index 5e6a8ee770e0..3e99d2cfb04d 100644
--- a/include/configs/gardena-smart-gateway-at91sam.h
+++ b/include/configs/gardena-smart-gateway-at91sam.h
@@ -51,7 +51,6 @@
 #define CONFIG_SYS_MCKR			0x1301
 #define CONFIG_SYS_MCKR_CSS		0x1302
 
-#define CONFIG_SPL_NAND_RAW_ONLY
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	0xa0000
 #define	CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
index b858aaa1ccd9..658b8a7f15ff 100644
--- a/include/configs/pm9g45.h
+++ b/include/configs/pm9g45.h
@@ -61,7 +61,6 @@
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 
 #elif CONFIG_NAND_BOOT
-#define CONFIG_SPL_NAND_SOFTECC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	0x80000
 
 #define CONFIG_SYS_NAND_ECCSIZE		256
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index b51a5203547d..d58d76d10914 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -126,8 +126,6 @@
 #define CONFIG_SYS_SPL_MALLOC_SIZE      CONFIG_SYS_MALLOC_LEN
 
 #define CONFIG_SYS_NAND_ENABLE_PIN_SPL	(2*32 + 14)
-#define CONFIG_SPL_NAND_RAW_ONLY
-#define CONFIG_SPL_NAND_SOFTECC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	SZ_512K
 #define	CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 77d80bfc9813..768bfc6cc6c3 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -152,8 +152,6 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		(3 * SZ_512)
 
 #define CONFIG_SYS_NAND_ENABLE_PIN_SPL	(2*32 + 14)
-#define CONFIG_SPL_NAND_RAW_ONLY
-#define CONFIG_SPL_NAND_SOFTECC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	SZ_512K
 #define	CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index e40f9fc06c02..d777c0ffa838 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -579,8 +579,6 @@ CONFIG_SPL_MAX_FOOTPRINT
 CONFIG_SPL_MAX_SIZE
 CONFIG_SPL_NAND_INIT
 CONFIG_SPL_NAND_MINIMAL
-CONFIG_SPL_NAND_RAW_ONLY
-CONFIG_SPL_NAND_SOFTECC
 CONFIG_SPL_PAD_TO
 CONFIG_SPL_PBL_PAD
 CONFIG_SPL_RELOC_MALLOC_ADDR
-- 
2.25.1



More information about the U-Boot mailing list