diff options
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r-- | drivers/dma/fsldma.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 7086a16a55f2..f157c6f76b32 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -86,11 +86,6 @@ static void set_desc_cnt(struct fsldma_chan *chan, | |||
86 | hw->count = CPU_TO_DMA(chan, count, 32); | 86 | hw->count = CPU_TO_DMA(chan, count, 32); |
87 | } | 87 | } |
88 | 88 | ||
89 | static u32 get_desc_cnt(struct fsldma_chan *chan, struct fsl_desc_sw *desc) | ||
90 | { | ||
91 | return DMA_TO_CPU(chan, desc->hw.count, 32); | ||
92 | } | ||
93 | |||
94 | static void set_desc_src(struct fsldma_chan *chan, | 89 | static void set_desc_src(struct fsldma_chan *chan, |
95 | struct fsl_dma_ld_hw *hw, dma_addr_t src) | 90 | struct fsl_dma_ld_hw *hw, dma_addr_t src) |
96 | { | 91 | { |
@@ -101,16 +96,6 @@ static void set_desc_src(struct fsldma_chan *chan, | |||
101 | hw->src_addr = CPU_TO_DMA(chan, snoop_bits | src, 64); | 96 | hw->src_addr = CPU_TO_DMA(chan, snoop_bits | src, 64); |
102 | } | 97 | } |
103 | 98 | ||
104 | static dma_addr_t get_desc_src(struct fsldma_chan *chan, | ||
105 | struct fsl_desc_sw *desc) | ||
106 | { | ||
107 | u64 snoop_bits; | ||
108 | |||
109 | snoop_bits = ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX) | ||
110 | ? ((u64)FSL_DMA_SATR_SREADTYPE_SNOOP_READ << 32) : 0; | ||
111 | return DMA_TO_CPU(chan, desc->hw.src_addr, 64) & ~snoop_bits; | ||
112 | } | ||
113 | |||
114 | static void set_desc_dst(struct fsldma_chan *chan, | 99 | static void set_desc_dst(struct fsldma_chan *chan, |
115 | struct fsl_dma_ld_hw *hw, dma_addr_t dst) | 100 | struct fsl_dma_ld_hw *hw, dma_addr_t dst) |
116 | { | 101 | { |
@@ -121,16 +106,6 @@ static void set_desc_dst(struct fsldma_chan *chan, | |||
121 | hw->dst_addr = CPU_TO_DMA(chan, snoop_bits | dst, 64); | 106 | hw->dst_addr = CPU_TO_DMA(chan, snoop_bits | dst, 64); |
122 | } | 107 | } |
123 | 108 | ||
124 | static dma_addr_t get_desc_dst(struct fsldma_chan *chan, | ||
125 | struct fsl_desc_sw *desc) | ||
126 | { | ||
127 | u64 snoop_bits; | ||
128 | |||
129 | snoop_bits = ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX) | ||
130 | ? ((u64)FSL_DMA_DATR_DWRITETYPE_SNOOP_WRITE << 32) : 0; | ||
131 | return DMA_TO_CPU(chan, desc->hw.dst_addr, 64) & ~snoop_bits; | ||
132 | } | ||
133 | |||
134 | static void set_desc_next(struct fsldma_chan *chan, | 109 | static void set_desc_next(struct fsldma_chan *chan, |
135 | struct fsl_dma_ld_hw *hw, dma_addr_t next) | 110 | struct fsl_dma_ld_hw *hw, dma_addr_t next) |
136 | { | 111 | { |
@@ -408,7 +383,7 @@ static dma_cookie_t fsl_dma_tx_submit(struct dma_async_tx_descriptor *tx) | |||
408 | struct fsl_desc_sw *desc = tx_to_fsl_desc(tx); | 383 | struct fsl_desc_sw *desc = tx_to_fsl_desc(tx); |
409 | struct fsl_desc_sw *child; | 384 | struct fsl_desc_sw *child; |
410 | unsigned long flags; | 385 | unsigned long flags; |
411 | dma_cookie_t cookie; | 386 | dma_cookie_t cookie = -EINVAL; |
412 | 387 | ||
413 | spin_lock_irqsave(&chan->desc_lock, flags); | 388 | spin_lock_irqsave(&chan->desc_lock, flags); |
414 | 389 | ||
@@ -854,10 +829,6 @@ static void fsldma_cleanup_descriptor(struct fsldma_chan *chan, | |||
854 | struct fsl_desc_sw *desc) | 829 | struct fsl_desc_sw *desc) |
855 | { | 830 | { |
856 | struct dma_async_tx_descriptor *txd = &desc->async_tx; | 831 | struct dma_async_tx_descriptor *txd = &desc->async_tx; |
857 | struct device *dev = chan->common.device->dev; | ||
858 | dma_addr_t src = get_desc_src(chan, desc); | ||
859 | dma_addr_t dst = get_desc_dst(chan, desc); | ||
860 | u32 len = get_desc_cnt(chan, desc); | ||
861 | 832 | ||
862 | /* Run the link descriptor callback function */ | 833 | /* Run the link descriptor callback function */ |
863 | if (txd->callback) { | 834 | if (txd->callback) { |