[PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[]

Gupta, Pekon pekon at ti.com
Wed Nov 27 01:03:50 EST 2013


> From: Ezequiel Garcia [mailto:ezequiel.garcia at free-electrons.com]
> > On Tue, Nov 26, 2013 at 07:59:07AM +0000, Gupta, Pekon wrote:
> > > From: Ezequiel Garcia [mailto:ezequiel.garcia at free-electrons.com]
[...]
> > > the NAND_BUSWIDTH_16 entirely, together with this patch?
> > >
> > We need this Macros, as may driver use this after nand_scan_ident()
> > to configure their custom callbacks like:
> > 	if (chip->options & NAND_BUSWIDTH_16)
> > 		chip->read_buf = omap_read_buf16;
> > 	else
> > 		chip->read_buf = omap_read_buf8;
> >
> >
> > > Sounds like the user shouldn't need to mess with any of these, since we
> > > are able to auto-configure things for him.
> > >
> > Yes, end-user is free.. But driver still needs to x16 and x8 information
> > to do some controller level optimizations..
> >
> 
> Right. So, we should keep it but remove the effect on the initial
> configuration. AFAICS, the bus width should be *reported* by the NAND
> core and then each driver will have access to that information to set
> any additional configuration.
> 
> On the other side, no driver should *advise* the bus width.
> 
> Right?

Right .. but still most drivers are using conventional approach and had 
not migrated to NAND_BUSWIDTH_AUTO, so they still set 
chip->options & NAND_BUSWIDTH_16 before calling nand_scan_ident().
So, we should simply ignore that, and not return error.


With regards, pekon


More information about the linux-mtd mailing list