Home
last modified time | relevance | path

Searched refs:hwdev (Results 1 – 35 of 35) sorted by relevance

/linux-4.1.27/include/asm-generic/
Dpci-dma-compat.h10 pci_dma_supported(struct pci_dev *hwdev, u64 mask) in pci_dma_supported() argument
12 return dma_supported(hwdev == NULL ? NULL : &hwdev->dev, mask); in pci_dma_supported()
16 pci_alloc_consistent(struct pci_dev *hwdev, size_t size, in pci_alloc_consistent() argument
19 return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC); in pci_alloc_consistent()
23 pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, in pci_zalloc_consistent() argument
26 return dma_zalloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, in pci_zalloc_consistent()
31 pci_free_consistent(struct pci_dev *hwdev, size_t size, in pci_free_consistent() argument
34 dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, vaddr, dma_handle); in pci_free_consistent()
38 pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction) in pci_map_single() argument
40 …return dma_map_single(hwdev == NULL ? NULL : &hwdev->dev, ptr, size, (enum dma_data_direction)dire… in pci_map_single()
[all …]
/linux-4.1.27/arch/arm/include/asm/xen/
Dpage-coherent.h8 void __xen_dma_map_page(struct device *hwdev, struct page *page,
11 void __xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
14 void __xen_dma_sync_single_for_cpu(struct device *hwdev,
17 void __xen_dma_sync_single_for_device(struct device *hwdev,
20 static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, in xen_alloc_coherent_pages() argument
24 return __generic_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs); in xen_alloc_coherent_pages()
27 static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, in xen_free_coherent_pages() argument
31 __generic_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs); in xen_free_coherent_pages()
34 static inline void xen_dma_map_page(struct device *hwdev, struct page *page, in xen_dma_map_page() argument
44 __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); in xen_dma_map_page()
[all …]
/linux-4.1.27/drivers/hwmon/
Dhwmon.c100 struct hwmon_device *hwdev; in hwmon_device_register_with_groups() local
111 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL); in hwmon_device_register_with_groups()
112 if (hwdev == NULL) { in hwmon_device_register_with_groups()
117 hwdev->name = name; in hwmon_device_register_with_groups()
118 hwdev->dev.class = &hwmon_class; in hwmon_device_register_with_groups()
119 hwdev->dev.parent = dev; in hwmon_device_register_with_groups()
120 hwdev->dev.groups = groups; in hwmon_device_register_with_groups()
121 hwdev->dev.of_node = dev ? dev->of_node : NULL; in hwmon_device_register_with_groups()
122 dev_set_drvdata(&hwdev->dev, drvdata); in hwmon_device_register_with_groups()
123 dev_set_name(&hwdev->dev, HWMON_ID_FORMAT, id); in hwmon_device_register_with_groups()
[all …]
/linux-4.1.27/include/linux/
Dswiotlb.h42 extern phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
47 extern void swiotlb_tbl_unmap_single(struct device *hwdev,
51 extern void swiotlb_tbl_sync_single(struct device *hwdev,
58 *swiotlb_alloc_coherent(struct device *hwdev, size_t size,
62 swiotlb_free_coherent(struct device *hwdev, size_t size,
69 extern void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
74 swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
78 swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
82 swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
86 swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
[all …]
Dfmc.h177 struct device *hwdev; /* The underlying hardware device */ member
/linux-4.1.27/drivers/xen/
Dswiotlb-xen.c296 xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, in xen_swiotlb_alloc_coherent() argument
314 if (dma_alloc_from_coherent(hwdev, size, dma_handle, &ret)) in xen_swiotlb_alloc_coherent()
322 ret = xen_alloc_coherent_pages(hwdev, size, dma_handle, flags, attrs); in xen_swiotlb_alloc_coherent()
327 if (hwdev && hwdev->coherent_dma_mask) in xen_swiotlb_alloc_coherent()
328 dma_mask = dma_alloc_coherent_mask(hwdev, flags); in xen_swiotlb_alloc_coherent()
342 xen_free_coherent_pages(hwdev, size, ret, (dma_addr_t)phys, attrs); in xen_swiotlb_alloc_coherent()
352 xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, in xen_swiotlb_free_coherent() argument
359 if (dma_release_from_coherent(hwdev, order, vaddr)) in xen_swiotlb_free_coherent()
362 if (hwdev && hwdev->coherent_dma_mask) in xen_swiotlb_free_coherent()
363 dma_mask = hwdev->coherent_dma_mask; in xen_swiotlb_free_coherent()
[all …]
/linux-4.1.27/lib/
Dswiotlb.c135 static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev, in swiotlb_virt_to_bus() argument
138 return phys_to_dma(hwdev, virt_to_phys(address)); in swiotlb_virt_to_bus()
425 phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, in swiotlb_tbl_map_single() argument
441 mask = dma_get_seg_boundary(hwdev); in swiotlb_tbl_map_single()
517 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size); in swiotlb_tbl_map_single()
541 map_single(struct device *hwdev, phys_addr_t phys, size_t size, in map_single() argument
544 dma_addr_t start_dma_addr = phys_to_dma(hwdev, io_tlb_start); in map_single()
546 return swiotlb_tbl_map_single(hwdev, start_dma_addr, phys, size, dir); in map_single()
552 void swiotlb_tbl_unmap_single(struct device *hwdev, phys_addr_t tlb_addr, in swiotlb_tbl_unmap_single() argument
596 void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, in swiotlb_tbl_sync_single() argument
[all …]
/linux-4.1.27/include/xen/
Dswiotlb-xen.h10 *xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
15 xen_swiotlb_free_coherent(struct device *hwdev, size_t size,
24 extern void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
28 xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
33 xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
38 xen_swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
42 xen_swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
46 xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
50 xen_swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
54 xen_swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr);
[all …]
/linux-4.1.27/arch/arm/xen/
Dmm.c87 static void __xen_dma_page_dev_to_cpu(struct device *hwdev, dma_addr_t handle, in __xen_dma_page_dev_to_cpu() argument
93 static void __xen_dma_page_cpu_to_dev(struct device *hwdev, dma_addr_t handle, in __xen_dma_page_cpu_to_dev() argument
99 void __xen_dma_map_page(struct device *hwdev, struct page *page, in __xen_dma_map_page() argument
103 if (is_device_dma_coherent(hwdev)) in __xen_dma_map_page()
108 __xen_dma_page_cpu_to_dev(hwdev, dev_addr, size, dir); in __xen_dma_map_page()
111 void __xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, in __xen_dma_unmap_page() argument
116 if (is_device_dma_coherent(hwdev)) in __xen_dma_unmap_page()
121 __xen_dma_page_dev_to_cpu(hwdev, handle, size, dir); in __xen_dma_unmap_page()
124 void __xen_dma_sync_single_for_cpu(struct device *hwdev, in __xen_dma_sync_single_for_cpu() argument
127 if (is_device_dma_coherent(hwdev)) in __xen_dma_sync_single_for_cpu()
[all …]
/linux-4.1.27/arch/x86/kernel/
Dpci-nommu.c15 check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) in check_addr() argument
17 if (hwdev && !dma_capable(hwdev, bus, size)) { in check_addr()
18 if (*hwdev->dma_mask >= DMA_BIT_MASK(32)) in check_addr()
22 (long long)*hwdev->dma_mask); in check_addr()
56 static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, in nommu_map_sg() argument
68 if (!check_addr("map_sg", hwdev, s->dma_address, s->length)) in nommu_map_sg()
Dpci-swiotlb.c17 void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, in x86_swiotlb_alloc_coherent() argument
23 vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags, in x86_swiotlb_alloc_coherent()
28 return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags); in x86_swiotlb_alloc_coherent()
/linux-4.1.27/arch/x86/include/asm/xen/
Dpage-coherent.h8 static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, in xen_alloc_coherent_pages() argument
17 static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, in xen_free_coherent_pages() argument
24 static inline void xen_dma_map_page(struct device *hwdev, struct page *page, in xen_dma_map_page() argument
28 static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, in xen_dma_unmap_page() argument
32 static inline void xen_dma_sync_single_for_cpu(struct device *hwdev, in xen_dma_sync_single_for_cpu() argument
35 static inline void xen_dma_sync_single_for_device(struct device *hwdev, in xen_dma_sync_single_for_device() argument
/linux-4.1.27/drivers/infiniband/hw/ipath/
Dipath_user_pages.c106 dma_addr_t ipath_map_page(struct pci_dev *hwdev, struct page *page, in ipath_map_page() argument
111 phys = pci_map_page(hwdev, page, offset, size, direction); in ipath_map_page()
114 pci_unmap_page(hwdev, phys, size, direction); in ipath_map_page()
115 phys = pci_map_page(hwdev, page, offset, size, direction); in ipath_map_page()
130 dma_addr_t ipath_map_single(struct pci_dev *hwdev, void *ptr, size_t size, in ipath_map_single() argument
135 phys = pci_map_single(hwdev, ptr, size, direction); in ipath_map_single()
138 pci_unmap_single(hwdev, phys, size, direction); in ipath_map_single()
139 phys = pci_map_single(hwdev, ptr, size, direction); in ipath_map_single()
/linux-4.1.27/arch/hexagon/kernel/
Ddma.c103 static int check_addr(const char *name, struct device *hwdev, in check_addr() argument
106 if (hwdev && hwdev->dma_mask && !dma_capable(hwdev, bus, size)) { in check_addr()
107 if (*hwdev->dma_mask >= DMA_BIT_MASK(32)) in check_addr()
111 (long long)*hwdev->dma_mask); in check_addr()
117 static int hexagon_map_sg(struct device *hwdev, struct scatterlist *sg, in hexagon_map_sg() argument
128 if (!check_addr("map_sg", hwdev, s->dma_address, s->length)) in hexagon_map_sg()
/linux-4.1.27/arch/ia64/sn/pci/pcibr/
Dpcibr_dma.c208 pcibr_dma_unmap(struct pci_dev *hwdev, dma_addr_t dma_handle, int direction) in pcibr_dma_unmap() argument
210 struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev); in pcibr_dma_unmap()
357 pcibr_dma_map(struct pci_dev * hwdev, unsigned long phys_addr, size_t size, int dma_flags) in pcibr_dma_map() argument
360 struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev); in pcibr_dma_map()
363 if (hwdev->dma_mask < 0x7fffffff) { in pcibr_dma_map()
367 if (hwdev->dma_mask == ~0UL) { in pcibr_dma_map()
395 pcibr_dma_map_consistent(struct pci_dev * hwdev, unsigned long phys_addr, in pcibr_dma_map_consistent() argument
399 struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev); in pcibr_dma_map_consistent()
401 if (hwdev->dev.coherent_dma_mask == ~0UL) { in pcibr_dma_map_consistent()
/linux-4.1.27/drivers/infiniband/hw/qib/
Dqib_user_pages.c101 dma_addr_t qib_map_page(struct pci_dev *hwdev, struct page *page, in qib_map_page() argument
106 phys = pci_map_page(hwdev, page, offset, size, direction); in qib_map_page()
109 pci_unmap_page(hwdev, phys, size, direction); in qib_map_page()
110 phys = pci_map_page(hwdev, page, offset, size, direction); in qib_map_page()
/linux-4.1.27/drivers/fmc/
Dfmc-core.c164 if (!fmc->hwdev) { in fmc_device_register_n()
171 dev_info(fmc->hwdev, "absent mezzanine in slot %d\n", in fmc_device_register_n()
176 dev_err(fmc->hwdev, "no eeprom provided for slot %i\n", in fmc_device_register_n()
181 dev_err(fmc->hwdev, "no eeprom_addr for slot %i\n", in fmc_device_register_n()
187 dev_err(fmc->hwdev, in fmc_device_register_n()
210 fmc->dev.parent = fmc->hwdev; in fmc_device_register_n()
226 dev_err(fmc->hwdev, "Slot %i: Failed in registering " in fmc_device_register_n()
Dfmc-dump.c52 pr_info("FMC: %s (%s), slot %i, device %s\n", dev_name(fmc->hwdev), in fmc_dump_eeprom()
90 pr_info("FMC: %s (%s), slot %i, device %s\n", dev_name(fmc->hwdev), in fmc_dump_sdb()
Dfmc-fakedev.c259 .hwdev = NULL, /* filled at creation time */
285 fmc->hwdev = &ff->dev; in ff_dev_create()
Dfmc-match.c75 dev_info(fmc->hwdev, "mezzanine %i\n", fmc->slot_id); /* header */ in fmc_fill_id_info()
/linux-4.1.27/drivers/net/ethernet/via/
Dvia-rhine.c680 static inline int verify_mmio(struct device *hwdev, in verify_mmio() argument
695 dev_err(hwdev, in verify_mmio()
907 static int rhine_init_one_common(struct device *hwdev, u32 quirks, in rhine_init_one_common() argument
916 rc = dma_set_mask(hwdev, DMA_BIT_MASK(32)); in rhine_init_one_common()
918 dev_err(hwdev, "32-bit DMA addresses not supported by the card!?\n"); in rhine_init_one_common()
927 SET_NETDEV_DEV(dev, hwdev); in rhine_init_one_common()
1004 dev_set_drvdata(hwdev, dev); in rhine_init_one_common()
1042 struct device *hwdev = &pdev->dev; in rhine_init_one_pci() local
1087 dev_err(hwdev, "Insufficient PCI resources, aborting\n"); in rhine_init_one_pci()
1103 dev_err(hwdev, in rhine_init_one_pci()
[all …]
/linux-4.1.27/arch/frv/include/asm/
Dpci.h35 extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
38 extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
/linux-4.1.27/arch/ia64/kernel/
Dmachvec.c77 machvec_dma_sync_single(struct device *hwdev, dma_addr_t dma_handle, size_t size, in machvec_dma_sync_single() argument
85 machvec_dma_sync_sg(struct device *hwdev, struct scatterlist *sg, int n, in machvec_dma_sync_sg() argument
/linux-4.1.27/arch/frv/mb93090-mb00/
Dpci-dma.c21 void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument
34 void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) in dma_free_coherent() argument
Dpci-dma-nommu.c37 void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument
89 void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) in dma_free_coherent() argument
/linux-4.1.27/arch/x86/include/asm/
Dswiotlb.h32 extern void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
Ddma-mapping.h60 extern int dma_supported(struct device *hwdev, u64 mask);
/linux-4.1.27/arch/xtensa/kernel/
Dpci-dma.c67 void dma_free_coherent(struct device *hwdev, size_t size, in dma_free_coherent() argument
/linux-4.1.27/arch/mips/include/asm/mach-pmcs-msp71xx/
Dmsp_usb.h51 u32 hwdev; /* 0xc: Device HW params */ member
/linux-4.1.27/drivers/parisc/
Dsba_iommu.c868 static void *sba_alloc_consistent(struct device *hwdev, size_t size, in sba_alloc_consistent() argument
873 if (!hwdev) { in sba_alloc_consistent()
883 *dma_handle = sba_map_single(hwdev, ret, size, 0); in sba_alloc_consistent()
900 sba_free_consistent(struct device *hwdev, size_t size, void *vaddr, in sba_free_consistent() argument
903 sba_unmap_single(hwdev, dma_handle, size, 0); in sba_free_consistent()
Dccio-dma.c846 if(!hwdev) { in ccio_alloc_consistent()
/linux-4.1.27/drivers/isdn/hardware/eicon/
Ddivasmain.c336 static void *diva_pci_alloc_consistent(struct pci_dev *hwdev, in diva_pci_alloc_consistent() argument
341 void *addr = pci_alloc_consistent(hwdev, size, dma_handle); in diva_pci_alloc_consistent()
/linux-4.1.27/drivers/net/ethernet/toshiba/
Dtc35815.c451 struct pci_dev *hwdev, in alloc_rxbuf_skb() argument
458 *dma_handle = pci_map_single(hwdev, skb->data, RX_BUF_SIZE, in alloc_rxbuf_skb()
460 if (pci_dma_mapping_error(hwdev, *dma_handle)) { in alloc_rxbuf_skb()
468 static void free_rxbuf_skb(struct pci_dev *hwdev, struct sk_buff *skb, dma_addr_t dma_handle) in free_rxbuf_skb() argument
470 pci_unmap_single(hwdev, dma_handle, RX_BUF_SIZE, in free_rxbuf_skb()
/linux-4.1.27/Documentation/fmc/
Dcarrier.txt49 struct device *hwdev; /* The underlying hardware device */
86 * hwdev: to be used in some dev_err() calls.
/linux-4.1.27/drivers/gpu/drm/i915/
Di915_gem_gtt.c622 struct pci_dev *hwdev = ppgtt->base.dev->pdev; in gen8_ppgtt_unmap_pages() local
631 pci_unmap_page(hwdev, ppgtt->pdp.page_directory[i]->daddr, PAGE_SIZE, in gen8_ppgtt_unmap_pages()
646 pci_unmap_page(hwdev, addr, PAGE_SIZE, in gen8_ppgtt_unmap_pages()