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>
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index bb91aa3..13d612a 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -80,6 +80,7 @@
 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 d10965a..59ec3a6 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -58,6 +58,7 @@
 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 3585031..5483efe 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -168,6 +168,19 @@
 
 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 11f104b..5a5c65d 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 9b25c34..bbc58be 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 887fda9..bb91751 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 cfc34c7..68cbe98 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 65988ff..a18158a 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 233e7b4..d9f70c7 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