]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: atmel: Relax tADL_min constraint
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 18:45:01 +0000 (20:45 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 25 Aug 2017 03:59:50 +0000 (20:59 -0700)
commit302d5b79f9ce4fad29fd8e9b8e119c4080123ba1
tree7f95cf515d56da4b1f4aac1f60e782271d5e8472
parentcfb0e04816a8c5c5f9979d12f9c3e0a70899190c
mtd: nand: atmel: Relax tADL_min constraint

Version 4 of the ONFI spec mandates that tADL be at least 400 nanoseconds,
but, depending on the master clock rate, 400 ns may not fit in the tADL
field of the SMC reg. We need to relax the check and accept the -ERANGE
return code.

Note that previous versions of the ONFI spec had a lower tADL_min (100 or
200 ns). It's not clear why this timing constraint got increased but it
seems most NANDs are fine with values lower than 400ns, so we should be
safe.

Fixes: 2051211a35cc ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/atmel/nand-controller.c