diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-13 13:04:23 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-27 11:23:43 -0400 |
commit | db8196df4bb6f117caa163aa73b0f16fd62290bd (patch) | |
tree | b86531031482037d9b31ad57479f2f7091020957 /drivers/dma/pl330.c | |
parent | 49920bc66984a512f4bcc7735a61642cd0e4d6f2 (diff) |
dmaengine: move drivers to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves dma/drivers/* to use new enum
Cc: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Li Yang <leoli@freescale.com>
Cc: Zhang Wei <zw@zh-kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Yong Wang <yong.y.wang@intel.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Cc: Boojin Kim <boojin.kim@samsung.com>
Cc: Barry Song <Baohua.Song@csr.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 571041477ab2..1e58eeb030d8 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -320,14 +320,14 @@ static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned | |||
320 | case DMA_SLAVE_CONFIG: | 320 | case DMA_SLAVE_CONFIG: |
321 | slave_config = (struct dma_slave_config *)arg; | 321 | slave_config = (struct dma_slave_config *)arg; |
322 | 322 | ||
323 | if (slave_config->direction == DMA_TO_DEVICE) { | 323 | if (slave_config->direction == DMA_MEM_TO_DEV) { |
324 | if (slave_config->dst_addr) | 324 | if (slave_config->dst_addr) |
325 | pch->fifo_addr = slave_config->dst_addr; | 325 | pch->fifo_addr = slave_config->dst_addr; |
326 | if (slave_config->dst_addr_width) | 326 | if (slave_config->dst_addr_width) |
327 | pch->burst_sz = __ffs(slave_config->dst_addr_width); | 327 | pch->burst_sz = __ffs(slave_config->dst_addr_width); |
328 | if (slave_config->dst_maxburst) | 328 | if (slave_config->dst_maxburst) |
329 | pch->burst_len = slave_config->dst_maxburst; | 329 | pch->burst_len = slave_config->dst_maxburst; |
330 | } else if (slave_config->direction == DMA_FROM_DEVICE) { | 330 | } else if (slave_config->direction == DMA_DEV_TO_MEM) { |
331 | if (slave_config->src_addr) | 331 | if (slave_config->src_addr) |
332 | pch->fifo_addr = slave_config->src_addr; | 332 | pch->fifo_addr = slave_config->src_addr; |
333 | if (slave_config->src_addr_width) | 333 | if (slave_config->src_addr_width) |
@@ -597,7 +597,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len) | |||
597 | 597 | ||
598 | static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( | 598 | static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( |
599 | struct dma_chan *chan, dma_addr_t dma_addr, size_t len, | 599 | struct dma_chan *chan, dma_addr_t dma_addr, size_t len, |
600 | size_t period_len, enum dma_data_direction direction) | 600 | size_t period_len, enum dma_transfer_direction direction) |
601 | { | 601 | { |
602 | struct dma_pl330_desc *desc; | 602 | struct dma_pl330_desc *desc; |
603 | struct dma_pl330_chan *pch = to_pchan(chan); | 603 | struct dma_pl330_chan *pch = to_pchan(chan); |
@@ -612,13 +612,13 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( | |||
612 | } | 612 | } |
613 | 613 | ||
614 | switch (direction) { | 614 | switch (direction) { |
615 | case DMA_TO_DEVICE: | 615 | case DMA_MEM_TO_DEV: |
616 | desc->rqcfg.src_inc = 1; | 616 | desc->rqcfg.src_inc = 1; |
617 | desc->rqcfg.dst_inc = 0; | 617 | desc->rqcfg.dst_inc = 0; |
618 | src = dma_addr; | 618 | src = dma_addr; |
619 | dst = pch->fifo_addr; | 619 | dst = pch->fifo_addr; |
620 | break; | 620 | break; |
621 | case DMA_FROM_DEVICE: | 621 | case DMA_DEV_TO_MEM: |
622 | desc->rqcfg.src_inc = 0; | 622 | desc->rqcfg.src_inc = 0; |
623 | desc->rqcfg.dst_inc = 1; | 623 | desc->rqcfg.dst_inc = 1; |
624 | src = pch->fifo_addr; | 624 | src = pch->fifo_addr; |
@@ -687,7 +687,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst, | |||
687 | 687 | ||
688 | static struct dma_async_tx_descriptor * | 688 | static struct dma_async_tx_descriptor * |
689 | pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | 689 | pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, |
690 | unsigned int sg_len, enum dma_data_direction direction, | 690 | unsigned int sg_len, enum dma_transfer_direction direction, |
691 | unsigned long flg) | 691 | unsigned long flg) |
692 | { | 692 | { |
693 | struct dma_pl330_desc *first, *desc = NULL; | 693 | struct dma_pl330_desc *first, *desc = NULL; |
@@ -702,9 +702,9 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
702 | return NULL; | 702 | return NULL; |
703 | 703 | ||
704 | /* Make sure the direction is consistent */ | 704 | /* Make sure the direction is consistent */ |
705 | if ((direction == DMA_TO_DEVICE && | 705 | if ((direction == DMA_MEM_TO_DEV && |
706 | peri->rqtype != MEMTODEV) || | 706 | peri->rqtype != MEMTODEV) || |
707 | (direction == DMA_FROM_DEVICE && | 707 | (direction == DMA_DEV_TO_MEM && |
708 | peri->rqtype != DEVTOMEM)) { | 708 | peri->rqtype != DEVTOMEM)) { |
709 | dev_err(pch->dmac->pif.dev, "%s:%d Invalid Direction\n", | 709 | dev_err(pch->dmac->pif.dev, "%s:%d Invalid Direction\n", |
710 | __func__, __LINE__); | 710 | __func__, __LINE__); |
@@ -747,7 +747,7 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
747 | else | 747 | else |
748 | list_add_tail(&desc->node, &first->node); | 748 | list_add_tail(&desc->node, &first->node); |
749 | 749 | ||
750 | if (direction == DMA_TO_DEVICE) { | 750 | if (direction == DMA_MEM_TO_DEV) { |
751 | desc->rqcfg.src_inc = 1; | 751 | desc->rqcfg.src_inc = 1; |
752 | desc->rqcfg.dst_inc = 0; | 752 | desc->rqcfg.dst_inc = 0; |
753 | fill_px(&desc->px, | 753 | fill_px(&desc->px, |