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/imx-sdma.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/imx-sdma.c')
-rw-r--r-- | drivers/dma/imx-sdma.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index eab1fe71259e..065de5442c93 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
@@ -246,7 +246,7 @@ struct sdma_engine; | |||
246 | struct sdma_channel { | 246 | struct sdma_channel { |
247 | struct sdma_engine *sdma; | 247 | struct sdma_engine *sdma; |
248 | unsigned int channel; | 248 | unsigned int channel; |
249 | enum dma_data_direction direction; | 249 | enum dma_transfer_direction direction; |
250 | enum sdma_peripheral_type peripheral_type; | 250 | enum sdma_peripheral_type peripheral_type; |
251 | unsigned int event_id0; | 251 | unsigned int event_id0; |
252 | unsigned int event_id1; | 252 | unsigned int event_id1; |
@@ -649,7 +649,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) | |||
649 | struct sdma_buffer_descriptor *bd0 = sdma->channel[0].bd; | 649 | struct sdma_buffer_descriptor *bd0 = sdma->channel[0].bd; |
650 | int ret; | 650 | int ret; |
651 | 651 | ||
652 | if (sdmac->direction == DMA_FROM_DEVICE) { | 652 | if (sdmac->direction == DMA_DEV_TO_MEM) { |
653 | load_address = sdmac->pc_from_device; | 653 | load_address = sdmac->pc_from_device; |
654 | } else { | 654 | } else { |
655 | load_address = sdmac->pc_to_device; | 655 | load_address = sdmac->pc_to_device; |
@@ -910,7 +910,7 @@ static void sdma_free_chan_resources(struct dma_chan *chan) | |||
910 | 910 | ||
911 | static struct dma_async_tx_descriptor *sdma_prep_slave_sg( | 911 | static struct dma_async_tx_descriptor *sdma_prep_slave_sg( |
912 | struct dma_chan *chan, struct scatterlist *sgl, | 912 | struct dma_chan *chan, struct scatterlist *sgl, |
913 | unsigned int sg_len, enum dma_data_direction direction, | 913 | unsigned int sg_len, enum dma_transfer_direction direction, |
914 | unsigned long flags) | 914 | unsigned long flags) |
915 | { | 915 | { |
916 | struct sdma_channel *sdmac = to_sdma_chan(chan); | 916 | struct sdma_channel *sdmac = to_sdma_chan(chan); |
@@ -1007,7 +1007,7 @@ err_out: | |||
1007 | 1007 | ||
1008 | static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( | 1008 | static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( |
1009 | struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len, | 1009 | struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len, |
1010 | size_t period_len, enum dma_data_direction direction) | 1010 | size_t period_len, enum dma_transfer_direction direction) |
1011 | { | 1011 | { |
1012 | struct sdma_channel *sdmac = to_sdma_chan(chan); | 1012 | struct sdma_channel *sdmac = to_sdma_chan(chan); |
1013 | struct sdma_engine *sdma = sdmac->sdma; | 1013 | struct sdma_engine *sdma = sdmac->sdma; |
@@ -1092,7 +1092,7 @@ static int sdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, | |||
1092 | sdma_disable_channel(sdmac); | 1092 | sdma_disable_channel(sdmac); |
1093 | return 0; | 1093 | return 0; |
1094 | case DMA_SLAVE_CONFIG: | 1094 | case DMA_SLAVE_CONFIG: |
1095 | if (dmaengine_cfg->direction == DMA_FROM_DEVICE) { | 1095 | if (dmaengine_cfg->direction == DMA_DEV_TO_MEM) { |
1096 | sdmac->per_address = dmaengine_cfg->src_addr; | 1096 | sdmac->per_address = dmaengine_cfg->src_addr; |
1097 | sdmac->watermark_level = dmaengine_cfg->src_maxburst; | 1097 | sdmac->watermark_level = dmaengine_cfg->src_maxburst; |
1098 | sdmac->word_size = dmaengine_cfg->src_addr_width; | 1098 | sdmac->word_size = dmaengine_cfg->src_addr_width; |