mbox series

[v2,0/2] Add GPI immediate DMA support for SPI

Message ID 20241128133351.24593-1-quic_jseerapu@quicinc.com (mailing list archive)
Headers show
Series Add GPI immediate DMA support for SPI | expand

Message

Jyothi Kumar Seerapu Nov. 28, 2024, 1:33 p.m. UTC
The DMA TRE(Transfer ring element) buffer contains the DMA
buffer address. Accessing data from this address can cause
significant delays in SPI transfers, which can be mitigated to
some extent by utilizing immediate DMA support.

QCOM GPI DMA hardware supports an immediate DMA feature for data
up to 8 bytes, storing the data directly in the DMA TRE buffer
instead of the DMA buffer address. This enhancement enables faster
SPI data transfers.

This optimization reduces the average transfer time from 25 us to
16 us for a single SPI transfer of 8 bytes length, with a clock
frequency of 50 MHz.

v1 -> v2:
   - Separated the patches to dmaengine and spi subsystems
   - Removed the type conversions used in gpi_create_spi_tre of gpi.c.
   - Removed the changes which are not required for this feature from
     qcom-gpi-dma.h file. 

Jyothi Kumar Seerapu (2):
  dmaengine: qcom: gpi: Add GPI immediate DMA support
  spi: spi-geni-qcom: Add immediate DMA support

 drivers/dma/qcom/gpi.c           | 32 +++++++++++++++++++++++++++-----
 drivers/spi/spi-geni-qcom.c      |  7 +++++++
 include/linux/dma/qcom-gpi-dma.h |  6 ++++++
 3 files changed, 40 insertions(+), 5 deletions(-)


base-commit: ceab669fdf7b7510b4e4997b33d6f66e433a96db