[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180410140504.i7kszskwxuoygt5s@flea>
Date: Tue, 10 Apr 2018 16:05:04 +0200
From: Maxime Ripard <maxime.ripard@...tlin.com>
To: Sergey Suloev <ssuloev@...altech.com>
Cc: Chen-Yu Tsai <wens@...e.org>, Mark Brown <broonie@...nel.org>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-spi@...r.kernel.org
Subject: Re: [PATCH v3 3/6] spi: sun6i: restrict transfer length in PIO-mode
On Mon, Apr 09, 2018 at 02:59:57PM +0300, Sergey Suloev wrote:
> > > But as soon as sun4i SPI driverĀ is correctly declaring
> > > max_transfer_size then "smart" clients will work well by limiting a
> > > single transfer size to FIFO depth. I tested it with real hardware,
> > > again.
> > This is really not my point. What would prevent you from doing
> > multiple transfers in that case, and filling the FIFO entirely,
> > waiting for it to be done, then resuming until you have sent the right
> > number of bytes?
>
> Because it makes no sense IMHO. I can't see any single point in allowing
> long PIO transfers. Can you find at least one ?
I'm probably going to state the obvious here, but to allow long transfers?
> I think we should reuse as much SPI core code as possible. The SPI
> core can handle an SPI message with multiple transfers, all we need
> is to have max_transfer_size = FIFO depth and restrict it in
> transfer_one().
There's not a single call to the max_transfer_size hook in the SPI
core in 4.16, so that seems a bit too optimistic.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists