[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180503100114.16d573dc@xps13>
Date: Thu, 3 May 2018 10:01:14 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Boris Brezillon <boris.brezillon@...tlin.com>
Cc: Chris Packham <Chris.Packham@...iedtelesis.co.nz>,
Richard Weinberger <richard@....at>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Marek Vasut <marek.vasut@...il.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
Brian Norris <computersforpeace@...il.com>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] mtd: rawnand: marvell: pass ms delay to wait_op
Hi Boris, Chris,
> > > 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));
> > >
[...]
> > The old pxa3xx driver had hard coded 200ms delays. These delays now work
> > out to 1ms which seems every bit as wrong as 600000000ms.
When the 'keep-config' property is populated, the
->setup_data_interface() hook of the driver is not shown to the core,
which leads to not "updating" the timings like tPROG_max.
While it worked with the old driver that hardcoded this delay, this
might not work anymore with the current driver because it expects
timings.sdr.tPROG_max to be != 0 (and PSEC_TO_MSEC(0) also returns 0).
This is probably something to fix.
Regards,
Miquèl
--
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists