Messages in this thread | | | Date | Wed, 05 Oct 2005 08:18:18 -0700 | From | David Brownell <> | Subject | Re: [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/
| |