diff mbox

[U-Boot,11/13] colibri_t20: enable mtdparts support

Message ID d85877d15535924a9cb871c7db4fa0dec24f4c03.1436170106.git.marcel.ziswiler@toradex.com
State Superseded
Delegated to: Tom Warren
Headers show

Commit Message

Marcel Ziswiler July 6, 2015, 8:20 a.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Enable mtdparts aka dynamic MTD partition support.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---
 include/configs/colibri_t20.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Simon Glass July 6, 2015, 4:38 p.m. UTC | #1
On 6 July 2015 at 02:20, Marcel Ziswiler <marcel@ziswiler.com> wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> Enable mtdparts aka dynamic MTD partition support.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> ---
>  include/configs/colibri_t20.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 6dc1c3a..1ac7a41 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -67,6 +67,17 @@ 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
+/* Dynamic MTD partition support */
+#define CONFIG_CMD_MTDPARTS	/* Enable 'mtdparts' command line support */
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
+#define MTDIDS_DEFAULT		"nand0=tegra_nand"
+#define MTDPARTS_DEFAULT	"mtdparts=tegra_nand:"		\
+				"2m(u-boot)ro,"			\
+				"1m(u-boot-env),"		\
+				"1m(cfgblock)ro,"		\
+				"-(ubi)"
+
 /* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET		(SZ_2M)