Skip to content

Commit e7240ab

Browse files
Matthew Majewskivinodkoul
authored andcommitted
dmaengine: ti: edma: support sw triggered chans in of_edma_xlate()
The .of_edma_xlate() function always sets the hw_triggered flag to true. This causes sw triggered channels consumed via the device-tree to not function properly, as the driver incorrectly assumes they are hw triggered. Modify the xlate() function to correctly set the hw_triggered flag to false for channels reserved for memcpy operation (ie, sw triggered). Signed-off-by: Matthew Majewski <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 566beb3 commit e7240ab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/dma/ti/edma.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,8 +2259,12 @@ static struct dma_chan *of_edma_xlate(struct of_phandle_args *dma_spec,
22592259

22602260
return NULL;
22612261
out:
2262-
/* The channel is going to be used as HW synchronized */
2263-
echan->hw_triggered = true;
2262+
/*
2263+
* The channel is going to be HW synchronized, unless it was
2264+
* reserved as a memcpy channel
2265+
*/
2266+
echan->hw_triggered =
2267+
!edma_is_memcpy_channel(i, ecc->info->memcpy_channels);
22642268
return dma_get_slave_channel(chan);
22652269
}
22662270
#else

0 commit comments

Comments
 (0)