]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: ti-dma-crossbar: Fix dra7 reserve function
authorAlexander Smirnov <asmirnov@ilbers.de>
Thu, 24 Aug 2017 14:02:59 +0000 (17:02 +0300)
committerVinod Koul <vinod.koul@intel.com>
Mon, 28 Aug 2017 16:32:05 +0000 (22:02 +0530)
DMA crossbar uses 'xbar->dma_inuse' variable to manage allocated routes.
Each bit represents respective DMA channel. If the channel is free, bit
is set to '0', if channel is allocated, bit should be set to '1'.

In reserve function, the bits for requested DMA channels are cleared, so
they are not really reserved, but freed and become ready for allocation.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ti-dma-crossbar.c

index 2403475a37cf9203eb0651ae7f412ef5f63f45d6..2f65a8fde21d4f5be2e2a623676047e4674da27f 100644 (file)
@@ -308,7 +308,7 @@ static const struct of_device_id ti_dra7_master_match[] = {
 static inline void ti_dra7_xbar_reserve(int offset, int len, unsigned long *p)
 {
        for (; len > 0; len--)
-               clear_bit(offset + (len - 1), p);
+               set_bit(offset + (len - 1), p);
 }
 
 static int ti_dra7_xbar_probe(struct platform_device *pdev)