<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I've found a problem in the m25p80 driver (drives a bunch of SPI flash
chips based on similar commands). While the commands that drive those
chips are almost exactly the same, some variance between the chips does
exist. Almost all of them have 64KB erase blocks, but some also have
smaller 4KB erase sectors (terminology differs between chips, but the
two sizes, fairly universally, don't).<br>
<br>
My understanding of the mtd_info struct is that this is precisely what
the "writesize" field is for - specifying different maximal and minimal
erase sizes. The current m25p80 driver does not specify the two sizes
correctly, which leads to total failure when trying to use it to create
UBIFS volumes.<br>
<br>
The second problem I'm having with this driver is that it reports
itself as NOR flash. This is obviously not the case, but I'm a bit at a
loss as to what is. These are not, exactly, NAND flashes. DATAFLASH is
closer to the mark, as both these and the DATAFLASH had SPI interfaces,
but setting the type to DATAFLASH triggers nasty behavior by the jffs2
code, which assumes that data flashes have erase blocks of either 536
or 1056 bytes. The result is that it allocates 512KB of erase blocks,
causing a 1.5MB of overhead on each volume. For a 4MB flash, that is a
large overhead to accept.<br>
<br>
I'm attaching a patch to the m25p80 driver. I would love to receive
comments on the correct flash type to put there for proper operation.
Something that is compatible with jffs2 would be appreciated. I've
written a fix to the jffs2 code, but I'm not sure of its correctness.<br>
<br>
Thanks,<br>
Shachar<br>
<pre class="moz-signature" cols="72">-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a class="moz-txt-link-freetext" href="http://www.lingnu.com">http://www.lingnu.com</a>
</pre>
</body>
</html>