diff mbox

[U-Boot,v4,11/16] sunxi: Enable UBI and NAND support

Message ID 16eca7f717019cea8d1b9f430451774b85acce22.1485179128.git-series.maxime.ripard@free-electrons.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Maxime Ripard Jan. 23, 2017, 1:46 p.m. UTC
From: Hans de Goede <hdegoede@redhat.com>

Enable the NAND and UBI support in the configuration header so that we can
(finally) use it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 cmd/Kconfig                    | 4 ++++
 include/configs/sunxi-common.h | 3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 50c943ef8da0..c75e8bf3fe03 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -407,12 +407,14 @@  config CMD_MMC
 
 menuconfig CMD_NAND
 	bool "nand"
+	default y if ARCH_SUNXI
 	help
 	  NAND support.
 
 if CMD_NAND
 config CMD_NAND_TRIMFFS
 	bool "nand write.trimffs"
+	default y if ARCH_SUNXI
 	help
 	  Allows one to skip empty pages when flashing something on a NAND.
 
@@ -807,6 +809,7 @@  config CMD_UBI
 	tristate "Enable UBI - Unsorted block images commands"
 	select CRC32
 	select MTD_UBI
+	default y if ARCH_SUNXI
 	help
 	  UBI is a software layer above MTD layer which admits use of LVM-like
 	  logical volumes on top of MTD devices, hides some complexities of
@@ -820,6 +823,7 @@  config CMD_UBIFS
 	select CRC32
 	select RBTREE if ARCH_SUNXI
 	select LZO if ARCH_SUNXI
+	default y if ARCH_SUNXI
 	help
 	  UBIFS is a file system for flash devices which works on top of UBI.
 
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 254708596eca..589459ffc688 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -132,6 +132,9 @@ 
 #define CONFIG_SYS_NAND_MAX_ECCPOS 1664
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 #define CONFIG_SYS_MAX_NAND_DEVICE 8
+
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
 #endif
 
 #ifdef CONFIG_SPL_SPI_SUNXI