[PATCH 08/10] Convert CONFIG_SYS_NAND_PAGE_2K et al to Kconfig

Tom Rini trini at konsulko.com
Sat Nov 12 23:36:49 CET 2022


This converts the following to Kconfig:
   CONFIG_SYS_NAND_PAGE_2K
   CONFIG_SYS_NAND_PAGE_4K

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 configs/k2l_evm_defconfig       |  1 +
 configs/k2l_hs_evm_defconfig    |  1 +
 drivers/mtd/nand/raw/Kconfig    | 13 +++++++++++++
 include/configs/da850evm.h      |  1 -
 include/configs/k2e_evm.h       |  3 ---
 include/configs/k2g_evm.h       |  3 ---
 include/configs/k2hk_evm.h      |  3 ---
 include/configs/k2l_evm.h       |  3 ---
 include/configs/omapl138_lcdk.h |  1 -
 9 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index bb91aa3534a9..13d612ac3fb6 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -80,6 +80,7 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_SYS_NAND_NO_SUBPAGE_WRITE=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_PAGE_4K=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 d10965a70fc8..59ec3a6346f3 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -58,6 +58,7 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_SYS_NAND_NO_SUBPAGE_WRITE=y
 CONFIG_NAND_DAVINCI=y
+CONFIG_SYS_NAND_PAGE_4K=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 3585031ddfa8..5483efeb39b4 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -168,6 +168,19 @@ config SYS_NAND_SOFT_ECC
 
 endchoice
 
+choice
+	prompt "NAND page size"
+	depends on NAND_DAVINCI
+	default SYS_NAND_PAGE_2K
+
+config SYS_NAND_PAGE_2K
+	bool "Page size is 2K"
+
+config SYS_NAND_PAGE_4K
+	bool "Page size is 4K"
+
+endchoice
+
 config KEYSTONE_RBL_NAND
 	depends on ARCH_KEYSTONE
 	def_bool y
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 11f104bcb86d..5a5c65da16c6 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_PAGE_2K
 #define CONFIG_SYS_NAND_CS		3
 #define CONFIG_SYS_NAND_BASE		DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
 #define CONFIG_SYS_NAND_MASK_CLE		0x10
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 9b25c3498223..bbc58be511e4 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -36,9 +36,6 @@
 
 #define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
 
-/* NAND Configuration */
-#define CONFIG_SYS_NAND_PAGE_2K
-
 /* Network */
 #define CONFIG_KSNET_NETCP_V1_5
 #define CONFIG_KSNET_CPSW_NUM_PORTS	9
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index 887fda90d6a0..bb91751d5d90 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -50,9 +50,6 @@
 	"get_mon_mmc=load mmc ${bootpart} ${addr_mon} ${bootdir}/${name_mon}\0"\
 	"name_fs=arago-base-tisdk-image-k2g-evm.cpio\0"
 
-/* NAND Configuration */
-#define CONFIG_SYS_NAND_PAGE_2K
-
 /* Network */
 #define CONFIG_KSNET_NETCP_V1_5
 #define CONFIG_KSNET_CPSW_NUM_PORTS	2
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index cfc34c7da6d7..68cbe98b553b 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -36,9 +36,6 @@
 
 #define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
 
-/* NAND Configuration */
-#define CONFIG_SYS_NAND_PAGE_2K
-
 /* Network */
 #define CONFIG_KSNET_NETCP_V1_0
 #define CONFIG_KSNET_CPSW_NUM_PORTS	5
diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h
index 65988fff06ed..a18158a7eb33 100644
--- a/include/configs/k2l_evm.h
+++ b/include/configs/k2l_evm.h
@@ -36,9 +36,6 @@
 
 #define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
 
-/* NAND Configuration */
-#define CONFIG_SYS_NAND_PAGE_4K
-
 /* Network */
 #define CONFIG_KSNET_NETCP_V1_5
 #define CONFIG_KSNET_CPSW_NUM_PORTS	5
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 233e7b4ee53e..d9f70c75323f 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_PAGE_2K
 #define CONFIG_SYS_NAND_CS		3
 #define CONFIG_SYS_NAND_BASE		DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
 #define CONFIG_SYS_NAND_MASK_CLE	0x10
-- 
2.25.1



More information about the U-Boot mailing list