Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1343793
| From | Priit Laes <plaes@plaes.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] ARM: sunxi: spi: add notice about SPI FIFO limit. |
| Date | 2016-02-26 07:00 +0100 |
| Message-ID | <r6jBw-74Z-7@gated-at.bofh.it> (permalink) |
| References | <r6jBw-74Z-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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); } /* Start the transfer */ -- 2.7.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RESEND 0/2] spi: sun4i: add DMA support Priit Laes <plaes@plaes.org> - 2016-02-26 07:00 +0100
[PATCH 1/2] spi: sun4i: add DMA support Priit Laes <plaes@plaes.org> - 2016-02-26 07:00 +0100
Re: [PATCH 1/2] spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-02-26 13:30 +0100
Re: [PATCH 1/2] spi: sun4i: add DMA support Michal Suchanek <hramrach@gmail.com> - 2016-02-26 14:00 +0100
[PATCH 2/2] ARM: sunxi: spi: add notice about SPI FIFO limit. Priit Laes <plaes@plaes.org> - 2016-02-26 07:00 +0100
Re: [PATCH RESEND 0/2] spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-02-26 13:20 +0100
csiph-web