[PATCH 0/2] spi: Add DMA mode support to spi-qcom-qspi

Vijaya Krishna Nivarthi posted 2 patches 2 years, 10 months ago
There is a newer version of this series
arch/arm64/boot/dts/qcom/sc7280.dtsi |   1 +
drivers/spi/spi-qcom-qspi.c          | 429 ++++++++++++++++++++++++++++++++---
2 files changed, 399 insertions(+), 31 deletions(-)
[PATCH 0/2] spi: Add DMA mode support to spi-qcom-qspi
Posted by Vijaya Krishna Nivarthi 2 years, 10 months ago
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 acenarios...
Boot up and stabilise
Suspend/Resume

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

Vijaya Krishna Nivarthi (2):
  arm64: dts: qcom: sc7280: Add stream-id of qspi to iommus
  spi: spi-qcom-qspi: Add DMA mode support

 arch/arm64/boot/dts/qcom/sc7280.dtsi |   1 +
 drivers/spi/spi-qcom-qspi.c          | 429 ++++++++++++++++++++++++++++++++---
 2 files changed, 399 insertions(+), 31 deletions(-)

-- 
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by the Linux Foundation.
Re: [PATCH 0/2] spi: Add DMA mode support to spi-qcom-qspi
Posted by Stephen Boyd 2 years, 10 months ago
Quoting Vijaya Krishna Nivarthi (2023-04-04 11:03:18)
> 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 acenarios...
> Boot up and stabilise
> Suspend/Resume
>
> Sequence   PIO    DMA
> =======================
> Boot-up    69088  19284
> S/R        5066   3430
>

The interrupts are less, yes, but does it save time or power?
Re: [PATCH 0/2] spi: Add DMA mode support to spi-qcom-qspi
Posted by Vijaya Krishna Nivarthi 2 years, 10 months ago
Thank you for the review...


On 4/5/2023 2:00 AM, Stephen Boyd wrote:
> Quoting Vijaya Krishna Nivarthi (2023-04-04 11:03:18)
>> 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 acenarios...
>> Boot up and stabilise
>> Suspend/Resume
>>
>> Sequence   PIO    DMA
>> =======================
>> Boot-up    69088  19284
>> S/R        5066   3430
>>
> The interrupts are less, yes, but does it save time or power?

We have not made measurements but the change is expected to improve 
performance.

Testing revealed no regressions.