Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/dma-mapping.h
| Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | |||||
| int linux_dma_tag_init(struct device *, u64); | int linux_dma_tag_init(struct device *, u64); | ||||
| int linux_dma_tag_init_coherent(struct device *, u64); | int linux_dma_tag_init_coherent(struct device *, u64); | ||||
| void *linux_dma_alloc_coherent(struct device *dev, size_t size, | void *linux_dma_alloc_coherent(struct device *dev, size_t size, | ||||
| dma_addr_t *dma_handle, gfp_t flag); | dma_addr_t *dma_handle, gfp_t flag); | ||||
| void *linuxkpi_dmam_alloc_coherent(struct device *dev, size_t size, | void *linuxkpi_dmam_alloc_coherent(struct device *dev, size_t size, | ||||
| dma_addr_t *dma_handle, gfp_t flag); | dma_addr_t *dma_handle, gfp_t flag); | ||||
| void linuxkpi_dmam_free_coherent(struct device *dev, size_t size, | void linuxkpi_dmam_free_coherent(struct device *dev, size_t size, | ||||
| void *addr, dma_addr_t dma_handle); | void *addr, dma_addr_t dma_handle); | ||||
| void *linuxkpi_dma_alloc_noncoherent(struct device *, size_t, dma_addr_t *, | |||||
| enum dma_data_direction, gfp_t); | |||||
| void linuxkpi_dma_free_noncoherent(struct device *, size_t, void *, | |||||
| dma_addr_t, enum dma_data_direction); | |||||
| void *linuxkpi_dma_alloc_attrs(struct device *, size_t, dma_addr_t *, | |||||
| gfp_t, unsigned long); | |||||
| void linuxkpi_dma_free_attrs(struct device *, size_t, void *, | |||||
| dma_addr_t, unsigned long); | |||||
| dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len); /* backward compat */ | dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len); /* backward compat */ | ||||
| dma_addr_t lkpi_dma_map_phys(struct device *, vm_paddr_t, size_t, | dma_addr_t lkpi_dma_map_phys(struct device *, vm_paddr_t, size_t, | ||||
| enum dma_data_direction, unsigned long); | enum dma_data_direction, unsigned long); | ||||
| void linux_dma_unmap(struct device *dev, dma_addr_t dma_addr, size_t size); /* backward compat */ | void linux_dma_unmap(struct device *dev, dma_addr_t dma_addr, size_t size); /* backward compat */ | ||||
| void lkpi_dma_unmap(struct device *, dma_addr_t, size_t, | void lkpi_dma_unmap(struct device *, dma_addr_t, size_t, | ||||
| enum dma_data_direction, unsigned long); | enum dma_data_direction, unsigned long); | ||||
| int linux_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, | int linux_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, | ||||
| int nents, enum dma_data_direction direction, | int nents, enum dma_data_direction direction, | ||||
| ▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | ||||
| kmem_free(cpu_addr, size); | kmem_free(cpu_addr, size); | ||||
| } | } | ||||
| static inline void | static inline void | ||||
| dmam_free_coherent(struct device *dev, size_t size, void *addr, | dmam_free_coherent(struct device *dev, size_t size, void *addr, | ||||
| dma_addr_t dma_handle) | dma_addr_t dma_handle) | ||||
| { | { | ||||
| linuxkpi_dmam_free_coherent(dev, size, addr, dma_handle); | linuxkpi_dmam_free_coherent(dev, size, addr, dma_handle); | ||||
| } | |||||
| static inline void * | |||||
| dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||||
| enum dma_data_direction direction, gfp_t gfp) | |||||
| { | |||||
| return (linuxkpi_dma_alloc_noncoherent(dev, size, dma_handle, direction, gfp)); | |||||
| } | |||||
| static inline void | |||||
| dma_free_noncoherent(struct device *dev, size_t size, void *vaddr, | |||||
| dma_addr_t dma_handle, enum dma_data_direction direction) | |||||
| { | |||||
| linuxkpi_dma_free_noncoherent(dev, size, vaddr, dma_handle, direction); | |||||
| } | } | ||||
| static inline void * | |||||
| dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||||
| gfp_t gfp, unsigned long attrs) | |||||
| { | |||||
| return (linuxkpi_dma_alloc_attrs(dev, size, dma_handle, gfp, attrs)); | |||||
| } | |||||
| static inline void | |||||
| dma_free_attrs(struct device *dev, size_t size, void *vaddr, | |||||
| dma_addr_t dma_handle, unsigned long attrs) | |||||
| { | |||||
| linuxkpi_dma_free_attrs(dev, size, vaddr, dma_handle, attrs); | |||||
| } | |||||
| static inline dma_addr_t | static inline dma_addr_t | ||||
| dma_map_page_attrs(struct device *dev, struct page *page, size_t offset, | dma_map_page_attrs(struct device *dev, struct page *page, size_t offset, | ||||
| size_t size, enum dma_data_direction direction, unsigned long attrs) | size_t size, enum dma_data_direction direction, unsigned long attrs) | ||||
| { | { | ||||
| return (lkpi_dma_map_phys(dev, page_to_phys(page) + offset, size, | return (lkpi_dma_map_phys(dev, page_to_phys(page) + offset, size, | ||||
| direction, attrs)); | direction, attrs)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines | |||||