summaryrefslogtreecommitdiffstats
path: root/include/dma.h
Commit message (Collapse)AuthorAgeFilesLines
* driver: Adopt DMA mask concept from LinuxAndrey Smirnov2018-08-311-1/+11
| | | | | | | | | | In order to be able to detect cases where DMA isn't capable of reaching every memory address, port the concept of DMA mask, dma_set_mask() function and add appropriate check to dma_mapping_error(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dma: Add prototypes for dma mapping functionsSascha Hauer2018-03-291-0/+12
| | | | | | | | | | | Right now we only have the dma_sync_single_* functions, but no functions for actually mapping a pointer. The mapping functions become necessary when casting a pointer to unsigned long to get a dma address is not enough. (I'm not even going so far that we'll add IOMMU support, but on some architectures we need a place where we can check if a pointer is DMA mappable at all) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dma: Use dma_addr_t as type for DMA addressesSascha Hauer2018-03-291-2/+2
| | | | | | | DMA addresses are not necessarily the same as unsigned long. Fix the type for the dma_sync_single_* operations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* implement dma_alloc_writecombineSascha Hauer2015-08-071-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: move DMA alloc functions to dma.hLucas Stach2015-03-061-0/+2
| | | | | | | | | | This better separates the DMA from the MMU functionality. Also move all drivers that only depends on asm/mmu.h for the alloc functions over to the common header. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dma: add streaming DMA opsLucas Stach2015-03-061-0/+11
| | | | | | | | This will allow us to implement cache maintenance in a platform agnostic way. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blackfin, mips, openrisc, ppc, sandbox, x86: add generic dma_alloc, dma_free ↵Marc Kleine-Budde2012-06-301-0/+30
inlines Some drivers call dma_inv_range() on buffers, on arm these buffers must be cache line aligned. This patch introduces a generic dma_alloc, dma_free. Archs can implement in their own functions in "asm/dma.h" and add a: #define dma_alloc dma_alloc #define dma_free dma_free On all other archs the generic versions, which translate into xmalloc and free are used. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>