lkml.org 
[lkml]   [2005]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC 0/2] simple SPI framework, refresh + ads7864 driver
> > > can you please describe the data flow in case of DMA transfer? Thanks!
> >
> > In the current model, the controller driver handles it (assuming
> > that it uses DMA not PIO):
> >
> > - Use dma_map_single() at some point between the master->transfer()
> > call and the time the DMA address is handed to DMA hardware.

> So that implies calling dma_map_single() for the memory allocated in stack?

Calling that for whatever is passed, certainly.

But the <linux/spi.h> header does have a comment right next to the
declarations of spi_transfer.tx_buf and rx_buf, saying that "buffers
must work with dma_*map_single() calls.

In general all APIs that use DMA will follow the rules listed under
"What memory is DMA'able?" in:

linux/Documentation/DMA-mapping.txt

The rest of that file is a bit PCI-centric, but that section remains
the primary description of what can be DMA'd. I had assumed that went
without saying; permaps wrongly.

- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-05 17:21    [W:0.979 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site