summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-13 01:36:49 +0300
committerTom Rini <trini@konsulko.com>2022-12-06 00:05:38 +0300
commita9f03760c1b85cda153723c5dc5d7ad0a64a5acc (patch)
treed80573870b3c1ea46ce4bfa13467b54485d4a9fd
parent1a792803d8905373bc04bbc2a4dc7d0d1ecdd967 (diff)
downloadu-boot-a9f03760c1b85cda153723c5dc5d7ad0a64a5acc.tar.xz
Convert CONFIG_SYS_NAND_PAGE_2K et al to Kconfig
This converts the following to Kconfig: CONFIG_SYS_NAND_PAGE_2K CONFIG_SYS_NAND_PAGE_4K Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--configs/k2l_evm_defconfig1
-rw-r--r--configs/k2l_hs_evm_defconfig1
-rw-r--r--drivers/mtd/nand/raw/Kconfig13
-rw-r--r--include/configs/da850evm.h1
-rw-r--r--include/configs/k2e_evm.h3
-rw-r--r--include/configs/k2g_evm.h3
-rw-r--r--include/configs/k2hk_evm.h3
-rw-r--r--include/configs/k2l_evm.h3
-rw-r--r--include/configs/omapl138_lcdk.h1
9 files changed, 15 insertions, 14 deletions
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index bb91aa3534..13d612ac3f 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 d10965a70f..59ec3a6346 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 3585031ddf..5483efeb39 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 11f104bcb8..5a5c65da16 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 9b25c34982..bbc58be511 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 887fda90d6..bb91751d5d 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 cfc34c7da6..68cbe98b55 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 65988fff06..a18158a7eb 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 233e7b4ee5..d9f70c7532 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