How to exploit STS pin of Strata Flash

Jared Hulbert jaredeh at gmail.com
Wed Dec 29 23:23:18 EST 2004


> when I helped Thomas Gleixner to debug the code to support 2k-page NAND
> devices, I
> discussed with him about this subject. For NAND chips there are three
> possibilities:
> 1) if the driver can not read the ready/busy pin, MTD waits the maximum
> delay required
> by the device to perform such operations (this clearly reduces performance)
> 2) if the driver can read the ready/busy pin, MTD polls this pin in order to
> detect the end of operation (no accesses on the bus)
> 3) if the ready/busy ping is connected to an IRQ line, the driver can
> "sleep" until
> the processor receives an interrupt from the NAND (I never implemented this
> solution so far)

My biggest concern is this STS pin is not something supported on many
strataflash chips.   Though this might be an elegant solution for a
system with irq lines to spare using these particular chips I don't
think it would be used often enough to be supportable.

> I don't know how NOR/Strata Flash drivers work and I thouhgt they implement
> the well-known data polling algorithm to detect the end of operation.
> However, if they actually "sleeps" as you pointed out, I
> clearly am wrong. If I'm right instead, the data-polling algorithm wastes
> bandwidth
> because it performs a lot of read accesses just to read the value of a bit.

in 2.6.10 drivers/mtd/chips/
cfi_cmdset_0001.c:1065  sleeps for the word write if I understand
cfi_udelay() correctly
cfi_cmdset_0001.c:1308  sleeps for the buffered write if I understand
cfi_udelay() correctly
cfi_cmdset_0001.c:1470  sleeps for the erase

> This can lead to problems for example when you have a bus-demanding
> peripheral such
> as a LCD controller. In this case the wasted bandwith can lead to flickering.
> In conclusion, to avoid data-polling algorithm, it is possible to implement the
> same ready/busy pin strategy used for NAND chips.

I can imagine that happens, but does it?  I'm never been able to see
that kind of effect, have you?  Maybe the sleeps work good enough.  If
this sort of thing happens and we can prove it... well maybe we can
influence the chipheads who design this stuff.

,Jared




More information about the linux-mtd mailing list