NAND flash write goes wrong
Ricard Wanderlof
ricard.wanderlof at axis.com
Mon May 14 02:56:18 EDT 2007
On Fri, 11 May 2007, borasah at gmail.com wrote:
>> Sorry, I didn't get it completely right last time. It is good practice to
>> pad the image to a complete eraseblock size, but it shouldn't fill the
>> whole nand flash partition space available, in case there are bad blocks.
>
> Hmm, you say if the erase block size is 100, and the last part of the image is
> 64, the remaining 36 should be padded with 0xFF, but all the other free ones
> can remain as is?
If the partition has been erased, all the other free ones will also be
0xff.
> mkfs.jffs2 -p without SIZE does the above one or to the end of the NAND flash?
> I think the first one...
Yes, it pads up to the next eraseblock. Again, if the partition was newly
erased, the rest of the partition will also contain 0xff.
>> So yes, it should be padded with -p, but not to the full size of the
>> partition, but a couple of eraseblocks less.
>
> You mean "NAND_size - erase_size * x"?
Yes.
>> -p specified to nandwrite should also work as it pads the image with 0xff.
>
> Hmm. You dont have to specify -p to the mkfs.jffs2, nandwrite can also
> do it for you, right?
Yes.
>> Blocks (nand flash terminology rejects the name 'sectors' in favor of
>> 'blocks' and 'pages') can go bad with time, but we're talking about
>> thousands if not tens of thousands of erase/write cycles here. So it seems
>> there's something wrong here.
>
> Yes, I think too. Now ~140 bad sector is reported during the boot. I just did
> at most 50 read/write...
You sound far from wearing the chip out. There must be another problem
there somewhere.
>> There was a patch posted just a week or so ago here which fixed a problem
>> with bad block marking and recognition when not using a flash-based bad
>> block table.
>
> I'm new to the list. Is this Artem's patch? I applied it, but no success...
> Maybe http://lists.infradead.org/pipermail/linux-mtd/2007-May/018087.html?
By Thomas Knobloch I believe, but yes, that's the patch I was thinking of.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list