RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,

-----Original Message-----
From: Boris Brezillon [mailto:boris.brezillon@xxxxxxxxxxx] 
Sent: Tuesday, June 12, 2018 12:43 PM
To: Yogesh Narayan Gaur <yogeshnarayan.gaur@xxxxxxx>
Cc: richard@xxxxxx; Prabhakar Kushwaha <prabhakar.kushwaha@xxxxxxx>; Han Xu <han.xu@xxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; linux-spi@xxxxxxxxxxxxxxx; marek.vasut@xxxxxxxxx; Frieder Schrempf <frieder.schrempf@xxxxxxxxx>; broonie@xxxxxxxxxx; linux-mtd@xxxxxxxxxxxxxxxxxxx; miquel.raynal@xxxxxxxxxxx; Fabio Estevam <fabio.estevam@xxxxxxx>; David Wolfe <david.wolfe@xxxxxxx>; computersforpeace@xxxxxxxxx; dwmw2@xxxxxxxxxxxxx
Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller

On Tue, 12 Jun 2018 06:42:42 +0000
Yogesh Narayan Gaur <yogeshnarayan.gaur@xxxxxxx> wrote:

> I have tried JFFS2 mounting with smaller partition size but still getting failure.
> For partition size equal or less than 1MB, getting errors as
>     [   25.044930] jffs2: Too few erase blocks (4)
> Thus, need to have size more than 1MB.
> 
> For 2MB partition size getting error message from jffs2_scan_eraseblock().
>     root@ls1012ardb:~# cat /proc/mtd
>     dev:    size   erasesize  name
>     mtd0: 04000000 00040000 "20c0000.quadspi-0"
>     mtd1: 00500000 00040000 "rcw"
>     mtd2: 00a00000 00040000 "test"
>     mtd3: 00200000 00040000 "rootfs"
>     root@ls1012ardb:~#  mkdir /media/ram ; flash_eraseall /dev/mtd3
>     flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
>     Erasing 256 Kibyte @ 1c0000 -- 100 % complete
>     root@ls1012ardb:~# mount -t jffs2 /dev/mtdblock3 /media/ram/
>     [   26.380989] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x0dd0 instead
>     [   26.390509] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000004c: 0x7366 instead
>     [   26.399999] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000050: 0x736c instead

That's weird. Can you tell me on which platform you're testing?
lsxxx or vf610? Can you dump the NOR after the erase to make sure the memory is actually erased (filled with 0xff)?

I am working on lsxxx platform. With further debugging, I found that my erase operation for second flash device is not working properly.
Need to have debugging for this in Frieder Patch.

When I have created multiple partition for First flash device, then JFFS2 mounting and booting of Linux kernel from rootfstype=jffs2 is successful.
    root@ls1012ardb:~# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00500000 00040000 "rcw"
    mtd1: 00a00000 00040000 "test"
    mtd2: 02e00000 00040000 "rootfs"
    mtd3: 04000000 00040000 "20c0000.quadspi-1"
In above list, for MTD2 partition, able to perform JFFS2 mounting.

Below is logs of erase for both flashes:
    root@ls1012ardb:~# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 04000000 00040000 "20c0000.quadspi-0"
    mtd1: 04000000 00040000 "20c0000.quadspi-1"
    root@ls1012ardb:~# mtd_debug erase /dev/mtd0 0x1000000 0x2000000
    Erased 33554432 bytes from address 0x01000000 in flash
    root@ls1012ardb:~#
    root@ls1012ardb:~# mtd_debug read /dev/mtd0 0x1000000 0xa00000 rp
    Copied 10485760 bytes from address 0x01000000 in flash to rp
    root@ls1012ardb:~# hexdump rp
    0000000 ffff ffff ffff ffff ffff ffff ffff ffff
    *
    0a00000
    root@ls1012ardb:~#
    root@ls1012ardb:~# mtd_debug erase /dev/mtd1 0x1000000 0x2000000
     [   25.023027] random: crng init done
    Erased 33554432 bytes from address 0x01000000 in flash
    root@ls1012ardb:~# mtd_debug read /dev/mtd1 0x1000000 0xa00000 rp
    Copied 10485760 bytes from address 0x01000000 in flash to rp
    root@ls1012ardb:~#
    root@ls1012ardb:~# hexdump rp
    0000000 1985 2003 000c 0000 b0b1 e41e ffff ffff
    0000010 ffff ffff ffff ffff ffff ffff ffff ffff
    *
    0040000 1985 2003 000c 0000 b0b1 e41e ffff ffff
    0040010 ffff ffff ffff ffff ffff ffff ffff ffff

--
Yogesh Gaur
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux