Lines Matching refs:device

16 #include <linux/device.h>
42 struct device *dev;
52 struct device *dev;
97 * by it) or exclusively owned by the DMA device. These helper functions
141 static struct page *__dma_alloc_buffer(struct device *dev, size_t size,
176 static void *__alloc_from_contiguous(struct device *dev, size_t size,
181 static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp,
328 static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp,
335 * __alloc_remap_buffer is only called when the device is
391 static void *__alloc_from_contiguous(struct device *dev, size_t size,
426 static void __free_from_contiguous(struct device *dev, struct page *page,
446 static void *__alloc_simple_buffer(struct device *dev, size_t size, gfp_t gfp,
450 /* __alloc_simple_buffer is only called when the device is coherent */
533 static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
605 static void __arm_dma_free(struct device *dev, size_t size, void *cpu_addr,
701 /* in any case, don't bother invalidating if DMA to device */
852 static struct page **__iommu_alloc_buffer(struct device *dev, size_t size,
943 static int __iommu_free_buffer(struct device *dev, struct page **pages,
962 * Create a mapping in device IO address space for specified pages
965 __iommu_create_mapping(struct device *dev, struct page **pages, size_t size,
1005 static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t size)
1043 static void *__iommu_alloc_simple(struct device *dev, size_t size, gfp_t gfp,
1068 static void __iommu_free_atomic(struct device *dev, void *cpu_addr,
1078 static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
1118 static int arm_iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
1146 static void arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr,
1171 static int arm_iommu_get_sgtable(struct device *dev, struct sg_table *sgt,
1188 static int __map_sg_chunk(struct device *dev, struct scatterlist *sg,
1233 * @dev: valid struct device pointer
1243 static int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg,
1292 * @dev: valid struct device pointer
1300 static void arm_iommu_unmap_sg(struct device *dev,
1320 * @dev: valid struct device pointer
1325 static void arm_iommu_sync_sg_for_cpu(struct device *dev,
1342 * @dev: valid struct device pointer
1347 static void arm_iommu_sync_sg_for_device(struct device *dev,
1363 * @dev: valid struct device pointer
1371 static dma_addr_t arm_iommu_map_page(struct device *dev, struct page *page,
1401 * @dev: valid struct device pointer
1408 static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle,
1430 * arm_iommu_map_resource - map a device resource for DMA
1431 * @dev: valid struct device pointer
1436 static dma_addr_t arm_iommu_map_resource(struct device *dev,
1464 * arm_iommu_unmap_resource - unmap a device DMA resource
1465 * @dev: valid struct device pointer
1470 static void arm_iommu_unmap_resource(struct device *dev, dma_addr_t dma_handle,
1486 static void arm_iommu_sync_single_for_cpu(struct device *dev,
1501 static void arm_iommu_sync_single_for_device(struct device *dev,
1538 * @bus: pointer to the bus holding the client device (for IOMMU calls)
1546 * The client device need to be attached to the mapping with
1646 static int __arm_iommu_attach_device(struct device *dev,
1658 pr_debug("Attached IOMMU controller to %s device.\n", dev_name(dev));
1664 * @dev: valid struct device pointer
1668 * Attaches specified io address space mapping to the provided device.
1675 int arm_iommu_attach_device(struct device *dev,
1691 * @dev: valid struct device pointer
1693 * Detaches the provided device from a previously attached map.
1696 void arm_iommu_detach_device(struct device *dev)
1711 pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev));
1715 static void arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
1722 pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n",
1728 pr_warn("Failed to attached device %s to IOMMU_mapping\n",
1737 static void arm_teardown_iommu_dma_ops(struct device *dev)
1750 static void arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
1755 static void arm_teardown_iommu_dma_ops(struct device *dev) { }
1759 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
1786 void arch_teardown_dma_ops(struct device *dev)
1810 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
1818 void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,