Skip to content

Commit 8bc2a36

Browse files
andy-shevbroonie
authored andcommitted
spi: pxa2xx: Update DMA mapping and using logic in the documentation
Update DMA mapping and using logic in the documentation to follow what the code does. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c3aeaf2 commit 8bc2a36

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Documentation/spi/pxa2xx.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,14 @@ mode supports both coherent and stream based DMA mappings.
193193
The following logic is used to determine the type of I/O to be used on
194194
a per "spi_transfer" basis::
195195

196-
if !enable_dma then
197-
always use PIO transfers
196+
if spi_message.len > 65536 then
197+
if spi_message.is_dma_mapped or rx_dma_buf != 0 or tx_dma_buf != 0 then
198+
reject premapped transfers
198199

199-
if spi_message.len > 8191 then
200200
print "rate limited" warning
201201
use PIO transfers
202202

203-
if spi_message.is_dma_mapped and rx_dma_buf != 0 and tx_dma_buf != 0 then
204-
use coherent DMA mode
205-
206-
if rx_buf and tx_buf are aligned on 8 byte boundary then
203+
if enable_dma and the size is in the range [DMA burst size..65536] then
207204
use streaming DMA mode
208205

209206
otherwise

0 commit comments

Comments
 (0)