diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-03-10 18:23:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:42 -0500 |
commit | 027491f4b2ff15fe5cc36c900cb2d1fdb35cefdd (patch) | |
tree | 79dccedcd50e2bd0935c05185bf5c75d48fe9c63 /arch/frv | |
parent | 0acedc124aca35f5cce9d4ee288dc372bf517e09 (diff) |
dma-mapping: frv: remove the obsolete and unnecessary DMA API comments
pci_dma_sync_single was obsoleted long ago.
All the comments are generic, not architecture specific, simply describes
some of the DMA-API (and frv has the same comments in three files).
Documentation/DMA-API.txt have more detailed descriptions.
This removes the above obsolete and unnecessary DMA API comments. Let's
describe the DMA API in only Documentation/DMA-API.txt.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: David Howells <dhowells@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/include/asm/dma-mapping.h | 41 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-dma-nommu.c | 30 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-dma.c | 30 |
3 files changed, 5 insertions, 96 deletions
diff --git a/arch/frv/include/asm/dma-mapping.h b/arch/frv/include/asm/dma-mapping.h index b2898877c07b..6af5d83e2fb2 100644 --- a/arch/frv/include/asm/dma-mapping.h +++ b/arch/frv/include/asm/dma-mapping.h | |||
@@ -7,6 +7,11 @@ | |||
7 | #include <asm/scatterlist.h> | 7 | #include <asm/scatterlist.h> |
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | 9 | ||
10 | /* | ||
11 | * See Documentation/DMA-API.txt for the description of how the | ||
12 | * following DMA API should work. | ||
13 | */ | ||
14 | |||
10 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 15 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
11 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 16 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
12 | 17 | ||
@@ -16,24 +21,9 @@ extern unsigned long __nongprelbss dma_coherent_mem_end; | |||
16 | void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp); | 21 | void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp); |
17 | void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); | 22 | void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); |
18 | 23 | ||
19 | /* | ||
20 | * Map a single buffer of the indicated size for DMA in streaming mode. | ||
21 | * The 32-bit bus address to use is returned. | ||
22 | * | ||
23 | * Once the device is given the dma address, the device owns this memory | ||
24 | * until either pci_unmap_single or pci_dma_sync_single is performed. | ||
25 | */ | ||
26 | extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 24 | extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
27 | enum dma_data_direction direction); | 25 | enum dma_data_direction direction); |
28 | 26 | ||
29 | /* | ||
30 | * Unmap a single streaming mode DMA translation. The dma_addr and size | ||
31 | * must match what was provided for in a previous pci_map_single call. All | ||
32 | * other usages are undefined. | ||
33 | * | ||
34 | * After this call, reads by the cpu to the buffer are guarenteed to see | ||
35 | * whatever the device wrote there. | ||
36 | */ | ||
37 | static inline | 27 | static inline |
38 | void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 28 | void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, |
39 | enum dma_data_direction direction) | 29 | enum dma_data_direction direction) |
@@ -41,30 +31,9 @@ void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
41 | BUG_ON(direction == DMA_NONE); | 31 | BUG_ON(direction == DMA_NONE); |
42 | } | 32 | } |
43 | 33 | ||
44 | /* | ||
45 | * Map a set of buffers described by scatterlist in streaming | ||
46 | * mode for DMA. This is the scather-gather version of the | ||
47 | * above pci_map_single interface. Here the scatter gather list | ||
48 | * elements are each tagged with the appropriate dma address | ||
49 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
50 | * | ||
51 | * NOTE: An implementation may be able to use a smaller number of | ||
52 | * DMA address/length pairs than there are SG table elements. | ||
53 | * (for example via virtual mapping capabilities) | ||
54 | * The routine returns the number of addr/length pairs actually | ||
55 | * used, at most nents. | ||
56 | * | ||
57 | * Device ownership issues as mentioned above for pci_map_single are | ||
58 | * the same here. | ||
59 | */ | ||
60 | extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 34 | extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
61 | enum dma_data_direction direction); | 35 | enum dma_data_direction direction); |
62 | 36 | ||
63 | /* | ||
64 | * Unmap a set of streaming mode DMA translations. | ||
65 | * Again, cpu read rules concerning calls here are the same as for | ||
66 | * pci_unmap_single() above. | ||
67 | */ | ||
68 | static inline | 37 | static inline |
69 | void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | 38 | void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, |
70 | enum dma_data_direction direction) | 39 | enum dma_data_direction direction) |
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c index 4e1ba0b15443..e47857f889b6 100644 --- a/arch/frv/mb93090-mb00/pci-dma-nommu.c +++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c | |||
@@ -106,13 +106,6 @@ void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_ | |||
106 | 106 | ||
107 | EXPORT_SYMBOL(dma_free_coherent); | 107 | EXPORT_SYMBOL(dma_free_coherent); |
108 | 108 | ||
109 | /* | ||
110 | * Map a single buffer of the indicated size for DMA in streaming mode. | ||
111 | * The 32-bit bus address to use is returned. | ||
112 | * | ||
113 | * Once the device is given the dma address, the device owns this memory | ||
114 | * until either dma_unmap_single or pci_dma_sync_single is performed. | ||
115 | */ | ||
116 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 109 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
117 | enum dma_data_direction direction) | 110 | enum dma_data_direction direction) |
118 | { | 111 | { |
@@ -125,22 +118,6 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
125 | 118 | ||
126 | EXPORT_SYMBOL(dma_map_single); | 119 | EXPORT_SYMBOL(dma_map_single); |
127 | 120 | ||
128 | /* | ||
129 | * Map a set of buffers described by scatterlist in streaming | ||
130 | * mode for DMA. This is the scather-gather version of the | ||
131 | * above dma_map_single interface. Here the scatter gather list | ||
132 | * elements are each tagged with the appropriate dma address | ||
133 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
134 | * | ||
135 | * NOTE: An implementation may be able to use a smaller number of | ||
136 | * DMA address/length pairs than there are SG table elements. | ||
137 | * (for example via virtual mapping capabilities) | ||
138 | * The routine returns the number of addr/length pairs actually | ||
139 | * used, at most nents. | ||
140 | * | ||
141 | * Device ownership issues as mentioned above for dma_map_single are | ||
142 | * the same here. | ||
143 | */ | ||
144 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 121 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
145 | enum dma_data_direction direction) | 122 | enum dma_data_direction direction) |
146 | { | 123 | { |
@@ -157,13 +134,6 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
157 | 134 | ||
158 | EXPORT_SYMBOL(dma_map_sg); | 135 | EXPORT_SYMBOL(dma_map_sg); |
159 | 136 | ||
160 | /* | ||
161 | * Map a single page of the indicated size for DMA in streaming mode. | ||
162 | * The 32-bit bus address to use is returned. | ||
163 | * | ||
164 | * Device ownership issues as mentioned above for dma_map_single are | ||
165 | * the same here. | ||
166 | */ | ||
167 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, | 137 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, |
168 | size_t size, enum dma_data_direction direction) | 138 | size_t size, enum dma_data_direction direction) |
169 | { | 139 | { |
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c index 45954f0813dc..2c912e805162 100644 --- a/arch/frv/mb93090-mb00/pci-dma.c +++ b/arch/frv/mb93090-mb00/pci-dma.c | |||
@@ -38,13 +38,6 @@ void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_ | |||
38 | 38 | ||
39 | EXPORT_SYMBOL(dma_free_coherent); | 39 | EXPORT_SYMBOL(dma_free_coherent); |
40 | 40 | ||
41 | /* | ||
42 | * Map a single buffer of the indicated size for DMA in streaming mode. | ||
43 | * The 32-bit bus address to use is returned. | ||
44 | * | ||
45 | * Once the device is given the dma address, the device owns this memory | ||
46 | * until either pci_unmap_single or pci_dma_sync_single is performed. | ||
47 | */ | ||
48 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 41 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
49 | enum dma_data_direction direction) | 42 | enum dma_data_direction direction) |
50 | { | 43 | { |
@@ -57,22 +50,6 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
57 | 50 | ||
58 | EXPORT_SYMBOL(dma_map_single); | 51 | EXPORT_SYMBOL(dma_map_single); |
59 | 52 | ||
60 | /* | ||
61 | * Map a set of buffers described by scatterlist in streaming | ||
62 | * mode for DMA. This is the scather-gather version of the | ||
63 | * above dma_map_single interface. Here the scatter gather list | ||
64 | * elements are each tagged with the appropriate dma address | ||
65 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
66 | * | ||
67 | * NOTE: An implementation may be able to use a smaller number of | ||
68 | * DMA address/length pairs than there are SG table elements. | ||
69 | * (for example via virtual mapping capabilities) | ||
70 | * The routine returns the number of addr/length pairs actually | ||
71 | * used, at most nents. | ||
72 | * | ||
73 | * Device ownership issues as mentioned above for dma_map_single are | ||
74 | * the same here. | ||
75 | */ | ||
76 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 53 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
77 | enum dma_data_direction direction) | 54 | enum dma_data_direction direction) |
78 | { | 55 | { |
@@ -103,13 +80,6 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
103 | 80 | ||
104 | EXPORT_SYMBOL(dma_map_sg); | 81 | EXPORT_SYMBOL(dma_map_sg); |
105 | 82 | ||
106 | /* | ||
107 | * Map a single page of the indicated size for DMA in streaming mode. | ||
108 | * The 32-bit bus address to use is returned. | ||
109 | * | ||
110 | * Device ownership issues as mentioned above for dma_map_single are | ||
111 | * the same here. | ||
112 | */ | ||
113 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, | 83 | dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, |
114 | size_t size, enum dma_data_direction direction) | 84 | size_t size, enum dma_data_direction direction) |
115 | { | 85 | { |