NAND timeout issues with blank chip and Marvell NFC
Chris Packham
Chris.Packham at alliedtelesis.co.nz
Wed May 2 15:12:45 PDT 2018
On 03/05/18 03:28, Miquel Raynal wrote:
> 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.
>
Thanks. Let me know if I can do anything on my end.
Also I know our timezones don't exactly overlap but I can probably
arrange access to one of our systems or at the very least an interactive
debug session via irc. Feel free to contact me off-list if you want to
set something up.
>>
>> --- 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?
Sure will do.
>
> Thanks,
> Miquèl
>
>
More information about the linux-mtd
mailing list