[meta-xilinx] u-boot/UBIFS
Joe Hershberger
joe.hershberger at gmail.com
Tue Sep 22 13:12:50 PDT 2015
Hi Ed,
On Tue, Sep 22, 2015 at 2:08 PM, Edward Wingate <edwingate8 at gmail.com> wrote:
> On Mon, Sep 21, 2015 at 12:39 PM, Joe Hershberger
> <joe.hershberger at gmail.com> wrote:
>> #define MTDIDS_DEFAULT "nand0=xilinx_nand"
The RHS just has to match the string used in MTDPARTS_DEFAULT and can
otherwise be anything.
The LHS is the MTD device type followed by number.
> How do I determine the right string to put in this #define? Looking
> at all the .h files in u-boot-xlnx/include/configs, they vary a lot
> and I didn't see this defined in any of the zynq board configs.
I just glanced in common/cmd_mtdparts.c for what's expected. The
documentation could be improved. ;)
> The flash I'm using is two 64MB devices (Spansion S25FL512S) in dual
> stacked configuration.
>
> When I run 'sf probe 0 0 0' from uboot, I get this:
> SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256
> KiB, total 128 MiB
Great, so the spi flash driver appears to be working.
> Linux reports:
> [ 1.010771] m25p80 spi32764.0: s25fl512s (131072 Kbytes)
> [ 1.016024] 3 ofpart partitions found on MTD device spi32764.0
> [ 1.021846] Creating 3 MTD partitions on "spi32764.0":
> [ 1.027054] 0x000000000000-0x000000800000 : "qspi-fsbl-uboot"
> [ 1.033789] 0x000000800000-0x000001c00000 : "qspi-env-itb"
> [ 1.040323] 0x000001c00000-0x000008000000 : "qspi-rootfs"
So Linux being able to read MTD doesn't indicate anything about
U-Boot. At least Linux is working.
> After some digging, I found this thread that indicates that MTD with
> SPI flash is not supported, but there is experimental MTD translation
> layer driver: http://u-boot.10912.n7.nabble.com/SPI-NOR-MTD-s-td178723.html#a178726
>
> Does this still apply here? Or are there Xilinx patches for this in
> u-boot-xlnx?
It appears that this still applies here (common/cmd_mtdparts.c:mtd_id_parse()).
> if (strncmp(p, "nand", 4) == 0) {
> *dev_type = MTD_DEV_TYPE_NAND;
> p += 4;
> } else if (strncmp(p, "nor", 3) == 0) {
> *dev_type = MTD_DEV_TYPE_NOR;
> p += 3;
> } else if (strncmp(p, "onenand", 7) == 0) {
> *dev_type = MTD_DEV_TYPE_ONENAND;
> p += 7;
> } else {
> printf("incorrect device type in %s\n", id);
> return 1;
> }
Bummer. Looks like you'll need to patch it a bit to use SF. Prolly
there is something complete in Linux that you can port. Or try out
that experimental series and give feedback on your experience.
Cheers,
-Joe
More information about the meta-xilinx
mailing list