From 6cdd465cbe884d51f566ac5f7f06cc2a82d5a18b Mon Sep 17 00:00:00 2001
From: Chin Liang See <clsee@altera.com>
Date: Tue, 22 Dec 2015 15:32:26 +0800
Subject: [PATCH] arm: socfpga: Enable ubi and ubifs support

When QSPI and NAND is enabled, the ubi and ubifs support
will be enabled too.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
 include/configs/socfpga_common.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 6655152960..35e4a75c3f 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -299,6 +299,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 				"-@1536k(UBI)\0"
 #endif
 
+/* UBI and UBIFS support */
+#if defined(CONFIG_CMD_SF) || defined(CONFIG_CMD_NAND)
+#define CONFIG_CMD_UBI
+#define CONFIG_CMD_UBIFS
+#define CONFIG_RBTREE
+#define CONFIG_LZO
+#endif
+
 /*
  * SPL
  *
-- 
2.39.5