[PATCH v3 0/8] Add the Quadspi driver for vf610-twr
David Woodhouse
dwmw2 at infradead.org
Thu Sep 12 11:32:55 EDT 2013
On Thu, 2013-09-12 at 23:30 -0400, Huang Shijie wrote:
>
> we can setup 16 valid instruction sequences at most,
> for example:
> LUT0 - LUT3: for read status of NOR
> LUT4 - LUT7: for write enable of NOR
> ...........
>
> The LUT index is 0 for read-status;
> the LUT index is 1 for write-enable.
So... you load LUT index 0 (buffer #0) with something which essentially
makes it send the byte 0x05, then read one byte back.
And you load LUT index 1 (buffer #1) with something which makes it send
the byte 0x06, and not read anything back.
And then if the transaction that you're asked to make by the client
*happens* to match those pre-loaded buffers, you trigger those
transactions. And if it doesn't, you fall over.
Have you ever considered just loading the buffer with the transaction
you're *asked* to make, and then triggering it? Without preconfiging
*anything* in the buffers at init time?
Use LUT index 0 for the first transaction you're asked to make,
*regardless* of what it is. Copy the bytes in from the request.
Use LUT index 1 for the *next* transaction, unless it's identical to the
first in which case you can re-use index 0.
etc.
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20130912/88a8a2ce/attachment.bin>
More information about the linux-mtd
mailing list