summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 10:36:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 10:36:39 -0700
commit4a35cee066df1b1958e25e71595b3845d06b192e (patch)
tree0d6c9de77da09a6d42d1bf03983f620615cc6f24 /include
parent7e6880951da86928c7f6cecf26dcb8e8d9f826da (diff)
parentd7ef1533a90f432615d25729c2477bac9e72051d (diff)
downloadlinux-3.10-4a35cee066df1b1958e25e71595b3845d06b192e.tar.gz
linux-3.10-4a35cee066df1b1958e25e71595b3845d06b192e.tar.bz2
linux-3.10-4a35cee066df1b1958e25e71595b3845d06b192e.zip
Merge branch 'stable/swiotlb-0.8.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6
* 'stable/swiotlb-0.8.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6: swiotlb: Make swiotlb bookkeeping functions visible in the header file. swiotlb: search and replace "int dir" with "enum dma_data_direction dir" swiotlb: Make internal bookkeeping functions have 'swiotlb_tbl' prefix. swiotlb: add the swiotlb initialization function with iotlb memory swiotlb: add swiotlb_tbl_map_single library function
Diffstat (limited to 'include')
-rw-r--r--include/linux/swiotlb.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
index 81a4e213c6c..8c0e349f4a6 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -23,6 +23,29 @@ extern int swiotlb_force;
#define IO_TLB_SHIFT 11
extern void swiotlb_init(int verbose);
+extern void swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose);
+
+/*
+ * Enumeration for sync targets
+ */
+enum dma_sync_target {
+ SYNC_FOR_CPU = 0,
+ SYNC_FOR_DEVICE = 1,
+};
+extern void *swiotlb_tbl_map_single(struct device *hwdev, dma_addr_t tbl_dma_addr,
+ phys_addr_t phys, size_t size,
+ enum dma_data_direction dir);
+
+extern void swiotlb_tbl_unmap_single(struct device *hwdev, char *dma_addr,
+ size_t size, enum dma_data_direction dir);
+
+extern void swiotlb_tbl_sync_single(struct device *hwdev, char *dma_addr,
+ size_t size, enum dma_data_direction dir,
+ enum dma_sync_target target);
+
+/* Accessory functions. */
+extern void swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size,
+ enum dma_data_direction dir);
extern void
*swiotlb_alloc_coherent(struct device *hwdev, size_t size,
@@ -42,11 +65,11 @@ extern void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
extern int
swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
- int direction);
+ enum dma_data_direction dir);
extern void
swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
- int direction);
+ enum dma_data_direction dir);
extern int
swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,