* [v2,4/4] dmaengine: xilinx_dma: Free BD consistent memory
@ 2018-01-03 6:42 Kedareswara rao Appana
0 siblings, 0 replies; only message in thread
From: Kedareswara rao Appana @ 2018-01-03 6:42 UTC (permalink / raw)
To: dan.j.williams, vinod.koul, michal.simek, appanad, lars,
akinobu.mita, joabreu, mike.looijmans, kedare06
Cc: dmaengine, linux-arm-kernel, linux-kernel, Radhey Shyam Pandey
Free BD consistent memory while freeing the channel
i.e in free_chan_resources.
Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
---
Changes for v2:
--> None.
drivers/dma/xilinx/xilinx_dma.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 845e638..a9edbd8 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -764,6 +764,11 @@ static void xilinx_dma_free_chan_resources(struct dma_chan *dchan)
INIT_LIST_HEAD(&chan->free_seg_list);
spin_unlock_irqrestore(&chan->lock, flags);
+ /* Free memory that is allocated for BD */
+ dma_free_coherent(chan->dev, sizeof(*chan->seg_v) *
+ XILINX_DMA_NUM_DESCS, chan->seg_v,
+ chan->seg_p);
+
/* Free Memory that is allocated for cyclic DMA Mode */
dma_free_coherent(chan->dev, sizeof(*chan->cyclic_seg_v),
chan->cyclic_seg_v, chan->cyclic_seg_p);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-03 6:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03 6:42 [v2,4/4] dmaengine: xilinx_dma: Free BD consistent memory Kedareswara rao Appana
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).