[PATCH] NAND: add support for reading ONFI parameters from NAND device

Matthieu CASTET matthieu.castet at parrot.com
Mon Aug 2 05:25:49 EDT 2010

Florian Fainelli a écrit :
> Hi Matthieu,
> On Thursday 29 July 2010 09:54:20 Matthieu CASTET wrote:
>> Hi,
>> Also you don't handle endianness (integer are little endian) for value
>> in nand_onfi_params.
> Yes, so far the drivers using those values were doing the correct endian 
> conversion when they need to use them.
In that case use le16, le32, ... type. Also prefer kernel type over 
uintx_t type.

>> This won't work this unknown nand, and not work with some LP nand that
>> doesn't provide additional id bytes.
> So how do you see things regarding the provisioning of the relevant ONFI 
> parameters?
I will see something like in the patch attached in

ONFI parsing is done early in nand_get_flash_type (unknow chip or LP nand).
If the ONFI parsing is ok we bypass the old identification method
(additional id bytes).

As an example I attach a patch that mix your patch and mine.


PS : the NAND_ONFI flags seems useless, we can use onfi_version (0 means 
no onfi).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: onfi.diff
Type: text/x-diff
Size: 10918 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20100802/d7d434ab/attachment.bin>

More information about the linux-mtd mailing list