[RFC/PATCH v2] pxa3xx-nand: Remove custom device detection

Ezequiel Garcia ezequiel.garcia at free-electrons.com
Tue Sep 10 07:17:00 EDT 2013


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




More information about the linux-mtd mailing list