[PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[]
Gupta, Pekon
pekon at ti.com
Mon Nov 25 08:26:11 EST 2013
Hi Ezequiel,
> From: Ezequiel Garcia [mailto:ezequiel.garcia at free-electrons.com]
> Thanks for taking care of this! :-)
>
Yes, I was waiting for -rc1 to be TI-GPMC driver which still gets configured
from DT independently. However that’s a separate discussion already
going in your earlier thread.
> > On Mon, Nov 25, 2013 at 06:02:08PM +0530, Pekon Gupta wrote:
[...]
> > +
> > + /* re-configure driver is bus-width was incorrectly configured */
> > + if (busw != (chip->options & NAND_BUSWIDTH_16)) {
> > + pr_warn("reconfiguring NAND bus width to %d instead %d
> bit\n",
> > + busw ? 16 : 8,
> > + (chip->options & NAND_BUSWIDTH_16) ? 16 : 8);
> > + chip->options = (chip->options & ~NAND_BUSWIDTH_16) |
> busw;
>
> Looking at this makes me wonder why are we *re* configuring, instead of
> just configuring. I mean, why do we keep the NAND_BUSWIDTH_16 setting?
>
> What use case might need the user to set it, before hand?
>
Nothing.. I just said reconfiguring, bcoz some driver already configure
'chip->options & NAND_BUSWIDTH_16' pre-hand before calling
nand_scan_ident(). So, I wanted to convey that this patch should not
affect any of their functionality. And no change is should be required.
Need this to get tested with -ve testing on different boards..
(like setting in-correct DT binding nand-bus-width and driver should still
be able to detect and probe ONFI params) Then only it proves that this
patch is actually auto-detecting bus-width under all cases for all controllers.
with regards, pekon
More information about the linux-mtd
mailing list