mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/5] spi: Add DMA mode support to spi-qcom-qspi
@ 2023-04-20 13:13 Vijaya Krishna Nivarthi
  2023-04-20 13:13 ` [PATCH v4 1/5] spi: dt-bindings: qcom,spi-qcom-qspi: Add iommus Vijaya Krishna Nivarthi
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Vijaya Krishna Nivarthi @ 2023-04-20 13:13 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, broonie, robh+dt,
	krzysztof.kozlowski+dt, cros-qcom-dts-watchers, linux-arm-msm,
	linux-spi, devicetree, linux-kernel
  Cc: quic_msavaliy, dianders, mka, swboyd, quic_vtanuku,
	Vijaya Krishna Nivarthi

There are large number of QSPI irqs that fire during boot/init and later
on every suspend/resume.
This could be made faster by doing DMA instead of PIO.
Below is comparison for number of interrupts raised in 2 scenarios...
Boot up and stabilise
Suspend/Resume

Sequence   PIO    DMA
=======================
Boot-up    69088  19284
S/R        5066   3430

Speed test results...
spi-nor read times in sec after 2 min uptime
============================================
PIO - Iterations-1000, min=3.18, max=3.74, avg=3.53
DMA - Iterations-1000, min=1.21, max=2.28, avg=1.79

spi-nor write times in sec after 2 min uptime
=============================================
PIO - Iterations-1000, min=3.20, max=8.24, avg=3.58
DMA - Iterations-1000, min=1.25, max=5.13, avg=1.82

Further testing performed...
a) multiple entries in sgt (simulated by max_dma_len = 1024)
b) fallback to pio (simulated by dma setup failure)

Vijaya Krishna Nivarthi (5):
  spi: dt-bindings: qcom,spi-qcom-qspi: Add iommus
  arm64: dts: qcom: sc7180: Add stream-id of qspi to iommus
  arm64: dts: qcom: sc7280: Add stream-id of qspi to iommus
  arm64: dts: qcom: sdm845: Add stream-id of qspi to iommus
  spi: spi-qcom-qspi: Add DMA mode support
---
v3 -> v4:
- Dropped unaligned dma buffer handling
- Added sdm845, sc7180 dtsis to the series

v2 -> v3:
- Modified commit messages
- Made a change to driver based on re-review

v1 -> v2:
- Added documentation file to the series
- Made changes to driver based on HPG re-review
---
 .../bindings/spi/qcom,spi-qcom-qspi.yaml           |   3 +
 arch/arm64/boot/dts/qcom/sc7180.dtsi               |   1 +
 arch/arm64/boot/dts/qcom/sc7280.dtsi               |   1 +
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |   1 +
 drivers/spi/spi-qcom-qspi.c                        | 292 +++++++++++++++++++--
 5 files changed, 271 insertions(+), 27 deletions(-)

-- 
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by the Linux Foundation.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-04-24  9:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-20 13:13 [PATCH v4 0/5] spi: Add DMA mode support to spi-qcom-qspi Vijaya Krishna Nivarthi
2023-04-20 13:13 ` [PATCH v4 1/5] spi: dt-bindings: qcom,spi-qcom-qspi: Add iommus Vijaya Krishna Nivarthi
2023-04-20 13:13 ` [PATCH v4 2/5] arm64: dts: qcom: sc7180: Add stream-id of qspi to iommus Vijaya Krishna Nivarthi
2023-04-20 17:20   ` Doug Anderson
2023-04-20 13:13 ` [PATCH v4 3/5] arm64: dts: qcom: sc7280: " Vijaya Krishna Nivarthi
2023-04-20 17:20   ` Doug Anderson
2023-04-20 13:13 ` [PATCH v4 4/5] arm64: dts: qcom: sdm845: " Vijaya Krishna Nivarthi
2023-04-20 17:20   ` Doug Anderson
2023-04-20 13:13 ` [PATCH v4 5/5] spi: spi-qcom-qspi: Add DMA mode support Vijaya Krishna Nivarthi
2023-04-20 17:19   ` Doug Anderson
2023-04-21 16:57     ` Vijaya Krishna Nivarthi
2023-04-21 17:35       ` Doug Anderson
2023-04-21 18:21         ` Vijaya Krishna Nivarthi
2023-04-21 19:58           ` Doug Anderson
2023-04-24  9:30             ` Vijaya Krishna Nivarthi
2023-04-20 18:09   ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®