Skip to content

Commit

Permalink
mtd: nand: atmel: Fix EDO mode check
Browse files Browse the repository at this point in the history
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: Boris Brezillon <[email protected]>
Fixes: f9ce2ed ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
Reported-by: Alexander Dahl <[email protected]>
Tested-by: Alexander Dahl <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
  • Loading branch information
Boris Brezillon committed Aug 2, 2017
1 parent 6d29231 commit ee02f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/atmel/nand-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* mode.
*/
if (conf->timings.sdr.tRC_min < 30)
if (conf->timings.sdr.tRC_min < 30000)
return -ENOTSUPP;

atmel_smc_cs_conf_init(smcconf);
Expand Down

0 comments on commit ee02f73

Please sign in to comment.