diff mbox

[U-Boot,v2] armv8/ls1043a: Add MTD partition scheme

Message ID 1469098516-22421-1-git-send-email-wenbin.song@nxp.com
State Accepted
Commit dbe18f16d852216a45f632f0d3cf41f12b55d1ec
Delegated to: York Sun
Headers show

Commit Message

Wenbin song July 21, 2016, 10:55 a.m. UTC
From: Wenbin Song <wenbin.song@nxp.com>

Add and share the the MTD partition scheme with kernel by defualt bootargs.
And add the "mtdparts" env.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
---
Changes for v2: rebase 
---
 include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

Comments

York Sun July 26, 2016, 8:26 p.m. UTC | #1
On 07/21/2016 04:06 AM, Wenbin song wrote:
> From: Wenbin Song <wenbin.song@nxp.com>
>
> Add and share the the MTD partition scheme with kernel by defualt bootargs.
> And add the "mtdparts" env.
>
> Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
> ---
> Changes for v2: rebase
> ---
>  include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
>

Applied to fsl-qoriq master. Awaiting upstream.
Thanks.

York
diff mbox

Patch

diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index a651130..0ad5261 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -241,6 +241,21 @@ 
 #define CONFIG_HWCONFIG
 #define HWCONFIG_BUFFER_SIZE		128
 
+#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
+#define MTDPARTS_DEFAULT "mtdparts=spi0.0:1m(uboot)," \
+			"5m(kernel),1m(dtb),9m(file_system)"
+#else
+#define MTDPARTS_DEFAULT "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
+			"1m(nor_bank0_uboot),1m(nor_bank0_uboot_env)," \
+			"1m(nor_bank0_fman_uconde),40m(nor_bank0_fit)," \
+			"1m(nor_bank4_rcw),1m(nor_bank4_uboot)," \
+			"1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode)," \
+			"40m(nor_bank4_fit);7e800000.flash:" \
+			"1m(nand_uboot),1m(nand_uboot_env)," \
+			"20m(nand_fit);spi0.0:1m(uboot)," \
+			"5m(kernel),1m(dtb),9m(file_system)"
+#endif
+
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
@@ -250,10 +265,13 @@ 
 	"kernel_start=0x61100000\0"		\
 	"kernel_load=0xa0000000\0"		\
 	"kernel_size=0x2800000\0"		\
-	"console=ttyS0,115200\0"
+	"console=ttyS0,115200\0"                \
+	"mtdparts=" MTDPARTS_DEFAULT "\0"
 
 #define CONFIG_BOOTARGS			"console=ttyS0,115200 root=/dev/ram0 " \
-					"earlycon=uart8250,mmio,0x21c0500"
+					"earlycon=uart8250,mmio,0x21c0500 "    \
+					MTDPARTS_DEFAULT
+
 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
 #define CONFIG_BOOTCOMMAND		"sf probe && sf read $kernel_load "    \
 					"e0000 f00000 && bootm $kernel_load"