[U-Boot] [PATCH 2/2] nand: Merge changes from Linux nand driver

Christian Hitz christian.hitz at aizo.com
Fri Oct 7 17:04:10 CEST 2011


Am 06.10.2011 23:25, schrieb Scott Wood:
> On 10/06/2011 04:06 PM, Wolfgang Denk wrote:
>> Dear "Hitz, Christian",
>>
>> In message<CD1B567EF015FE41B29FF476B8600DDD26BBF25B89 at vsrv-mail01.newtechgroup.local>  you wrote:
>>> This patch synchronizes the nand driver with the Linux 3.0 state.
>>>
>>> Signed-off-by: Christian Hitz<christian.hitz at aizo.com>
>>> ---
>>>   drivers/mtd/nand/nand_base.c |  578 +++++++++++++++++++++++++++++-------------
>>>   drivers/mtd/nand/nand_bbt.c  |  423 ++++++++++++++++++++++++-------
>>>   drivers/mtd/nand/nand_ecc.c  |  560 +++++++++++++++++++++++++++++++---------
>>>   include/linux/mtd/bbm.h      |   29 ++-
>>>   include/linux/mtd/nand.h     |  378 ++++++++++++++++------------
>>>   include/linux/string.h       |   46 +++-
>>>   lib/string.c                 |  461 ++++++++++++++++++++--------------
>>>   7 files changed, 1709 insertions(+), 766 deletions(-)
>
> What do the string changes have to do with synchronizing the NAND driver?

Strings read from ONFI are now sanitized. For that strim() is used which 
was not yet available in U-Boots string library. Of course I went 
overboard with syncing the whole string library. I'll submit a new 
version that only adds strim().

> How much does this update affect image size?  This may be a good time to
> start ifdeffing portions of the NAND code based on what's actually
> needed by the target.

before: u-boot.bin: 298112 bytes
after: u-boot.bin: 301928 bytes
(based on our at91sam9g20ek based design, ONFI enabled)

One option would be to ifdef the 1-bit software ECC. This would free 
aroud 2k (down to: 299744 bytes).

Regards,
Christian

-- 
Christian Hitz
aizo ag, Schlieren, Switzerland, www.aizo.com


More information about the U-Boot mailing list