Re: [PATCH/RFC 0/2] simple SPI framework, refresh + ads7864 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux