summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorChanghuang Liang <changhuang.liang@starfivetech.com>2026-09-30 00:15:34 -0700
committerMark Brown <broonie@kernel.org>2026-09-30 17:38:50 +0100
commit929b82c85fc10e18804c7743587c5ac84e07310b (patch)
tree1089a84ad63f0e7e4adc0c92b1053ca8cac58854 /scripts/Makefile.thinlto
parent5c99cb15169d6336c446d079f803e1b13916960f (diff)
downloadlinux-929b82c85fc10e18804c7743587c5ac84e07310b.tar.gz
linux-929b82c85fc10e18804c7743587c5ac84e07310b.zip
spi: dw: Support DMA with a single channel
Some platforms, such as StarFive JHB100, provide only one DMA channel for the DW SPI controller. dw_spi_dma_init_generic() requires both the Tx and Rx channels, so DMA is disabled entirely on such platforms. Request both channels at probe time and decide what is usable from the return values. If the first (Rx) channel request fails, fall back to non-DMA transfers as before. If only the second (Tx) channel request fails, keep the Rx channel. Each successfully requested channel is counted in dws->dma_nr_chans. -EPROBE_DEFER on the second channel is still propagated. Full-duplex standard SPI transfers need both channels, so only set ctlr->can_dma and SPI_CONTROLLER_MUST_TX when two channels are available. A single channel can still serve half-duplex transfers, which will be used by the enhanced SPI memory operations in a follow-up patch. Make dw_spi_dma_caps_init() and dw_spi_dma_maxburst_init() cope with a missing channel, and set ctlr->dma_tx/dma_rx only after the capability check has passed so that they never point to a released channel. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> Link: https://patch.msgid.link/20260930071535.7947-3-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