From ddd39d0cc1a025a1e2e3c792cc8286dbdfa29b54 Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@konsulko.com>
Date: Wed, 15 Jun 2022 12:03:50 -0400
Subject: [PATCH] Convert CONFIG_SAMSUNG_ONENAND to Kconfig

This converts the following to Kconfig:
   CONFIG_SAMSUNG_ONENAND

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 configs/s5p_goni_defconfig          | 1 +
 configs/s5pc210_universal_defconfig | 1 +
 configs/smdkc100_defconfig          | 1 +
 drivers/mtd/Kconfig                 | 3 +++
 include/configs/s5p_goni.h          | 1 -
 include/configs/s5pc210_universal.h | 1 -
 include/configs/smdkc100.h          | 1 -
 7 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig
index 4d4005de1a..b5f3ae26b6 100644
--- a/configs/s5p_goni_defconfig
+++ b/configs/s5p_goni_defconfig
@@ -50,6 +50,7 @@ CONFIG_DM_I2C_GPIO=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_S5P=y
 CONFIG_MTD=y
+CONFIG_SAMSUNG_ONENAND=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_PMIC_MAX8998=y
 CONFIG_PWM_S5P=y
diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig
index af7fef58a6..a66ae7dec9 100644
--- a/configs/s5pc210_universal_defconfig
+++ b/configs/s5pc210_universal_defconfig
@@ -49,6 +49,7 @@ CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_S5P=y
 CONFIG_MTD=y
+CONFIG_SAMSUNG_ONENAND=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_PMIC_MAX8998=y
 CONFIG_SOFT_SPI=y
diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig
index 8c89c39c9e..5f2ab44d40 100644
--- a/configs/smdkc100_defconfig
+++ b/configs/smdkc100_defconfig
@@ -36,6 +36,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_SAMSUNG_ONENAND=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x98800300
 CONFIG_PWM_S5P=y
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index d0ab7c18c6..3d1f6e43fd 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -168,6 +168,9 @@ config STM32_FLASH
 	 This is the driver of embedded flash for some STMicroelectronics
 	 STM32 MCU.
 
+config SAMSUNG_ONENAND
+	bool "Samsung OneNAND driver support"
+
 config USE_SYS_MAX_FLASH_BANKS
 	bool "Enable Max number of Flash memory banks"
 	help
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index d9eeec48a0..ed4f55a432 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -127,7 +127,6 @@
 #define CONFIG_MMC_DEFAULT_DEV	0
 
 #define CONFIG_USE_ONENAND_BOARD_INIT
-#define CONFIG_SAMSUNG_ONENAND		1
 #define CONFIG_SYS_ONENAND_BASE		0xB0000000
 
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index ab4fe6b460..cbc941afb9 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -88,7 +88,6 @@
 	"opts=always_resume=1"
 
 #define CONFIG_USE_ONENAND_BOARD_INIT
-#define CONFIG_SAMSUNG_ONENAND
 #define CONFIG_SYS_ONENAND_BASE		0x0C000000
 
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index 995623e9a6..4199f2bc8e 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -91,7 +91,6 @@
  */
 
 #define CONFIG_USE_ONENAND_BOARD_INIT
-#define CONFIG_SAMSUNG_ONENAND		1
 #define CONFIG_SYS_ONENAND_BASE		0xE7100000
 
 /*
-- 
2.39.5