Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: stm32-dmamux: set dmamux channel id in dma features bitfield

STM32 DMAMUX is used with STM32 DMA1 and DMA2:
- DMAMUX channels 0 to 7 are connected to DMA1 channels 0 to 7
- DMAMUX channels 8 to 15 are connected to DMA2 channels 0 to 7

STM32 MDMA can be triggered by DMA1 and DMA2 channels transfer complete,
and the "request line number" is the DMAMUX channel id (e.g. DMA2 channel 0
triggers MDMA with request line 8).

To well configure MDMA, set DMAMUX channel id in DMA features bitfield,
so that DMA can update struct dma_slave_config peripheral_config properly.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20220829154646.29867-5-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Amelie Delaunay and committed by
Vinod Koul
b9a22954 c6c1a365

+1 -1
+1 -1
drivers/dma/stm32-dmamux.c
··· 147 147 mux->request = dma_spec->args[0]; 148 148 149 149 /* craft DMA spec */ 150 - dma_spec->args[3] = dma_spec->args[2]; 150 + dma_spec->args[3] = dma_spec->args[2] | mux->chan_id << 16; 151 151 dma_spec->args[2] = dma_spec->args[1]; 152 152 dma_spec->args[1] = 0; 153 153 dma_spec->args[0] = mux->chan_id - min;