NAND timeout issues with blank chip and Marvell NFC

Miquel Raynal miquel.raynal at bootlin.com
Wed May 2 08:28:30 PDT 2018


Hi Chris,


> >>>>>>> nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda
> >>>>>>> nand: Macronix MX30LF2G18AC
> >>>>>>> nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64

When forcing the ONFI parameters in the core to match the
characteristics of your chip, it looks like I hit the same problems:
http://code.bulix.org/nun6tn-327366

I will search for a fix and let you know.

> 
> --- 8< ---
> Subject: [PATCH] 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().
> 
> Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
> ---
>   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);
> 
> --- 8< ---

Could you please send this patch officially with the proper Fixes:/Cc:
tags?

Thanks,
Miquèl


-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-mtd mailing list