[U-Boot] [PATCH v2 13/34] Convert CONFIG_ENV_IS_IN_ONENAND to Kconfig

Simon Glass
2017-07-24T03:19:48Z

This converts the following to Kconfig:
CONFIG_ENV_IS_IN_ONENAND

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Add new patch to convert CONFIG_ENV_IS_IN_ONENAND to Kconfig

configs/smdkc100_defconfig | 1 +
configs/vct_platinum_onenand_defconfig | 1 +
configs/vct_platinum_onenand_small_defconfig | 1 +
configs/vct_platinumavc_onenand_defconfig | 1 +
configs/vct_platinumavc_onenand_small_defconfig | 1 +
configs/vct_premium_onenand_defconfig | 1 +
configs/vct_premium_onenand_small_defconfig | 1 +
env/Kconfig | 14 ++++++++++++++
include/configs/omap3_evm.h | 1 -
include/configs/smdkc100.h | 1 -
include/configs/vct.h | 1 -
scripts/config_whitelist.txt | 1 -
12 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig
index edaf73a72c..d6e9791651 100644
--- a/configs/smdkc100_defconfig
+++ b/configs/smdkc100_defconfig
@@ -11,4 +11,5 @@ CONFIG_SYS_PROMPT="SMDKC100 # "
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
CONFIG_CMD_FAT=y
+CONFIG_ENV_IS_IN_ONENAND=y
# CONFIG_MMC is not set
diff --git a/configs/vct_platinum_onenand_defconfig b/configs/vct_platinum_onenand_defconfig
index 5d4cccccba..c348827cdd 100644
--- a/configs/vct_platinum_onenand_defconfig
+++ b/configs/vct_platinum_onenand_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_SNTP=y
CONFIG_CMD_FAT=y
CONFIG_CMD_JFFS2=y
CONFIG_CMD_UBI=y
+CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/vct_platinum_onenand_small_defconfig b/configs/vct_platinum_onenand_small_defconfig
index 5a5edd8260..b2babc17e0 100644
--- a/configs/vct_platinum_onenand_small_defconfig
+++ b/configs/vct_platinum_onenand_small_defconfig
@@ -23,4 +23,5 @@ CONFIG_SYS_PROMPT="$ "
CONFIG_CMD_JFFS2=y
CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
+CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_platinumavc_onenand_defconfig b/configs/vct_platinumavc_onenand_defconfig
index 1f0a3f8b49..b2843091e8 100644
--- a/configs/vct_platinumavc_onenand_defconfig
+++ b/configs/vct_platinumavc_onenand_defconfig
@@ -16,4 +16,5 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_JFFS2=y
CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
+CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_platinumavc_onenand_small_defconfig b/configs/vct_platinumavc_onenand_small_defconfig
index 9e2fcbf6d0..b0a1a0ac20 100644
--- a/configs/vct_platinumavc_onenand_small_defconfig
+++ b/configs/vct_platinumavc_onenand_small_defconfig
@@ -23,4 +23,5 @@ CONFIG_SYS_PROMPT="$ "
CONFIG_CMD_JFFS2=y
CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
+CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_premium_onenand_defconfig b/configs/vct_premium_onenand_defconfig
index ac9cf36f68..e0ab1b896e 100644
--- a/configs/vct_premium_onenand_defconfig
+++ b/configs/vct_premium_onenand_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_SNTP=y
CONFIG_CMD_FAT=y
CONFIG_CMD_JFFS2=y
CONFIG_CMD_UBI=y
+CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/vct_premium_onenand_small_defconfig b/configs/vct_premium_onenand_small_defconfig
index 6e649ec0d7..2d6cd09a21 100644
--- a/configs/vct_premium_onenand_small_defconfig
+++ b/configs/vct_premium_onenand_small_defconfig
@@ -23,4 +23,5 @@ CONFIG_SYS_PROMPT="$ "
CONFIG_CMD_JFFS2=y
CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
+CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_SYS_NS16550=y
diff --git a/env/Kconfig b/env/Kconfig
index f0dc49b4d9..16c172408c 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -283,6 +283,20 @@ config ENV_IS_IN_NVRAM
can just be read and written to, without any special
provision.

+config ENV_IS_IN_ONENAND
+ bool "Environment is in OneNAND"
+ help
+ Define this if you want to put your local device's environment in
+ OneNAND.
+
+ - CONFIG_ENV_ADDR:
+ - CONFIG_ENV_SIZE:
+
+ These two #defines are used to determine the device range you
+ want to use for environment. It is assumed that this memory
+ can just be read and written to, without any special
+ provision.
+
config ENV_IS_IN_REMOTE
bool "Environment is in remove memory space"
help
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 76c00d4efa..15eb08bba8 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -267,7 +267,6 @@
#if !defined(CONFIG_ENV_IS_NOWHERE)
#if defined(CONFIG_CMD_NAND)
#elif defined(CONFIG_CMD_ONENAND)
-#define CONFIG_ENV_IS_IN_ONENAND
#define CONFIG_ENV_OFFSET ONENAND_ENV_OFFSET
#endif
#endif /* CONFIG_ENV_IS_NOWHERE */
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index ab75504188..cdfec610b8 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -176,7 +176,6 @@
/*-----------------------------------------------------------------------
* Boot configuration
*/
-#define CONFIG_ENV_IS_IN_ONENAND 1
#define CONFIG_ENV_SIZE (128 << 10) /* 128KiB, 0x20000 */
#define CONFIG_ENV_ADDR (256 << 10) /* 256KiB, 0x40000 */
#define CONFIG_ENV_OFFSET (256 << 10) /* 256KiB, 0x40000 */
diff --git a/include/configs/vct.h b/include/configs/vct.h
index 42f71112f8..a24b0aac28 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -183,7 +183,6 @@

#if defined(CONFIG_VCT_ONENAND)
#define CONFIG_USE_ONENAND_BOARD_INIT
-#define CONFIG_ENV_IS_IN_ONENAND
#define CONFIG_SYS_ONENAND_BASE 0x00000000 /* this is not real address */
#define CONFIG_SYS_FLASH_BASE 0x00000000
#define CONFIG_ENV_ADDR (128 << 10) /* after compr. U-Boot image */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 721a638d53..93f0bf47c6 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -633,7 +633,6 @@ CONFIG_ENV_FLAGS_LIST_STATIC
CONFIG_ENV_FLASHBOOT
CONFIG_ENV_IS_EMBEDDED
CONFIG_ENV_IS_IN_
-CONFIG_ENV_IS_IN_ONENAND
CONFIG_ENV_MAX_ENTRIES
CONFIG_ENV_MIN_ENTRIES
CONFIG_ENV_OFFSET_OOB
--
2.14.0.rc0.284.gd933b75aa4-goog