[U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
Wenbin Song
wenbin.song at nxp.com
Wed Apr 6 05:24:23 CEST 2016
Hi: York
1, There is an issue for sdk2.0 kernel that the nor-flash can't be probed . we can fix it as follow:
$make menuconfig
x -> Device Drivers
x -> Memory Technology Device (MTD) support
x -> RAM/ROM/Flash chip drivers
x -> Flash chip driver advanced configuration options
x -> Flash cmd/query data swapping
x x ( ) NO
x x (X) BIG_ENDIAN_BYTE
x x ( ) LITTLE_ENDIAN_BYTE
Enable BIG_ENDIAN_BYTE .
2, The spi-nor flash can working on ls1043aqds , and I use the sdk2.0 kernel (ce5a3841f3).
[ 1.598954] m25p80 spi0.0: n25q128a11 (16384 Kbytes)
[ 1.603923] 4 cmdlinepart partitions found on MTD device spi0.0
[ 1.609842] Creating 4 MTD partitions on "spi0.0":
[ 1.614624] 0x000000000000-0x000000100000 : "uboot"
[ 1.624205] ftl_cs: FTL header not found.
[ 1.628421] 0x000000100000-0x000000600000 : "kernel"
[ 1.638086] ftl_cs: FTL header not found.
[ 1.642316] 0x000000600000-0x000000700000 : "dtb"
[ 1.651702] ftl_cs: FTL header not found.
[ 1.655932] 0x000000700000-0x000001000000 : "file_system"
[ 1.666028] ftl_cs: FTL header not found.
Best Regards
Wenbin Song
> -----Original Message-----
> From: York Sun [mailto:york.sun at nxp.com]
> Sent: Wednesday, April 06, 2016 5:02 AM
> To: Wenbin Song <wenbin.song at nxp.com>; Mingkai Hu
> <mingkai.hu at nxp.com>; u-boot at lists.denx.de
> Cc: Qianyu Gong <qianyu.gong at nxp.com>; Shaohui Xie
> <shaohui.xie at nxp.com>; Zhiqiang Hou <zhiqiang.hou at nxp.com>
> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
>
> On 04/05/2016 01:32 PM, York Sun wrote:
> > On 04/01/2016 02:37 AM, Wenbin Song wrote:
> >> 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 at nxp.com>
> >> ---
> >> include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
> >> 1 file changed, 20 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/include/configs/ls1043a_common.h
> >> b/include/configs/ls1043a_common.h
> >> index fd243b1..6964873 100644
> >> --- a/include/configs/ls1043a_common.h
> >> +++ b/include/configs/ls1043a_common.h
> >> @@ -236,6 +236,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" \
> >> @@ -248,10 +263,13 @@
> >> "kernel_start=0x61100000\0" \
> >> "kernel_load=0xa0000000\0" \
> >> "kernel_size=0x2800000\0" \
> >> - "console=ttyAMA0,38400n8\0"
> >> + "console=ttyAMA0,38400n8\0" \
> >> + "mtdparts=" MTDPARTS_DEFAULT "\0"
> >>
> >> #define CONFIG_BOOTARGS "console=ttyS0,115200
> root=/dev/ram0 " \
> >> - "earlycon=uart8250,mmio,0x21c0500"
> >> + "earlycon=uart8250,mmio,0x21c0500 " \
> >> + MTDPARTS_DEFAULT
> >
> > You could use $mtdparts here so your bootcmd doesn't get too long.
> >
>
> Wenbin,
>
> A related question regarding MTD, how do you make NOR MTD device working
> on these boards (ls1043aqds and ls1043ardb)? This is a common file for both
> RDB and QDS. I presume you have verified on both. I have nand working on
> both, spi-nor working on rdb only. I don't have NOR working on either of them.
> It may be not a U-Boot issue though.
>
> York
>
More information about the U-Boot
mailing list