diff options
| author | Changhuang Liang <changhuang.liang@starfivetech.com> | 2026-09-30 00:15:35 -0700 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-30 17:38:52 +0100 |
| commit | 8cc7be24bc5e4b4074146486f434dbeada994f6a (patch) | |
| tree | 46912869b0372228415855b4a0d5ad9b09c551bc /scripts/Makefile.thinlto | |
| parent | 929b82c85fc10e18804c7743587c5ac84e07310b (diff) | |
| download | linux-8cc7be24bc5e4b4074146486f434dbeada994f6a.tar.gz linux-8cc7be24bc5e4b4074146486f434dbeada994f6a.zip | |
spi: dw: Add DMA support for enhanced memory operations
Implement DMA support for enhanced SPI memory operations. These
operations are half-duplex, so they work with either one or two DMA
channels.
Add enhanced memory DMA callbacks (get_chan, setup, can_dma, transfer)
to struct dw_spi_dma_ops and hook them into the generic DMA operations.
They reuse the existing channel configuration, submission and wait
helpers.
With two channels, both are requested at probe time and kept for the
lifetime of the controller. With a single channel, as on JHB100, the
channel is bound to one direction by its "tx"/"rx" DMA specifier. The
channel currently held (dws->txchan or dws->rxchan) records which
direction it serves. It is reused as long as the direction stays the
same, and only released and requested for the other direction when
the transfer direction changes.
In dw_spi_exec_enh_mem_op(), record the direction in dws->tx_dir and
use the DMA path when a channel is available for that direction,
can_dma_enh_mem() accepts the transfer, and the transfer exceeds the
FIFO length; otherwise fall back to the interrupt path.
Also move the udelay(5) workaround into dw_spi_enh_write_cmd_addr() so
it applies to both paths, and enable the generic DMA setup in
dw_spi_jhb100_init().
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
Link: https://patch.msgid.link/20260930071535.7947-4-changhuang.liang@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
