diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-25 22:38:41 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-29 11:40:16 +0200 |
commit | 2638b4dbe768aba023a06acd8e7eba708bb76ee6 (patch) | |
tree | 41e464b337ec85444d8c551947de13bb8731af70 /arch/arm/mm/dma-mapping.c | |
parent | [ARM] dma: Reduce to one dma_map_sg()/dma_unmap_sg() implementation (diff) | |
download | linux-2638b4dbe768aba023a06acd8e7eba708bb76ee6.tar.xz linux-2638b4dbe768aba023a06acd8e7eba708bb76ee6.zip |
[ARM] dma: Reduce to one dma_sync_sg_* implementation
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/dma-mapping.c')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index c9c1206e358c..0e28cf33f7dd 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -571,7 +571,6 @@ void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, } EXPORT_SYMBOL(dma_unmap_sg); -#ifndef CONFIG_DMABOUNCE /** * dma_sync_sg_for_cpu * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices @@ -586,6 +585,10 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int i; for_each_sg(sg, s, nents, i) { + if (!dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0, + sg_dma_len(s), dir)) + continue; + if (!arch_is_coherent()) dma_cache_maint(sg_virt(s), s->length, dir); } @@ -606,9 +609,12 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int i; for_each_sg(sg, s, nents, i) { + if (!dmabounce_sync_for_device(dev, sg_dma_address(s), 0, + sg_dma_len(s), dir)) + continue; + if (!arch_is_coherent()) dma_cache_maint(sg_virt(s), s->length, dir); } } EXPORT_SYMBOL(dma_sync_sg_for_device); -#endif |