Skip to content

Commit

Permalink
[ARM] Provide dummy noncoherent DMA API
Browse files Browse the repository at this point in the history
We don't currently support the noncoherent DMA API, but it needs to
be provided for kernels with devres to link.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Feb 12, 2007
1 parent 017cc02 commit f454aa6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/asm-arm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ static inline int dma_mapping_error(dma_addr_t dma_addr)
return dma_addr == ~0;
}

/*
* Dummy noncoherent implementation. We don't provide a dma_cache_sync
* function so drivers using this API are highlighted with build warnings.
*/
static inline void *
dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
{
return NULL;
}

static inline void
dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t handle)
{
}

/**
* dma_alloc_coherent - allocate consistent memory for DMA
* @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
Expand Down

0 comments on commit f454aa6

Please sign in to comment.