Move the NAND parameters from defconfig files to Kconfig for SUNXI
architecture only. Fort now only the CHIP pro is migrated.

It would have been better to convert this defconfig entry to Kconfig for
all supported machines/architectures but it has been abandoned due to a
fairly high amount of errors reported by the tool. This is
probably due to defines quite often being multiplications of
values/other defines not correctly handled.

Signed-off-by: Miquel Raynal <>
 configs/CHIP_pro_defconfig |  4 +++-
 drivers/mtd/nand/Kconfig   | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
index 75951bf03b..9f682239bf 100644
--- a/configs/CHIP_pro_defconfig
+++ b/configs/CHIP_pro_defconfig
@@ -5,7 +5,9 @@ CONFIG_MACH_SUN5I=y
 # CONFIG_CMD_FLASH is not set
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index cf323c5348..fc930a804c 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -168,6 +168,28 @@ config NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS
 comment "Generic NAND options"
+       hex "NAND chip eraseblock size"
+       depends on ARCH_SUNXI
+       help
+         Number of data bytes in one eraseblock for the NAND chip on the
+         board. This is the multiple of NAND_PAGE_SIZE and the number of
+        pages.
+       hex "NAND chip page size"
+       depends on ARCH_SUNXI
+       help
+         Number of data bytes in one page for the NAND chip on the
+        board, not including the OOB area.
+       hex "NAND chip OOB size"
+       depends on ARCH_SUNXI
+       help
+         Number of bytes in the Out-Of-Band area for the NAND chip on
+         the board.
 # Enhance depends when converting drivers to Kconfig which use this config
 # option (mxc_nand, ndfc, omap_gpmc).

U-Boot mailing list

Reply via email to