Subject: Re: Async DMA question regarding dma_async_memcpy_buf_to_buf

From: Scott Wood <[email-masked]>
Date: Mon, 24 Nov 2008 13:47:09 -0600

[email-masked] wrote:
> The hardware doesn't care (I'm using an MPC8347E), as far as the DMA 
> engine is concerned these are just addresses.  All of this goes to cache 
> coherency.  The map/unmap functions are supposed to ensure that data is 
> copied and caches flushed at the right times to ensure cache coherency. So 
> 
> the question is this; is the dma_async_memcpy_buf_to_buf() function 
> intended to be bi-directional and is it safe to pass it a 'src' pointer 
> that's actually coming from the device, or does there need to be a second 
> function for doing a copy from the device to the CPU?

The "device" is the DMA engine, thus src is inherently going to the 
device and dest is inherently coming from the device.

-Scott