[U-Boot] [PATCH 4/4 V3] PXA: Adapt Voipac PXA270 to OneNAND SPL

Scott Wood scottwood at freescale.com
Fri Nov 4 17:37:58 CET 2011


On 11/03/2011 07:55 PM, Marek Vasut wrote:
>> On 11/03/2011 04:52 PM, Marek Vasut wrote:
>> Why do we want to separate them?  What is the fundamental difference
>> between OneNAND, and a high-level NAND controller such as fsl_elbc?
> 
> Honestly, I'm not the author of the subsystem, but please check the 
> documentation. The way we retrieve data from onenand is different to NAND.

What documentation?  How is it different?  There are substantial
differences in how we "retrieve data" between drivers that use the NAND
subsystem.  Surely you've seen that in the mxs_nand driver. :-)

>> Maybe there would be some differences on init if we can't produce
>> "normal" ID data, but that doesn't justify duplicating the whole subsystem.
> 
> Where do you see such duplication? cmd_onenand ?

cmd_onenand and env_onenand are the most irritating, since they're at a
layer that really shouldn't care about the differences -- we should
probably have a plain "mtd" command instead, for most of the functionality.

There's also onenand_bbt.c -- what are the hardware-based differences in
how the bad block table is managed?

nand_base.c/onenand_base.c are less clear.  Obviously much of what is in
onenand_base.c would be in the controller driver if it used the NAND
subsystem.  But it looks like some of it is duplication.

>> Why should the code that just wants to use an API to move data around
>> need to care which it is?  Why should there be behavioral differences
>> that aren't rooted in the actual hardware?  Another approach might be to
>> use MTD as the common interface, but factor out common code into
>> libraries that drivers can use, and avoid the main nand_base.c code even
>> for things like fsl_elbc.
> 
> I think you're mistaken here. OneNAND != NAND.

Well, last I tried I couldn't find any public documentation, so all I
have to go on is the code, some marketing-type info, and asking
questions of people that appear to know more about OneNAND than I do. :-)



More information about the U-Boot mailing list