All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH v2] pxa3xx-nand: Remove custom device detection
@ 2013-09-10 11:17 Ezequiel Garcia
  2013-09-10 11:17 ` [RFC/PATCH v2] mtd: nand: pxa3xx: Remove redundant device probing Ezequiel Garcia
  0 siblings, 1 reply; 9+ messages in thread
From: Ezequiel Garcia @ 2013-09-10 11:17 UTC (permalink / raw)
  To: linux-mtd
  Cc: Thomas Petazzoni, Lior Amsalem, Tawfik Bayouk, haojian.zhuang,
	Daniel Mack, b32955, Ezequiel Garcia, Gregory Clement,
	Brian Norris, Willy Tarreau

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-27 11:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 11:17 [RFC/PATCH v2] pxa3xx-nand: Remove custom device detection Ezequiel Garcia
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

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.