mtd: nand: atmel: Fix EDO mode check

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Aug 6 18:59:04 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ee02f73e04c0e690600f621a3a1d2245834af7fe
Commit:     ee02f73e04c0e690600f621a3a1d2245834af7fe
Parent:     6d29231000bbe0fb9e4893a9c68151ffdd3b5469
Author:     Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Mon Jul 31 10:32:21 2017 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Wed Aug 2 10:26:43 2017 +0200

    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: Boris Brezillon <boris.brezillon at free-electrons.com>
    Fixes: f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
    Reported-by: Alexander Dahl <ada at thorsis.com>
    Tested-by: Alexander Dahl <ada at thorsis.com>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/nand/atmel/nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
index d922a88..2c8baa0 100644
--- a/drivers/mtd/nand/atmel/nand-controller.c
+++ b/drivers/mtd/nand/atmel/nand-controller.c
@@ -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);



More information about the linux-mtd-cvs mailing list