Skip to content

Add enhance SPI DMA support for JHB100 SFC

Changhuang Liang linux-spi lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3spi: dw: Convert the Tx done delay from SCK cycles to timedrivers/spi/spi-dw-dma.c+14 -60 replies
2/3spi: dw: Support DMA with a single channeldrivers/spi/spi-dw-core.c drivers/spi/spi-dw-dma.c drivers/spi/spi-dw.h+67 -250 replies
3/3spi: dw: Add DMA support for enhanced memory operationsdrivers/spi/spi-dw-core.c drivers/spi/spi-dw-dma.c drivers/spi/spi-dw-mmio.c +1 more+255 -361 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] Add enhance SPI DMA support for JHB100 SFC

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/[email protected]/

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