summaryrefslogtreecommitdiff
path: root/Documentation/spi
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-12-08 19:02:55 +0200
committerMark Brown <broonie@kernel.org>2023-12-08 17:50:00 +0000
commit8bc2a3634b87e2235535b5527f83ff529df68b56 (patch)
tree4c61c5005fca52087758b24f750d7db7c0317973 /Documentation/spi
parentc3aeaf2f0ec8af93189488bda3928a1ac7752388 (diff)
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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231208170436.3309648-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/spi')
-rw-r--r--Documentation/spi/pxa2xx.rst11
1 files changed, 4 insertions, 7 deletions
diff --git a/Documentation/spi/pxa2xx.rst b/Documentation/spi/pxa2xx.rst
index 143f1df83f79..19479b801826 100644
--- a/Documentation/spi/pxa2xx.rst
+++ b/Documentation/spi/pxa2xx.rst
@@ -193,17 +193,14 @@ mode supports both coherent and stream based DMA mappings.
The following logic is used to determine the type of I/O to be used on
a per "spi_transfer" basis::
- if !enable_dma then
- always use PIO transfers
+ if spi_message.len > 65536 then
+ if spi_message.is_dma_mapped or rx_dma_buf != 0 or tx_dma_buf != 0 then
+ reject premapped transfers
- if spi_message.len > 8191 then
print "rate limited" warning
use PIO transfers
- if spi_message.is_dma_mapped and rx_dma_buf != 0 and tx_dma_buf != 0 then
- use coherent DMA mode
-
- if rx_buf and tx_buf are aligned on 8 byte boundary then
+ if enable_dma and the size is in the range [DMA burst size..65536] then
use streaming DMA mode
otherwise