]> asedeno.scripts.mit.edu Git - linux.git/commit
iommu/rockchip: Use DMA API to manage coherency
authorShunqian Zheng <zhengsq@rock-chips.com>
Fri, 24 Jun 2016 02:13:29 +0000 (10:13 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 Jun 2016 12:50:08 +0000 (14:50 +0200)
commit4f0aba676735c653b4e739b760c1e66cd520d3e3
tree69d0c011f1379b5b60c57fd822fd575f5fc5825d
parent3d08f434bd58656ae630376d0b5afd6ca1ffb013
iommu/rockchip: Use DMA API to manage coherency

Use DMA API instead of architecture internal functions like
__cpuc_flush_dcache_area() etc.

The biggest difficulty here is that dma_map and _sync calls require some
struct device, while there is no real 1:1 relation between an IOMMU
domain and some device. To overcome this, a simple platform device is
registered for each allocated IOMMU domain.

With this patch, this driver can be used on both ARM and ARM64
platforms, such as RK3288 and RK3399 respectively.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/rockchip-iommu.c