[RFC/PATCH v2] mtd: nand: pxa3xx: Remove redundant device probing

Ezequiel Garcia ezequiel.garcia at free-electrons.com
Tue Sep 10 09:57:30 EDT 2013


On Tue, Sep 10, 2013 at 03:46:49PM +0200, Daniel Mack wrote:
> On 10.09.2013 13:17, Ezequiel Garcia wrote:
> > There's no need to go through this internal probe/auto-detect
> > procedure, since the nand core code will take care of that.
> > This commit removes the configuration and detection functions,
> > together with the built-in flash device table.
> > 
> > Besides being unneeded, it's also wrong to take care of such details
> > wich rightfully belong to the NAND base code. Removing this wrong
> > code, prevents the proliferation of the same mistake in future drivers.
> > 
> > This commit has the effect of forcing the "keep_config" option.
> 
> I get the following build warning with this patch:
> 
>   drivers/mtd/nand/pxa3xx_nand.c:221:13: warning:
> ‘pxa3xx_nand_set_timing’ defined but not used [-Wunused-function]
> 

Yes, that's fine. I'm keeping that until we decide what to do with
timings.

> Apart from that, this seems to work fine on my board,

Great! Which board is that?

> but I suspect that
> it would break systems where the NAND controller is not initialized from
> the bootloader, right?
> 

Right. However, since we can easily add support to configure every controller
parameter (right?) this shouldn't be a problem.

What do you think of this change, Daniel?

IMO, the code is ugly, useless and deprecated enough to consider its removal.
It forces to keep a (duplicated) list of known flash devices and it considers
only 512 and 2048 page sizes, just to name a few limitations.

But I'd love to hear a second opinion.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com



More information about the linux-mtd mailing list