diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2011-01-03 17:43:56 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-01-04 22:16:13 -0500 |
commit | c04287948ec8308fceedda980373bc7d53620255 (patch) | |
tree | ee5ab1d84715b7c9335036d7471f5d13d237eb84 /drivers/dma | |
parent | d7244e9a27a3da27d62aabf560ee828d7991493e (diff) |
ARM: PL08x: store prep_* flags in async_tx structure
Like other DMA engine drivers do, store the passed flags into the
async_tx structure, so they can be checked when the operation
completes.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 8d8d33ce5684..00058e30a9c3 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -1277,12 +1277,14 @@ static u32 pl08x_select_bus(struct pl08x_driver_data *pl08x, u8 src, u8 dst) | |||
1277 | return cctl; | 1277 | return cctl; |
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | static struct pl08x_txd *pl08x_get_txd(struct pl08x_dma_chan *plchan) | 1280 | static struct pl08x_txd *pl08x_get_txd(struct pl08x_dma_chan *plchan, |
1281 | unsigned long flags) | ||
1281 | { | 1282 | { |
1282 | struct pl08x_txd *txd = kzalloc(sizeof(struct pl08x_txd), GFP_NOWAIT); | 1283 | struct pl08x_txd *txd = kzalloc(sizeof(struct pl08x_txd), GFP_NOWAIT); |
1283 | 1284 | ||
1284 | if (txd) { | 1285 | if (txd) { |
1285 | dma_async_tx_descriptor_init(&txd->tx, &plchan->chan); | 1286 | dma_async_tx_descriptor_init(&txd->tx, &plchan->chan); |
1287 | txd->tx.flags = flags; | ||
1286 | txd->tx.tx_submit = pl08x_tx_submit; | 1288 | txd->tx.tx_submit = pl08x_tx_submit; |
1287 | INIT_LIST_HEAD(&txd->node); | 1289 | INIT_LIST_HEAD(&txd->node); |
1288 | 1290 | ||
@@ -1305,7 +1307,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_dma_memcpy( | |||
1305 | struct pl08x_txd *txd; | 1307 | struct pl08x_txd *txd; |
1306 | int ret; | 1308 | int ret; |
1307 | 1309 | ||
1308 | txd = pl08x_get_txd(plchan); | 1310 | txd = pl08x_get_txd(plchan, flags); |
1309 | if (!txd) { | 1311 | if (!txd) { |
1310 | dev_err(&pl08x->adev->dev, | 1312 | dev_err(&pl08x->adev->dev, |
1311 | "%s no memory for descriptor\n", __func__); | 1313 | "%s no memory for descriptor\n", __func__); |
@@ -1363,7 +1365,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_slave_sg( | |||
1363 | dev_dbg(&pl08x->adev->dev, "%s prepare transaction of %d bytes from %s\n", | 1365 | dev_dbg(&pl08x->adev->dev, "%s prepare transaction of %d bytes from %s\n", |
1364 | __func__, sgl->length, plchan->name); | 1366 | __func__, sgl->length, plchan->name); |
1365 | 1367 | ||
1366 | txd = pl08x_get_txd(plchan); | 1368 | txd = pl08x_get_txd(plchan, flags); |
1367 | if (!txd) { | 1369 | if (!txd) { |
1368 | dev_err(&pl08x->adev->dev, "%s no txd\n", __func__); | 1370 | dev_err(&pl08x->adev->dev, "%s no txd\n", __func__); |
1369 | return NULL; | 1371 | return NULL; |