ARM: dma-mapping: implement dma sg methods on top of any generic dma ops
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 10 Feb 2012 18:55:20 +0000 (19:55 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 26 Feb 2013 17:51:07 +0000 (19:51 +0200)
commitad87ad7aafecb8d79f60e01fea6f79b41f893747
treeb23f4042fe54e3422073178707f665a632885452
parent361ddd88389261f5acca2cf7d5a4e36b6657dede
ARM: dma-mapping: implement dma sg methods on top of any generic dma ops

This patch converts all dma_sg methods to be generic (independent of the
current DMA mapping implementation for ARM architecture). All dma sg
operations are now implemented on top of respective
dma_map_page/dma_sync_single_for* operations from dma_map_ops structure.

Before this patch there were custom methods for all scatter/gather
related operations. They iterated over the whole scatter list and called
cache related operations directly (which in turn checked if we use dma
bounce code or not and called respective version). This patch changes
them not to use such shortcut. Instead it provides similar loop over
scatter list and calls methods from the device's dma_map_ops structure.
This enables us to use device dependent implementations of cache related
operations (direct linear or dma bounce) depending on the provided
dma_map_ops structure.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
arch/arm/mm/dma-mapping.c