From: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Date: Wed, 2 Apr 2014 06:28:35 +0000 (+0800)
Subject: powerpc/T208xRDB: add mtdparts suppport
X-Git-Tag: v2025.01-rc5-pxa1908~15374^2~36
X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=4feac1c661d13b86bca8eef289c55c81ed2989ca;p=u-boot.git

powerpc/T208xRDB: add mtdparts suppport

We use dynamical mtdparts partition instead of directly puting
mtd partitions nodes in device tree.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
---

diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 66f8a4ce8f..58448208aa 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -615,6 +615,22 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_DOS_PARTITION
 #endif
 
+/*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#ifndef CONFIG_SYS_NO_FLASH
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT "nor0=fe8000000.nor,nand0=fff800000.flash," \
+			"spi0=spife110000.1"
+#define MTDPARTS_DEFAULT "mtdparts=fe8000000.nor:1m(uboot),5m(kernel)," \
+			"128k(dtb),96m(fs),-(user);fff800000.flash:1m(uboot)," \
+			"5m(kernel),128k(dtb),96m(fs),-(user);spife110000.1:" \
+			"1m(uboot),5m(kernel),128k(dtb),-(user)"
+#endif
+
 /*
  * Environment
  */