Thread (32 messages) flat view 32 messages, 4 authors, 2011-02-14
STALE5652d

[PATCH 1/5] dmaengine: mxs-dma: add dma support for i.MX23/28

From: Russell King - ARM Linux <hidden>
Date: 2011-02-07 09:09:42

On Mon, Feb 07, 2011 at 09:25:21AM +0100, Sascha Hauer wrote:
quoted
+		ccw->next = 0;
+		ccw->bits.chain = 0;
+		ccw->bits.irq = 1;
+		ccw->bits.dec_sem = 1;
+		ccw->bits.wait4end = flags;
+		ccw->bits.halt_on_terminate = 1;
+		ccw->bits.terminate_flush = 1;
+		ccw->bits.pio_num = sg_len;
+		ccw->bits.command = MXS_DMA_NO_XFER;
Does this have a valid usecase? I would just return some error code
here. pio_num and pio_words are unused in the driver and I don't think
a dmaengine driver should have some kind of PIO fallback.
DMA drivers must not perform PIO as a fallback - that's the job of
the driver using the DMA engine API.  The reason is that it buggers up
the DMA buffer ownership rules to the extent that data loss will occur
on ARMv6 and later CPUs.

Also note that the struct device to be used for mapping buffers with
the DMA engine is the dma_device's struct device, not the peripheral
device using the DMA engine.  The DMA engine device is what's
performing the DMA, not the peripheral device.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help