diff options
author | Andy Green <andy.green@linaro.org> | 2015-09-11 07:39:05 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2015-09-11 07:45:40 +0800 |
commit | 47c810c27d966b5dbc8038b419bf66caa287d130 (patch) | |
tree | 4f67e3f70d96e3afdb92239726425ad0493d1352 | |
parent | 1eec9e84ab897b64c69e531b033dda80203889e6 (diff) |
xilinx dma fixes
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r-- | drivers/dma/xilinx/xilinx_dma.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 53582a7e24cc..0e7cc3308939 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -351,7 +351,6 @@ static int xilinx_dma_alloc_chan_resources(struct dma_chan *dchan) chan->seg_p + sizeof(*chan->seg_v) * i; list_add_tail(&chan->seg_v[i].node, &chan->free_seg_list); } - dma_cookie_init(dchan); return 0; } @@ -399,11 +398,15 @@ static void xilinx_dma_free_chan_resources(struct dma_chan *dchan) { struct xilinx_dma_chan *chan = to_xilinx_chan(dchan); + pr_err("%s\n", __func__); + xilinx_dma_free_descriptors(chan); dma_free_coherent(chan->dev, sizeof(*chan->seg_v) * XILINX_DMA_NUM_DESCS, chan->seg_v, chan->seg_p); + + INIT_LIST_HEAD(&chan->free_seg_list); } /** @@ -454,7 +457,7 @@ static enum dma_status xilinx_dma_tx_status(struct dma_chan *dchan, struct dma_tx_state *txstate) { struct xilinx_dma_chan *chan = to_xilinx_chan(dchan); - struct xilinx_dma_tx_descriptor *desc; + struct xilinx_dma_tx_descriptor *desc = chan->active_desc; struct xilinx_dma_tx_segment *segment; struct xilinx_dma_desc_hw *hw; enum dma_status ret; @@ -795,6 +798,8 @@ static dma_cookie_t xilinx_dma_tx_submit(struct dma_async_tx_descriptor *tx) spin_unlock_irqrestore(&chan->lock, flags); + pr_err("added cookie %x to queue\n", (u32)cookie); + return cookie; } |