[PATCH v3 0/3] spi: Helper for deriving timeout values

Miquel Raynal miquel.raynal at bootlin.com
Thu Jun 22 14:18:02 PDT 2023


Hi Jernej,

jernej.skrabec at gmail.com wrote on Thu, 22 Jun 2023 18:46:27 +0200:

> Dne četrtek, 22. junij 2023 ob 11:06:31 CEST je Miquel Raynal napisal(a):
> > Hello,
> > 
> > I recently came across an issue with the Atmel spi controller driver
> > which would stop my transfers after a too small timeout when performing
> > big transfers (reading a 4MiB flash in one transfer). My initial idea
> > was to derive a the maximum amount of time a transfer would take
> > depending on its size and use that as value to avoid erroring-out when
> > not relevant. Mark wanted to go further by creating a core helper doing
> > that, based on the heuristics from the sun6i driver.
> > 
> > Here is a small series of 3 patches doing exactly that.
> > 
> > Cheers,
> > Miquèl
> > 
> > Changes in v3:
> > * Collected a tag.  
> 
> Did you? I don't see my a-b at patch 3.

I thought I did, sorry if I missed it. Do you mind re-sending it?

> 
> Best regards,
> Jernej
> 
> > * As my platform runs on 6.1 currently, I cherry-picked a mainline patch
> >   changing s/master/host/ in the atmel controller driver and modified the
> >   series to fit the new naming. I then cherry-picked my three patches and
> >   verified it compiled correctly against a v6.4-rc1.
> > 
> > Miquel Raynal (3):
> >   spi: Create a helper to derive adaptive timeouts
> >   spi: atmel: Prevent false timeouts on long transfers
> >   spi: sun6i: Use the new helper to derive the xfer timeout value
> > 
> >  drivers/spi/spi-atmel.c | 18 +++++++++++-------
> >  drivers/spi/spi-sun6i.c |  2 +-
> >  include/linux/spi/spi.h | 17 +++++++++++++++++
> >  3 files changed, 29 insertions(+), 8 deletions(-)
> > 
> >   
> 
> 
> 
> 

Thanks,
Miquèl



More information about the linux-arm-kernel mailing list