diff options
author | Vinod Koul <vkoul@kernel.org> | 2018-07-19 12:52:26 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-10-07 09:55:10 -0400 |
commit | dea7a9fbb009ba0629c44fcf105f2d8b0ff74e9f (patch) | |
tree | 26b1d4adcd1e88ccc53d1b5aad21c631a2ad1e03 | |
parent | 7f0c145089537125ba91852eddebe13b2c1266fb (diff) |
dmaengine: imx-dma: remove dma_slave_config direction usage
dma_slave_config direction was marked as deprecated quite some
time back, remove the usage from this driver so that the field
can be removed
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/dma/imx-dma.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 75b6ff0415ee..c2fff3f6c9ca 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c | |||
@@ -162,6 +162,7 @@ struct imxdma_channel { | |||
162 | bool enabled_2d; | 162 | bool enabled_2d; |
163 | int slot_2d; | 163 | int slot_2d; |
164 | unsigned int irq; | 164 | unsigned int irq; |
165 | struct dma_slave_config config; | ||
165 | }; | 166 | }; |
166 | 167 | ||
167 | enum imx_dma_type { | 168 | enum imx_dma_type { |
@@ -675,14 +676,15 @@ static int imxdma_terminate_all(struct dma_chan *chan) | |||
675 | return 0; | 676 | return 0; |
676 | } | 677 | } |
677 | 678 | ||
678 | static int imxdma_config(struct dma_chan *chan, | 679 | static int imxdma_config_write(struct dma_chan *chan, |
679 | struct dma_slave_config *dmaengine_cfg) | 680 | struct dma_slave_config *dmaengine_cfg, |
681 | enum dma_transfer_direction direction) | ||
680 | { | 682 | { |
681 | struct imxdma_channel *imxdmac = to_imxdma_chan(chan); | 683 | struct imxdma_channel *imxdmac = to_imxdma_chan(chan); |
682 | struct imxdma_engine *imxdma = imxdmac->imxdma; | 684 | struct imxdma_engine *imxdma = imxdmac->imxdma; |
683 | unsigned int mode = 0; | 685 | unsigned int mode = 0; |
684 | 686 | ||
685 | if (dmaengine_cfg->direction == DMA_DEV_TO_MEM) { | 687 | if (direction == DMA_DEV_TO_MEM) { |
686 | imxdmac->per_address = dmaengine_cfg->src_addr; | 688 | imxdmac->per_address = dmaengine_cfg->src_addr; |
687 | imxdmac->watermark_level = dmaengine_cfg->src_maxburst; | 689 | imxdmac->watermark_level = dmaengine_cfg->src_maxburst; |
688 | imxdmac->word_size = dmaengine_cfg->src_addr_width; | 690 | imxdmac->word_size = dmaengine_cfg->src_addr_width; |
@@ -723,6 +725,16 @@ static int imxdma_config(struct dma_chan *chan, | |||
723 | return 0; | 725 | return 0; |
724 | } | 726 | } |
725 | 727 | ||
728 | static int imxdma_config(struct dma_chan *chan, | ||
729 | struct dma_slave_config *dmaengine_cfg) | ||
730 | { | ||
731 | struct imxdma_channel *imxdmac = to_imxdma_chan(chan); | ||
732 | |||
733 | memcpy(&imxdmac->config, dmaengine_cfg, sizeof(*dmaengine_cfg)); | ||
734 | |||
735 | return 0; | ||
736 | } | ||
737 | |||
726 | static enum dma_status imxdma_tx_status(struct dma_chan *chan, | 738 | static enum dma_status imxdma_tx_status(struct dma_chan *chan, |
727 | dma_cookie_t cookie, | 739 | dma_cookie_t cookie, |
728 | struct dma_tx_state *txstate) | 740 | struct dma_tx_state *txstate) |
@@ -905,6 +917,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic( | |||
905 | desc->desc.callback = NULL; | 917 | desc->desc.callback = NULL; |
906 | desc->desc.callback_param = NULL; | 918 | desc->desc.callback_param = NULL; |
907 | 919 | ||
920 | imxdma_config_write(chan, &imxdmac->config, direction); | ||
921 | |||
908 | return &desc->desc; | 922 | return &desc->desc; |
909 | } | 923 | } |
910 | 924 | ||