Re: About dma_sync_single_for_{cpu,device}
From: karl . beldan
Date: Mon Jul 30 2012 - 16:32:39 EST
On Mon, Jul 30, 2012 at 10:24:01PM +0200, karl.beldan@xxxxxxxxx wrote:
> I was expecting the following to work:
> addr = dma_map_single(dev, buffer, size, DMA_TO_DEVICE);
Sorry, I forgot this (invalidate):
dma_sync_single_for_device(dev, buffer, pattern_size, DMA_FROM_DEVICE);
> dev_send(buffer);
> // wait for irq (don't peek in the buffer) ... got irq
> dma_sync_single_single_for_cpu(dev, buffer, pattern_size, DMA_FROM_DEVICE);
> if (!xfer_done(buffer)) // not RAM value
> dma_sync_single_for_device(dev, buffer, pattern_size, DMA_FROM_DEVICE);
> [...]
Karl
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/