OSDN Git Service

mtd: rawnand: gpmi: support ->setup_data_interface()
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 2 Mar 2018 14:38:39 +0000 (15:38 +0100)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 20 Mar 2018 11:00:00 +0000 (12:00 +0100)
commit76e1a0086a0c3276b384f77905345e0fcc886fdd
tree0a6539d85c1012c5e42a2fad14399bb184404a31
parentbd0b64340c2d66c0fe1aa99b0b23159d7e0c21f2
mtd: rawnand: gpmi: support ->setup_data_interface()

Until now the GPMI driver had its own timings logic while the core
already handles that and request the NAND controller drivers to support
the ->setup_data_interface() hook. Implement that hook by reusing the
already existing function. No real glue is necessary between core timing
delays and GPMI registers because the driver already translates the
ONFI timing modes into register values.

Make use of the core's tREA, tRLOH and tRHOH values that allow computing
more precise timings for mode [0-3] and get significantly better values
(+20% with an i.MX6 Sabre Auto board). Otherwise use the existing logic.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h