[PATCH 09/10] Convert CONFIG_SYS_NAND_SIZE to Kconfig
Tom Rini
trini at konsulko.com
Sat Nov 12 23:36:50 CET 2022
This converts the following to Kconfig:
CONFIG_SYS_NAND_SIZE
Signed-off-by: Tom Rini <trini at konsulko.com>
---
drivers/mtd/nand/raw/Kconfig | 5 +++++
include/configs/M5329EVB.h | 1 -
include/configs/M5373EVB.h | 1 -
include/configs/m53menlo.h | 6 ------
include/configs/smartweb.h | 1 -
include/configs/taurus.h | 1 -
6 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 5483efeb39b4..eb37b6275998 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -461,6 +461,11 @@ config NAND_MXC
This enables the NAND driver for the NAND flash controller on the
i.MX27 / i.MX31 / i.MX5 processors.
+config SYS_NAND_SIZE
+ int "Size of NAND in kilobytes"
+ depends on NAND_MXC && SPL_NAND_SUPPORT
+ default 268435456
+
config NAND_MXS
bool "MXS NAND support"
depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 47ea51c50724..a39fe5f28a87 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -94,7 +94,6 @@
#ifdef CONFIG_CMD_NAND
# define CONFIG_SYS_NAND_BASE CONFIG_SYS_CS2_BASE
-# define CONFIG_SYS_NAND_SIZE 1
# define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
# define NAND_ALLOW_ERASE_ALL 1
#endif
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index a2e36cc86736..f0734712eaa5 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -95,7 +95,6 @@
#endif
# define CONFIG_SYS_NAND_BASE CONFIG_SYS_CS2_BASE
-# define CONFIG_SYS_NAND_SIZE 1
# define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
# define NAND_ALLOW_ERASE_ALL 1
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index a20b41bdf07c..36522419172e 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -85,12 +85,6 @@
/* Watchdog */
-/*
- * NAND SPL
- */
-
-#define CONFIG_SYS_NAND_SIZE (256 * 1024 * 1024)
-
/*
* Extra Environments
*/
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 538aad9a7bbb..5460c12a17e8 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -96,7 +96,6 @@
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
#define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_TEXT_BASE
-#define CONFIG_SYS_NAND_SIZE (SZ_256M)
#define CONFIG_SYS_NAND_ECCSIZE 256
#define CONFIG_SYS_NAND_ECCBYTES 3
#define CONFIG_SYS_NAND_ECCPOS { 40, 41, 42, 43, 44, 45, 46, 47, \
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 5ab087da8bd0..f130c630dde8 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -130,7 +130,6 @@
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
#define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_TEXT_BASE
-#define CONFIG_SYS_NAND_SIZE (256 * SZ_1M)
#define CONFIG_SYS_NAND_ECCSIZE 256
#define CONFIG_SYS_NAND_ECCBYTES 3
#define CONFIG_SYS_NAND_ECCPOS { 40, 41, 42, 43, 44, 45, 46, 47, \
--
2.25.1
More information about the U-Boot
mailing list