X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fieee1394%2Fdma.h;h=2727bcd24194c6e36651fadbc9439721708e93a8;hb=7cd95f56cb61f5348d062527c9d3653196f6e629;hp=b0f0885c45519e1d8dfe20a4ebb945c2a52efb7c;hpb=e1d118f16dca0f54faba3e8dd5b6adbbf7ac68c8;p=linux-2.6 diff --git a/drivers/ieee1394/dma.h b/drivers/ieee1394/dma.h index b0f0885c45..2727bcd241 100644 --- a/drivers/ieee1394/dma.h +++ b/drivers/ieee1394/dma.h @@ -10,8 +10,11 @@ #ifndef IEEE1394_DMA_H #define IEEE1394_DMA_H -#include -#include +#include + +struct pci_dev; +struct scatterlist; +struct vm_area_struct; /** * struct dma_prog_region - small contiguous DMA buffer @@ -63,35 +66,23 @@ struct dma_region { int direction; }; -/* clear out all fields but do not allocate anything */ void dma_region_init(struct dma_region *dma); - -/* allocate the buffer and map it to the IOMMU */ int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes, struct pci_dev *dev, int direction); - -/* unmap and free the buffer */ void dma_region_free(struct dma_region *dma); - -/* sync the CPU's view of the buffer */ void dma_region_sync_for_cpu(struct dma_region *dma, unsigned long offset, unsigned long len); - -/* sync the IO bus' view of the buffer */ void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset, unsigned long len); - -/* map the buffer into a user space process */ int dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma); +dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, + unsigned long offset); -/* macro to index into a DMA region (or dma_prog_region) */ +/** + * dma_region_i - macro to index into a DMA region (or dma_prog_region) + */ #define dma_region_i(_dma, _type, _index) \ ( ((_type*) ((_dma)->kvirt)) + (_index) ) -/* return the DMA bus address of the byte with the given offset - * relative to the beginning of the dma_region */ -dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, - unsigned long offset); - #endif /* IEEE1394_DMA_H */