lkml.org 
[lkml]   [2012]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: About dma_sync_single_for_{cpu,device}
On Mon, Jul 30, 2012 at 10:24:01PM +0200, karl.beldan@gmail.com 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


\
 
 \ /
  Last update: 2012-07-30 23:01    [W:0.085 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site