diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2012-03-06 17:35:47 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-03-13 02:07:22 -0400 |
commit | d3ee98cdcd6198ea1cf75c603178acc8a805b69b (patch) | |
tree | 721f252d07d5e0596fa9b58a7c876dfd75823d0a /drivers/dma/txx9dmac.c | |
parent | 96a2af41c78b1fbb1f567a3486bdc63f7b31c5fd (diff) |
dmaengine: consolidate initialization of cookies
Provide a common function to initialize a channels cookie values.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/txx9dmac.c')
-rw-r--r-- | drivers/dma/txx9dmac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index bb7b3d96ac6f..40440f946385 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
@@ -1034,7 +1034,7 @@ static int txx9dmac_alloc_chan_resources(struct dma_chan *chan) | |||
1034 | return -EIO; | 1034 | return -EIO; |
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | chan->completed_cookie = chan->cookie = 1; | 1037 | dma_cookie_init(chan); |
1038 | 1038 | ||
1039 | dc->ccr = TXX9_DMA_CCR_IMMCHN | TXX9_DMA_CCR_INTENE | CCR_LE; | 1039 | dc->ccr = TXX9_DMA_CCR_IMMCHN | TXX9_DMA_CCR_INTENE | CCR_LE; |
1040 | txx9dmac_chan_set_SMPCHN(dc); | 1040 | txx9dmac_chan_set_SMPCHN(dc); |
@@ -1163,7 +1163,7 @@ static int __init txx9dmac_chan_probe(struct platform_device *pdev) | |||
1163 | dc->ddev->chan[ch] = dc; | 1163 | dc->ddev->chan[ch] = dc; |
1164 | dc->chan.device = &dc->dma; | 1164 | dc->chan.device = &dc->dma; |
1165 | list_add_tail(&dc->chan.device_node, &dc->chan.device->channels); | 1165 | list_add_tail(&dc->chan.device_node, &dc->chan.device->channels); |
1166 | dc->chan.cookie = dc->chan.completed_cookie = 1; | 1166 | dma_cookie_init(&dc->chan); |
1167 | 1167 | ||
1168 | if (is_dmac64(dc)) | 1168 | if (is_dmac64(dc)) |
1169 | dc->ch_regs = &__txx9dmac_regs(dc->ddev)->CHAN[ch]; | 1169 | dc->ch_regs = &__txx9dmac_regs(dc->ddev)->CHAN[ch]; |