aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/dma.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:59:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:59:57 -0400
commit40caf5ea5a7d47f8a33e26b63ca81dea4b5109d2 (patch)
tree3f879353d5cb69d2dee707108e4aaeae075f5a0c /drivers/ieee1394/dma.h
parentd6454706c382ab74e2ecad7803c434cc6bd30343 (diff)
parentbcfd09ee48f77a4fe903dbc3757e7af931998ce1 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (56 commits) ieee1394: remove garbage from Kconfig ieee1394: more help in Kconfig ieee1394: ohci1394: Fix mistake in printk message. ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register ieee1394: ohci1394: fix cosmetic problem in error logging ieee1394: eth1394: send async streams at S100 on 1394b buses ieee1394: eth1394: fix error path in module_init ieee1394: eth1394: correct return codes in hard_start_xmit ieee1394: eth1394: hard_start_xmit is called in atomic context ieee1394: eth1394: some conditions are unlikely ieee1394: eth1394: clean up fragment_overlap ieee1394: eth1394: don't use alloc_etherdev ieee1394: eth1394: omit useless set_mac_address callback ieee1394: eth1394: CONFIG_INET is always defined ieee1394: eth1394: allow MTU bigger than 1500 ieee1394: unexport highlevel_host_reset ieee1394: eth1394: contain host reset ieee1394: eth1394: shorter error messages ieee1394: eth1394: correct a memset argument ieee1394: eth1394: refactor .probe and .update ...
Diffstat (limited to 'drivers/ieee1394/dma.h')
-rw-r--r--drivers/ieee1394/dma.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/ieee1394/dma.h b/drivers/ieee1394/dma.h
index a1682aba71c..2727bcd2419 100644
--- a/drivers/ieee1394/dma.h
+++ b/drivers/ieee1394/dma.h
@@ -66,35 +66,23 @@ struct dma_region {
66 int direction; 66 int direction;
67}; 67};
68 68
69/* clear out all fields but do not allocate anything */
70void dma_region_init(struct dma_region *dma); 69void dma_region_init(struct dma_region *dma);
71
72/* allocate the buffer and map it to the IOMMU */
73int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes, 70int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes,
74 struct pci_dev *dev, int direction); 71 struct pci_dev *dev, int direction);
75
76/* unmap and free the buffer */
77void dma_region_free(struct dma_region *dma); 72void dma_region_free(struct dma_region *dma);
78
79/* sync the CPU's view of the buffer */
80void dma_region_sync_for_cpu(struct dma_region *dma, unsigned long offset, 73void dma_region_sync_for_cpu(struct dma_region *dma, unsigned long offset,
81 unsigned long len); 74 unsigned long len);
82
83/* sync the IO bus' view of the buffer */
84void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset, 75void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset,
85 unsigned long len); 76 unsigned long len);
86
87/* map the buffer into a user space process */
88int dma_region_mmap(struct dma_region *dma, struct file *file, 77int dma_region_mmap(struct dma_region *dma, struct file *file,
89 struct vm_area_struct *vma); 78 struct vm_area_struct *vma);
79dma_addr_t dma_region_offset_to_bus(struct dma_region *dma,
80 unsigned long offset);
90 81
91/* macro to index into a DMA region (or dma_prog_region) */ 82/**
83 * dma_region_i - macro to index into a DMA region (or dma_prog_region)
84 */
92#define dma_region_i(_dma, _type, _index) \ 85#define dma_region_i(_dma, _type, _index) \
93 ( ((_type*) ((_dma)->kvirt)) + (_index) ) 86 ( ((_type*) ((_dma)->kvirt)) + (_index) )
94 87
95/* return the DMA bus address of the byte with the given offset
96 * relative to the beginning of the dma_region */
97dma_addr_t dma_region_offset_to_bus(struct dma_region *dma,
98 unsigned long offset);
99
100#endif /* IEEE1394_DMA_H */ 88#endif /* IEEE1394_DMA_H */