[PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[]
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Tue Nov 26 07:42:52 EST 2013
Hi Pekon,
On Tue, Nov 26, 2013 at 07:59:07AM +0000, Gupta, Pekon wrote:
>
> > From: Ezequiel Garcia [mailto:ezequiel.garcia at free-electrons.com]
> [...]
> > My point is: why don't we *remove* the devicetree property nand-bus-
> > width and
> >
> We cannot remove DT property like this, we can only deprecate its use,
> while not breaking the functionality, which is what I'm trying here..
Of course, by "remove" the property I meant make it meaningless in the
driver.
> > 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?
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
More information about the linux-mtd
mailing list