mtd: rawnand: handle differently chip/controller errors about timings
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 19 Mar 2018 13:47:21 +0000 (14:47 +0100)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 20 Mar 2018 08:47:46 +0000 (09:47 +0100)
commit993447b746820259e21b6c7962523631128d5ca6
treedc1553cec3bc2b9c92762a9c3c0488cfb3f2db73
parent97baea1e6b74c73973fa0922252f880ab15450ea
mtd: rawnand: handle differently chip/controller errors about timings

Usually, the source of the error when setting/getting features does not
matter (if the controller does not support sending the command or if
the chip does not support the operation).

When it comes to timings, if the controller fails it is an error while
if the chip does not support the operation, it can be silently supposed
that it already works with the maximum supported timings.

Introduce some logic in nand_setup_data_interface() to handle that
difference.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/raw/nand_base.c