aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/timb_dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2013-10-18 13:35:32 -0400
committerDan Williams <dan.j.williams@intel.com>2013-11-14 14:04:38 -0500
commit54f8d501e842879143e867e70996574a54d1e130 (patch)
tree1fcd65a5152d330167f5eefba5cc5d514ec91da1 /drivers/dma/timb_dma.c
parent6f57fd0578dff23a4bd16118f0cb4201bcec91f1 (diff)
dmaengine: remove DMA unmap from drivers
Remove support for DMA unmapping from drivers as it is no longer needed (DMA core code is now handling it). Cc: Vinod Koul <vinod.koul@intel.com> Cc: Tomasz Figa <t.figa@samsung.com> Cc: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> [djbw: fix up chan2parent() unused warning in drivers/dma/dw/core.c] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/timb_dma.c')
-rw-r--r--drivers/dma/timb_dma.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 1d0c98839087..4506a7b4f972 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -154,38 +154,6 @@ static bool __td_dma_done_ack(struct timb_dma_chan *td_chan)
154 return done; 154 return done;
155} 155}
156 156
157static void __td_unmap_desc(struct timb_dma_chan *td_chan, const u8 *dma_desc,
158 bool single)
159{
160 dma_addr_t addr;
161 int len;
162
163 addr = (dma_desc[7] << 24) | (dma_desc[6] << 16) | (dma_desc[5] << 8) |
164 dma_desc[4];
165
166 len = (dma_desc[3] << 8) | dma_desc[2];
167
168 if (single)
169 dma_unmap_single(chan2dev(&td_chan->chan), addr, len,
170 DMA_TO_DEVICE);
171 else
172 dma_unmap_page(chan2dev(&td_chan->chan), addr, len,
173 DMA_TO_DEVICE);
174}
175
176static void __td_unmap_descs(struct timb_dma_desc *td_desc, bool single)
177{
178 struct timb_dma_chan *td_chan = container_of(td_desc->txd.chan,
179 struct timb_dma_chan, chan);
180 u8 *descs;
181
182 for (descs = td_desc->desc_list; ; descs += TIMB_DMA_DESC_SIZE) {
183 __td_unmap_desc(td_chan, descs, single);
184 if (descs[0] & 0x02)
185 break;
186 }
187}
188
189static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *dma_desc, 157static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *dma_desc,
190 struct scatterlist *sg, bool last) 158 struct scatterlist *sg, bool last)
191{ 159{
@@ -294,10 +262,6 @@ static void __td_finish(struct timb_dma_chan *td_chan)
294 list_move(&td_desc->desc_node, &td_chan->free_list); 262 list_move(&td_desc->desc_node, &td_chan->free_list);
295 263
296 dma_descriptor_unmap(txd); 264 dma_descriptor_unmap(txd);
297 if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP))
298 __td_unmap_descs(td_desc,
299 txd->flags & DMA_COMPL_SRC_UNMAP_SINGLE);
300
301 /* 265 /*
302 * The API requires that no submissions are done from a 266 * The API requires that no submissions are done from a
303 * callback, so we don't need to drop the lock here 267 * callback, so we don't need to drop the lock here