public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Olliver Schinagl <oliver+list@schinagl.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] ARM: sunxi: Experiences NAND flash
Date: Wed, 12 Aug 2015 15:31:15 +0200	[thread overview]
Message-ID: <55CB4AA3.9050809@schinagl.nl> (raw)
In-Reply-To: <55C9E7B4.9090906@schinagl.nl>

Hey Yassin,

I'm affraid. The strange thing that seems very related here is that when 
writing a file onto the flash, it fails and succeeds alternating. It 
never fails or succeeds twice in a row! And this on any board and any 
partition.


root at system-020502824168:/boot# nandwrite -p /dev/mtd0 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 8192 bytes to mtd0 (eraseblock 0, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 00000000 to 0x1fffff
nandwrite: error!: Data was only partially written due to error
            error 5 (Input/output error)
root at system-020502824168:/boot# nandwrite -p /dev/mtd0 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
root at system-020502824168:/boot# nandwrite -p /dev/mtd0 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 8192 bytes to mtd0 (eraseblock 0, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 00000000 to 0x1fffff
nandwrite: error!: Data was only partially written due to error
            error 5 (Input/output error)
root at system-020502824168:/boot# nandwrite -p /dev/mtd0 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 0, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 00000000 to 0x1fffff
Writing data to block 1 at offset 0x200000
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 0, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 00000000 to 0x1fffff
Writing data to block 1 at offset 0x200000
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 1, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 0x200000 to 0x3fffff
Writing data to block 2 at offset 0x400000
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 0, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 00000000 to 0x1fffff
Writing data to block 1 at offset 0x200000
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
root at system-020502824168:/boot# nandwrite -p /dev/mtd2 
u-boot-sunxi-with-spl.bin
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 0, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 00000000 to 0x1fffff
Writing data to block 1 at offset 0x200000
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 1, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 0x200000 to 0x3fffff
Writing data to block 2 at offset 0x400000
libmtd: error!: cannot write 8192 bytes to mtd2 (eraseblock 2, offset 32768)
         error 5 (Input/output error)
Erasing failed write from 0x400000 to 0x5fffff
Writing data to block 3 at offset 0x600000


On 12-08-15 03:19, Yassin Jaffer wrote:
> Hi Oliver
> Did you try without fastmap enabled?
>
> On Tue, Aug 11, 2015 at 10:16 PM, Olliver Schinagl 
> <oliver+list at schinagl.nl <mailto:oliver+list@schinagl.nl>> wrote:
>
>     Hello everybody,
>
>     We are working with Boris and Roy's patch series on getting the
>     NAND flash chip working on Olimex OLinuXino Lime2 boards.
>     Initially, everything looks fine, but we noticed that occasionally
>     (after power/cycle or power cut) ubi fails to mount the partition.
>     It is not something easily enough to reproduce, but it has failed
>     on 5 boards out of 30 we have.
>
>     U-boot reports the following:
>     UBI: default fastmap pool size: 100
>     UBI: default fastmap WL pool size: 25
>     UBI: attaching mtd1 to ubi0
>     UBI: scanning is finished
>     UBI init error 22
>     Error reading superblock on volume 'ubi:boot' errno=-19!
>     ubifsmount - mount UBIFS volume
>
>     whereas the linux kernel booted from sd card gives:
>     ubiattach /dev/ubi_ctrl -m 0
>     [  100.560704] ubi0: default fastmap pool size: 8
>     [  100.565186] ubi0: default fastmap WL pool size: 4
>     [  100.570100] ubi0: attaching mtd0
>     [  100.590469] ubi0: scanning is finished
>     [  100.594732] ubi0 error: ubi_read_volume_table: the layout
>     volume was not found
>     [  100.602675] ubi0 error: ubi_attach_mtd_dev: failed to attach
>     mtd0, error -22
>     ubiattach: error!: cannot attach mtd0
>                error 22 (Invalid argument)
>
>     The u-boot version we are using is a few months out of date
>     U-Boot 2015.07-rc2-g2540c39 (Aug 04 2015 - 16:09:02 +0200)
>     Allwinner Technology
>     arm-none-eabi-gcc (4.8.4-1+11-1) 4.8.4 20141219 (release)
>     GNU ld (2.25-5+5+b1) 2.25
>
>     but the kernel is fairly up to date:
>     4.2.0-rc4-opinicus-g8ec3671
>
>
>     Now I know that the mtd stuff is all very new and all very
>     untested, what I am curious about is a) have other people actually
>     tried the mtd stuff on Allwinner hardware, and b) has anybody
>     encountered this issue as well?
>
>     It's not something very easily reproducible (toggling a machine
>     on/off repeatedly did not trigger it yet) but it does happen.
>
>     Olliver
>
>     -- 
>     You received this message because you are subscribed to the Google
>     Groups "linux-sunxi" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to linux-sunxi+unsubscribe at googlegroups.com
>     <mailto:linux-sunxi%2Bunsubscribe@googlegroups.com>.
>     For more options, visit https://groups.google.com/d/optout.
>
>

  reply	other threads:[~2015-08-12 13:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 12:16 [U-Boot] ARM: sunxi: Experiences NAND flash Olliver Schinagl
2015-08-12 13:31 ` Olliver Schinagl [this message]
2015-08-17  7:48   ` [U-Boot] [linux-sunxi] " Boris Brezillon
2015-08-17  7:34 ` [U-Boot] " Boris Brezillon
2015-08-17  7:51   ` [U-Boot] [linux-sunxi] " Michal Suchanek
2015-08-17  8:30   ` [U-Boot] " Roy Spliet
2015-08-17  9:03     ` Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CB4AA3.9050809@schinagl.nl \
    --to=oliver+list@schinagl.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox