All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: <linux-mtd@lists.infradead.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Lior Amsalem <alior@marvell.com>,
	Tawfik Bayouk <tawfik@marvell.com>,
	haojian.zhuang@gmail.com, Daniel Mack <zonque@gmail.com>,
	b32955@freescale.com,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Willy Tarreau <w@1wt.eu>
Subject: [RFC/PATCH v2] pxa3xx-nand: Remove custom device detection
Date: Tue, 10 Sep 2013 08:17:00 -0300	[thread overview]
Message-ID: <1378811821-14766-1-git-send-email-ezequiel.garcia@free-electrons.com> (raw)

The current pxa3xx-nand driver implements its own device detection, duplicating
a funcionality that the NAND base code provides, through nand_scan_ident() plus
nand_scan_tail().

This is not only ugly, but also wrong, for it implements a deprecated (non-ONFI)
device probing method and force the driver to keep its own list of known devices.
In addition, it settles a very bad example for future NAND drivers.

My suggestion is to simply kill the device detection and instead rely fully
on the findings of nand_scan_ident(). After the first nand_scan_iden() the driver
can configure the controller according to the detected device.

However, I'm concerned about the impact of this patch on already deployed systems,
and by the fact that we're removing the built-in "timing parameter" table.

I've noticed that the PXA maintainers have remain largely silent on the recent
patches for this pxa3xx-nand driver, but I would definitely appreciate their
point of view this time.

Although the patch removes the "keep_config" check, I'm not proposing
to discard the keep_config platform data parameter, but quite the opposite:
using "keep_config" by-passes the device detection procedure, so the effect
of this patch is to effectively set "keep_config", relying on bootloader's
settings.

Future patches will add support to re-configure the controller's timing and
other parameters. However, that's a different discussion from the current,
where I'm proposing to discard the ugly and deprecated custom device detection.

This v2 version is just a rebase, to make the patch apply on latest l2-mtd.

Thanks!

Ezequiel Garcia (1):
  mtd: nand: pxa3xx: Remove redundant device probing

 drivers/mtd/nand/pxa3xx_nand.c | 138 ++---------------------------------------
 1 file changed, 4 insertions(+), 134 deletions(-)

-- 
1.8.1.5

             reply	other threads:[~2013-09-10 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 11:17 Ezequiel Garcia [this message]
2013-09-10 11:17 ` [RFC/PATCH v2] mtd: nand: pxa3xx: Remove redundant device probing Ezequiel Garcia
2013-09-10 13:46   ` Daniel Mack
2013-09-10 13:57     ` Ezequiel Garcia
2013-09-10 14:14       ` Daniel Mack
2013-09-10 14:21         ` Ezequiel Garcia
2013-09-24 21:46         ` Setting NAND timings parameters (Re: [RFC/PATCH v2] mtd: nand: pxa3xx: Remove redundant device probing) Ezequiel Garcia
2013-11-26 23:17           ` Brian Norris
2013-11-27 11:38             ` Ezequiel Garcia

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=1378811821-14766-1-git-send-email-ezequiel.garcia@free-electrons.com \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=b32955@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=w@1wt.eu \
    --cc=zonque@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.