提交 a2f6721b 编写于 作者: A Alexander Smirnov 提交者: Vinod Koul

dmaengine: ti-dma-crossbar: Fix dra7 reserve function

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: NAlexander Smirnov <asmirnov@ilbers.de>
Acked-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 b753351e
...@@ -308,7 +308,7 @@ static const struct of_device_id ti_dra7_master_match[] = { ...@@ -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) static inline void ti_dra7_xbar_reserve(int offset, int len, unsigned long *p)
{ {
for (; len > 0; len--) 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) static int ti_dra7_xbar_probe(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册