destination = dma_map_single(dst, len, DMA_FROM_DEVICE);
source = dma_map_single(src, len, DMA_TO_DEVICE);
- ret = ops->transfer(dev, DMA_MEM_TO_MEM, dst, src, len);
+ ret = ops->transfer(dev, DMA_MEM_TO_MEM, destination, source, len);
/* Clean+Invalidate the areas after, so we can see DMA'd data */
dma_unmap_single(destination, len, DMA_FROM_DEVICE);
}
void __edma3_transfer(unsigned long edma3_base_addr, unsigned int edma_slot_num,
- void *dst, void *src, size_t len, size_t s_len)
+ dma_addr_t dst, dma_addr_t src, size_t len, size_t s_len)
{
struct edma3_slot_config slot;
struct edma3_channel_config edma_channel;
}
void __edma3_fill(unsigned long edma3_base_addr, unsigned int edma_slot_num,
- void *dst, u8 val, size_t len)
+ dma_addr_t dst, u8 val, size_t len)
{
int xfer_len;
int max_xfer = EDMA_FILL_BUFFER_SIZE * 65535;
xfer_len = max_xfer;
__edma3_transfer(edma3_base_addr, edma_slot_num, dst,
- edma_fill_buffer, xfer_len,
+ source, xfer_len,
EDMA_FILL_BUFFER_SIZE);
len -= xfer_len;
dst += xfer_len;
dma_addr_t destination = dma_map_single(dst, len, DMA_FROM_DEVICE);
dma_addr_t source = dma_map_single(src, len, DMA_TO_DEVICE);
- __edma3_transfer(edma3_base_addr, edma_slot_num, dst, src, len, len);
+ __edma3_transfer(edma3_base_addr, edma_slot_num, destination, source, len, len);
/* Clean+Invalidate the areas after, so we can see DMA'd data */
dma_unmap_single(destination, len, DMA_FROM_DEVICE);
/* Clean the area, so no writeback into the RAM races with DMA */
dma_addr_t destination = dma_map_single(dst, len, DMA_FROM_DEVICE);
- __edma3_fill(edma3_base_addr, edma_slot_num, dst, val, len);
+ __edma3_fill(edma3_base_addr, edma_slot_num, destination, val, len);
/* Clean+Invalidate the area after, so we can see DMA'd data */
dma_unmap_single(destination, len, DMA_FROM_DEVICE);
#else
-static int ti_edma3_transfer(struct udevice *dev, int direction, void *dst,
- void *src, size_t len)
+static int ti_edma3_transfer(struct udevice *dev, int direction,
+ dma_addr_t dst, dma_addr_t src, size_t len)
{
struct ti_edma3_priv *priv = dev_get_priv(dev);
}
static int udma_transfer(struct udevice *dev, int direction,
- void *dst, void *src, size_t len)
+ dma_addr_t dst, dma_addr_t src, size_t len)
{
struct udma_dev *ud = dev_get_priv(dev);
/* Channel0 is reserved for memcpy */
if (ret)
return ret;
- udma_prep_dma_memcpy(uc, (dma_addr_t)dst, (dma_addr_t)src, len);
+ udma_prep_dma_memcpy(uc, dst, src, len);
udma_start(uc);
udma_poll_completion(uc, &paddr);
udma_stop(uc);
* @len: Length of the data to be copied (number of bytes).
* @return zero on success, or -ve error code.
*/
- int (*transfer)(struct udevice *dev, int direction, void *dst,
- void *src, size_t len);
+ int (*transfer)(struct udevice *dev, int direction, dma_addr_t dst,
+ dma_addr_t src, size_t len);
};
#endif /* _DMA_UCLASS_H */