From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Priit Laes <plaes@plaes.org>
Cc: "Mark Brown" <broonie@kernel.org>, "Chen-Yu Tsai" <wens@csie.org>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
"Emilio López" <emilio@elopez.com.ar>,
"Michal Suchanek" <hramrach@gmail.com>
Subject: Re: [PATCH 2/2] ARM: sunxi: spi: add notice about SPI FIFO limit.
Date: Sun, 6 Mar 2016 19:12:48 +0100 [thread overview]
Message-ID: <20160306181248.GV8418@lukather> (raw)
In-Reply-To: <1456466217-6793-3-git-send-email-plaes@plaes.org>
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
Hi,
On Fri, Feb 26, 2016 at 07:56:57AM +0200, Priit Laes wrote:
> From: Michal Suchanek <hramrach@gmail.com>
>
> When testing SPI without DMA I noticed that filling the FIFO on the
> spi controller causes timeout. This should never happen with DMA support
> so just adding a comment.
>
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
> ---
> drivers/spi/spi-sun4i.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
> index 78141a6..b750664 100644
> --- a/drivers/spi/spi-sun4i.c
> +++ b/drivers/spi/spi-sun4i.c
> @@ -333,7 +333,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
> sun4i_spi_write(sspi, SUN4I_DMA_CTL_REG, 0);
>
> /* Fill the TX FIFO */
> - sun4i_spi_fill_fifo(sspi, SUN4I_FIFO_DEPTH);
> + /* Filling the fifo fully causes timeout for some reason - at least on spi2 on a10s */
> + /* The can_dma check is txlen >= SUN4I_FIFO_DEPTH so with DMA this should never happen anyway. */
> + sun4i_spi_fill_fifo(sspi, SUN4I_FIFO_DEPTH - 1);
Please wrap the lines at 80 chars and use the proper multiline comment
style.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-06 18:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 5:56 [PATCH RESEND 0/2] spi: sun4i: add DMA support Priit Laes
2016-02-26 5:56 ` [PATCH 1/2] " Priit Laes
2016-02-26 12:25 ` Mark Brown
2016-02-26 12:51 ` Michal Suchanek
2016-03-06 21:42 ` Maxime Ripard
2016-03-10 9:01 ` Michal Suchanek
2016-03-17 7:27 ` Maxime Ripard
2016-03-17 10:58 ` Michal Suchanek
2016-03-17 11:43 ` Mark Brown
2016-03-17 11:54 ` Michal Suchanek
2016-03-17 11:58 ` Mark Brown
2016-03-18 20:23 ` Maxime Ripard
2016-03-18 20:33 ` Mark Brown
2016-02-26 5:56 ` [PATCH 2/2] ARM: sunxi: spi: add notice about SPI FIFO limit Priit Laes
2016-03-06 18:12 ` Maxime Ripard [this message]
2016-02-26 12:15 ` [PATCH RESEND 0/2] spi: sun4i: add DMA support Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160306181248.GV8418@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=broonie@kernel.org \
--cc=emilio@elopez.com.ar \
--cc=hramrach@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=plaes@plaes.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).