• Marek Szyprowski's avatar
    ARM: dma-mapping: implement dma sg methods on top of any generic dma ops · 2a550e73
    Marek Szyprowski authored
    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: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Tested-By: default avatarSubash Patel <subash.ramaswamy@linaro.org>
    2a550e73
dma-mapping.c 19.4 KB