[PATCH 18/21] Convert CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to Kconfig

Tom Rini trini at konsulko.com
Sat Oct 29 02:27:11 CEST 2022


This converts the following to Kconfig:
   CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 configs/da850evm_nand_defconfig      | 1 +
 configs/k2e_evm_defconfig            | 1 +
 configs/k2e_hs_evm_defconfig         | 1 +
 configs/k2hk_evm_defconfig           | 1 +
 configs/k2hk_hs_evm_defconfig        | 1 +
 configs/k2l_evm_defconfig            | 1 +
 configs/k2l_hs_evm_defconfig         | 1 +
 configs/omapl138_lcdk_defconfig      | 1 +
 drivers/mtd/nand/raw/Kconfig         | 4 ++++
 include/configs/da850evm.h           | 1 -
 include/configs/omapl138_lcdk.h      | 1 -
 include/configs/ti_armv7_keystone2.h | 1 -
 12 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
index f3ae5a77ccc5..dfa0399f3cf1 100644
--- a/configs/da850evm_nand_defconfig
+++ b/configs/da850evm_nand_defconfig
@@ -86,6 +86,7 @@ CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_SYS_NAND_BLOCK_SIZE=0x20000
 CONFIG_SYS_NAND_PAGE_COUNT=0x40
 CONFIG_SYS_NAND_PAGE_SIZE=0x800
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index ed2affd8f7f0..4184d280b30e 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -79,6 +79,7 @@ CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
index c19c69903b1b..9958cf7a265f 100644
--- a/configs/k2e_hs_evm_defconfig
+++ b/configs/k2e_hs_evm_defconfig
@@ -54,6 +54,7 @@ CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 973d812385b5..9c3e92c11c8a 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -79,6 +79,7 @@ CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index fe25c090bbf7..b37e5c829375 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -54,6 +54,7 @@ CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 437cf4b06d94..e0976312c129 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -79,6 +79,7 @@ CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/k2l_hs_evm_defconfig b/configs/k2l_hs_evm_defconfig
index 9b98bc9f2abe..090e16be3128 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -57,6 +57,7 @@ CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index a7918aaa0b0a..bc3af8a851c6 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -83,6 +83,7 @@ CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST=y
 CONFIG_SYS_NAND_BLOCK_SIZE=0x20000
 CONFIG_SYS_NAND_PAGE_COUNT=0x40
 CONFIG_SYS_NAND_PAGE_SIZE=0x800
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 2c03676bf78b..1686f8b94d66 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -136,6 +136,10 @@ config NAND_DAVINCI
 	  Enable this driver for NAND flash controllers available in TI Davinci
 	  and Keystone2 platforms
 
+config SYS_NAND_4BIT_HW_ECC_OOBFIRST
+	bool "Use 4-bit HW ECC with OOB at the front"
+	depends on NAND_DAVINCI
+
 config KEYSTONE_RBL_NAND
 	depends on ARCH_KEYSTONE
 	def_bool y
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 3625f923a5c1..281cbe37f9d9 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -107,7 +107,6 @@
  * Flash & Environment
  */
 #ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 #define	CONFIG_SYS_NAND_PAGE_2K
 #define CONFIG_SYS_NAND_CS		3
 #define CONFIG_SYS_NAND_BASE		DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index df4a16fd0815..410393024158 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -105,7 +105,6 @@
  * Flash & Environment
  */
 #ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 #define	CONFIG_SYS_NAND_PAGE_2K
 #define CONFIG_SYS_NAND_CS		3
 #define CONFIG_SYS_NAND_BASE		DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 4078413d0f51..6c01ab813e5a 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -65,7 +65,6 @@
 #define CONFIG_SYS_NAND_MASK_CLE		0x4000
 #define CONFIG_SYS_NAND_MASK_ALE		0x2000
 #define CONFIG_SYS_NAND_CS			2
-#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 
 #define CONFIG_SYS_NAND_LARGEPAGE
 #define CONFIG_SYS_NAND_BASE_LIST		{ 0x30000000, }
-- 
2.25.1



More information about the U-Boot mailing list