summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/edma.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-04-28 10:49:43 +0000
committerVinod Koul <vinod.koul@intel.com>2014-04-30 10:34:39 +0530
commitcdae05a0f0f7d15837dfd6f4200e8caea03c9cbf (patch)
tree9513241fb0020ad9cbd0b2e2fa36f707e09b864b /include/linux/platform_data/edma.h
parentc2da2340e5818aa72b2e847f1f24b036742ea5c7 (diff)
downloadtalos-op-linux-cdae05a0f0f7d15837dfd6f4200e8caea03c9cbf.tar.gz
talos-op-linux-cdae05a0f0f7d15837dfd6f4200e8caea03c9cbf.zip
dmaengine: edma: Make reading the position of active channels work
As Joel pointed out, edma_read_position() uses memcpy_fromio() to read the parameter ram. That's not synchronized with the internal update as it does a byte by byte copy. We need to do a 32bit read to get a consistent value. Further reading destination and source is pointless. In DEV_TO_MEM transfers we are only interested in the destination, in MEM_TO_DEV we care about the source. In MEM_TO_MEM it really does not matter which one you read. Simple solution: Remove the pointers, select dest/source via a bool and return the read value. Remove the export of this function while at it. The only potential user is the dmaengine and that's always builtin. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/platform_data/edma.h')
-rw-r--r--include/linux/platform_data/edma.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index 923f8a3e4ce0..12f134b1493c 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -130,7 +130,7 @@ void edma_set_src(unsigned slot, dma_addr_t src_port,
enum address_mode mode, enum fifo_width);
void edma_set_dest(unsigned slot, dma_addr_t dest_port,
enum address_mode mode, enum fifo_width);
-void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst);
+dma_addr_t edma_get_position(unsigned slot, bool dst);
void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx);
void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx);
void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt,
OpenPOWER on IntegriCloud