[PATCH 1/2] nand: pxa3xx: Increase READ_ID buffer and make the size static
Ezequiel Garcia
ezequiel at vanguardiasur.com.ar
Fri Aug 14 11:07:51 PDT 2015
On 14 August 2015 at 13:18, Robert Jarzmik <robert.jarzmik at free.fr> wrote:
> Jonas Gorski <jogo at openwrt.org> writes:
>
>>>
>>> - info->data_size = 8;
>>> + info->data_size = READ_ID_BYTES;
>>
>> You are reducing ->data_size from 8 to 7 here, is this intentional?
> I bet it's a small mistake.
>
Ah, good catch. Yes, as Robert explains this is a mistake.
Brian, if you can drop this patch, I'll send a new one.
> The pxa3xx NFC controller requires to read at least 8 bytes, as it is one entry
> FIFO (chapter 3.7.1.2 "Non-DMA Operating mode" of PXA3xx VolII developer
> manual).
>
> Same constraint applies to DMA btw.
>
This is also explained on the A370 specs [1], section 14.4 NAND, Operation
""
For read ID and read status commands, software reads 8B from NDDB,
because the NFCv2
allocates one buffer entry (8B) to hold the read data for these
commands. Valid data is aligned to the
LSB; users should discard non-valid bytes, for example, for a 5B
read-ID command, bytes 0 through
4 are valid while bytes 5 through 7 should be ignored.
""
Read ID count should be set to 7 (the maximum allowed read id count),
buf_count will be set to 7 too, but data_size should be set to 8.
[1] http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
Thanks a lot for the catch,
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
More information about the linux-mtd
mailing list