mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add enhance SPI DMA support for JHB100 SFC
@ 2026-09-30  7:15 Changhuang Liang
  2026-09-30  7:15 ` [PATCH v2 1/3] spi: dw: Convert the Tx done delay from SCK cycles to time Changhuang Liang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Changhuang Liang @ 2026-09-30  7:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: Serge Semin, linux-spi, linux-kernel, Changhuang Liang

On the JHB100, there is only one channel available for DMA transfer.
In flash access scenarios, it operates in half-duplex mode, so we
can request this DMA channel for the direction that transfers a
larger amount of data. Different transfer directions need to share
a single DMA channel in a time-multiplexed manner.

This series has already been tested on the JHB100 EVB1.

Change since v1:
- Add a new patch 1.
- Keep DMA channels for the lifetime of the controller instead of
  requesting and releasing them for each transfer.
- Optimize the process of requesting/releasing DMA for every
  enhanced SPI transfer, so that the release/request DMA process
  is re-executed only when the direction of a new DMA transfer is
  different from that of the previous DMA transfer.

v1: https://lore.kernel.org/all/20260923095705.233297-1-changhuang.liang@starfivetech.com/

Changhuang Liang (3):
  spi: dw: Convert the Tx done delay from SCK cycles to time
  spi: dw: Support DMA with a single channel
  spi: dw: Add DMA support for enhanced memory operations

 drivers/spi/spi-dw-core.c | 103 +++++++++-----
 drivers/spi/spi-dw-dma.c  | 290 ++++++++++++++++++++++++++++++++++----
 drivers/spi/spi-dw-mmio.c |   2 +
 drivers/spi/spi-dw.h      |   8 ++
 4 files changed, 336 insertions(+), 67 deletions(-)

--
2.25.1

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

end of thread, other threads:[~2026-09-30  7:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30  7:15 [PATCH v2 0/3] Add enhance SPI DMA support for JHB100 SFC Changhuang Liang
2026-09-30  7:15 ` [PATCH v2 1/3] spi: dw: Convert the Tx done delay from SCK cycles to time Changhuang Liang
2026-09-30  7:15 ` [PATCH v2 2/3] spi: dw: Support DMA with a single channel Changhuang Liang
2026-09-30  7:15 ` [PATCH v2 3/3] spi: dw: Add DMA support for enhanced memory operations Changhuang Liang

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®