diff options
author | Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> | 2016-08-10 14:22:14 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-09-26 19:46:41 +0300 |
commit | ba409b31b3d37b52dda4eefcde04f5837c7ee4aa (patch) | |
tree | d6cd2c4d47c83fc786a170c809def0f3596efbab /include/linux/dma-mapping.h | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
download | linux-ba409b31b3d37b52dda4eefcde04f5837c7ee4aa.tar.xz |
dma-mapping: add {map,unmap}_resource to dma_map_ops
Add methods to handle mapping of device resources from a physical
address. This is needed for example to be able to map MMIO FIFO
registers to a IOMMU.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r-- | include/linux/dma-mapping.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 66533e18276c..673b7be85f7a 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -95,6 +95,12 @@ struct dma_map_ops { struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs); + dma_addr_t (*map_resource)(struct device *dev, phys_addr_t phys_addr, + size_t size, enum dma_data_direction dir, + unsigned long attrs); + void (*unmap_resource)(struct device *dev, dma_addr_t dma_handle, + size_t size, enum dma_data_direction dir, + unsigned long attrs); void (*sync_single_for_cpu)(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction dir); |