public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: "Gupta, Pekon" <pekon@ti.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"Balbi, Felipe" <balbi@ti.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[]
Date: Mon, 25 Nov 2013 11:52:18 -0300	[thread overview]
Message-ID: <20131125145217.GA14485@localhost> (raw)
In-Reply-To: <20980858CB6D3A4BAE95CA194937D5E73EA4E675@DBDE04.ent.ti.com>

On Mon, Nov 25, 2013 at 01:26:11PM +0000, Gupta, Pekon wrote:
> Hi Ezequiel,
> 
> 
> > From: Ezequiel Garcia [mailto:ezequiel.garcia@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.
> 

You seem to keep insisting with the kernel auto-fixing after wrong DT
configuration. I don't think that should matter.

My point is: why don't we *remove* the devicetree property nand-bus-width and the
NAND_BUSWIDTH_16 entirely, together with this patch?

Sounds like the user shouldn't need to mess with any of these, since we
are able to auto-configure things for him.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  parent reply	other threads:[~2013-11-25 14:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 12:32 [PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[] Pekon Gupta
2013-11-25 12:56 ` Ezequiel Garcia
2013-11-25 13:26   ` Gupta, Pekon
2013-11-25 13:32     ` Gupta, Pekon
2013-11-25 14:52     ` Ezequiel Garcia [this message]
2013-11-26  7:59       ` Gupta, Pekon
2013-11-26 12:42         ` Ezequiel Garcia
2013-11-27  6:03           ` Gupta, Pekon
2013-11-26  7:31 ` Huang Shijie
2013-11-26  7:49   ` Gupta, Pekon
2013-11-26  9:22     ` Huang Shijie
2013-11-26 12:45       ` Ezequiel Garcia
2013-11-29 12:18 ` Ezequiel Garcia
2013-11-29 12:28   ` Gupta, Pekon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131125145217.GA14485@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=balbi@ti.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pekon@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox