Hi EveryOne!
This is first time I send a letter to everyone. If I make mistake,
please free to correct me. :)
I'm trying to write the first driver which is concerned with DMA. I'm
reading dmatest.c and have some confused problem. Oh! No! I have many
problem..:D
MPC8349's DMA controller like ISA controller but with more features? I
want to mean that MPC8349E's DMA controller will send -MEMR, -MEMW,
-IOR, -IOW ?.
So in DMA APIs such as dma_addr_t dma_map_single(struct device *dev,
void *cpu_addr, size_t size, enum dma_data_direction direction)
*dev will pointer to DMA controller or to peripheral device(FPGA, ISA
device)? From dmatest.c , *dev seem to pointer to a channel of DMA
controller.
The channel is connected to a peripheral device. So calling the API,
DMA controller will be able to access memory from cpu_addr, and
peripheral device does too?
Look struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)(struct
dma_chan *chan, dma_addr_t dest, dma_addr_t src,
size_t len, unsigned long flags);
I want to DMA from device to memory. So how to I can get address of
peripheral device ?
Regards!