Re: [PATCH v2 3/3] mtd: rawnand: Support for sequential cache reads

Miquel Raynal
2023-07-17T16:37:09Z

Hi Måns,

mans@mansr.com wrote on Mon, 17 Jul 2023 14:11:31 +0100:

> Miquel Raynal <miquel.raynal@bootlin.com> writes:
>
> > So, I should have done that earlier but, could you please slow the
> > whole operation down, just to see if there is something wrong with the
> > timings or if we should look in another direction.
> >
> > Maybe you could add a boolean to flag if the last CMD was a
> > READCACHESEQ, READCACHESTART or READCACHEEND, and if the flag is
> > true, please get the jiffies before and after each waitrdy and
> > delay_ns. Finally, please print the expected delay and the actual one
> > and compare to see if something was too fast compared to what we
> > expected.
>
> Between which points exactly should the delay be measured? Also, there
> is no command called READCACHESTART. Did you mean READSTART or
> something else?

Yeah, whatever command is specific to sequential cache reads:
https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/raw/nand_base.c#L1218
https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/raw/nand_base.c#L1228

> > In a second test, you could simply add a udelay(50); at the end of
> > omap_nand_exec_instr().
>
> That didn't help.

Really? That's disappointing (thanks a lot for your quick feedback).

Let's see what the measurements will return.

Thanks,
Miquèl