diff options
author | Kedareswara rao Appana <appana.durga.rao@xilinx.com> | 2018-01-03 09:42:11 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2018-01-08 13:54:50 +0300 |
commit | 0e847d44b3f2f7ab5d4a826f25be9b24a632ce9e (patch) | |
tree | d4ea48ae9536cea8c668d49947b04664868de582 /drivers/dma | |
parent | 4b597c634a2a8fbc8ecbdaf7c2b4c8bb68cfba20 (diff) | |
download | linux-0e847d44b3f2f7ab5d4a826f25be9b24a632ce9e.tar.xz |
dmaengine: xilinx_dma: Free BD consistent memory
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/xilinx/xilinx_dma.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 855ea14f6877..27b523530c4a 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); |