Commit ee02f73e authored by Boris Brezillon's avatar Boris Brezillon

mtd: nand: atmel: Fix EDO mode check

EDO mode should be used when tRC is less than 30ns, but timings are
expressed in picoseconds in the nand_sdr_timings struct.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Fixes: f9ce2edd ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
Reported-by: default avatarAlexander Dahl <ada@thorsis.com>
Tested-by: default avatarAlexander Dahl <ada@thorsis.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 6d292310
...@@ -1201,7 +1201,7 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand, ...@@ -1201,7 +1201,7 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,
* tRC < 30ns implies EDO mode. This controller does not support this * tRC < 30ns implies EDO mode. This controller does not support this
* mode. * mode.
*/ */
if (conf->timings.sdr.tRC_min < 30) if (conf->timings.sdr.tRC_min < 30000)
return -ENOTSUPP; return -ENOTSUPP;
atmel_smc_cs_conf_init(smcconf); atmel_smc_cs_conf_init(smcconf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment