mtd: rawnand: marvell: pass ms delay to wait_op

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 7 00:59:01 PDT 2018


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b76401fc4ba720f0f38f7b1f9d54d5c2308bc18d
Commit:     b76401fc4ba720f0f38f7b1f9d54d5c2308bc18d
Parent:     6732cfd4cac514b556f36b518670af91c8bdf19a
Author:     Chris Packham <chris.packham at alliedtelesis.co.nz>
AuthorDate: Thu May 3 14:21:28 2018 +1200
Committer:  Boris Brezillon <boris.brezillon at bootlin.com>
CommitDate: Fri May 4 10:33:28 2018 +0200

    mtd: rawnand: marvell: pass ms delay to wait_op
    
    marvell_nfc_wait_op() expects the delay to be expressed in milliseconds
    but nand_sdr_timings uses picoseconds. Use PSEC_TO_MSEC when passing
    tPROG_max to marvell_nfc_wait_op().
    
    Fixes: 02f26ecf8c772 ("mtd: nand: add reworked Marvell NAND controller driver")
    Cc: stable at vger.kernel.org
    Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
    Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
    Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com>
---
 drivers/mtd/nand/raw/marvell_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index 1d779a35ac8e..e4b964fd40d8 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -1074,7 +1074,7 @@ static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
 		return ret;
 
 	ret = marvell_nfc_wait_op(chip,
-				  chip->data_interface.timings.sdr.tPROG_max);
+				  PSEC_TO_MSEC(chip->data_interface.timings.sdr.tPROG_max));
 	return ret;
 }
 
@@ -1494,7 +1494,7 @@ static int marvell_nfc_hw_ecc_bch_write_page(struct mtd_info *mtd,
 	}
 
 	ret = marvell_nfc_wait_op(chip,
-				  chip->data_interface.timings.sdr.tPROG_max);
+				  PSEC_TO_MSEC(chip->data_interface.timings.sdr.tPROG_max));
 
 	marvell_nfc_disable_hw_ecc(chip);
 



More information about the linux-mtd-cvs mailing list