]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dmaengine: qcom: gpi: Add GPI immediate DMA support for SPI protocol
authorJyothi Kumar Seerapu <quic_jseerapu@quicinc.com>
Mon, 9 Dec 2024 07:50:33 +0000 (13:20 +0530)
committerVinod Koul <vkoul@kernel.org>
Tue, 24 Dec 2024 10:35:42 +0000 (16:05 +0530)
commita131169dfa48d6d40da45bca67d1e4f54fa130a6
tree9057ba1d37b4064ae40715adabb54f55e75f32a2
parent06d5363296dbcffb9e52ca4c9cec097105eb81e9
dmaengine: qcom: gpi: Add GPI immediate DMA support for SPI protocol

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.

Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241209075033.16860-1-quic_jseerapu@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/qcom/gpi.c