aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-avr32
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-avr32')
-rw-r--r--include/asm-avr32/dma-mapping.h7
-rw-r--r--include/asm-avr32/scatterlist.h5
2 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h
index 81e342636ac4..a7131630c057 100644
--- a/include/asm-avr32/dma-mapping.h
+++ b/include/asm-avr32/dma-mapping.h
@@ -217,8 +217,8 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
217 for (i = 0; i < nents; i++) { 217 for (i = 0; i < nents; i++) {
218 char *virt; 218 char *virt;
219 219
220 sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; 220 sg[i].dma_address = page_to_bus(sg_page(&sg[i])) + sg[i].offset;
221 virt = page_address(sg[i].page) + sg[i].offset; 221 virt = sg_virt(&sg[i]);
222 dma_cache_sync(dev, virt, sg[i].length, direction); 222 dma_cache_sync(dev, virt, sg[i].length, direction);
223 } 223 }
224 224
@@ -327,8 +327,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
327 int i; 327 int i;
328 328
329 for (i = 0; i < nents; i++) { 329 for (i = 0; i < nents; i++) {
330 dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, 330 dma_cache_sync(dev, sg_virt(&sg[i]), sg[i].length, direction);
331 sg[i].length, direction);
332 } 331 }
333} 332}
334 333
diff --git a/include/asm-avr32/scatterlist.h b/include/asm-avr32/scatterlist.h
index c6d5ce3b3a25..377320e3bd17 100644
--- a/include/asm-avr32/scatterlist.h
+++ b/include/asm-avr32/scatterlist.h
@@ -4,7 +4,10 @@
4#include <asm/types.h> 4#include <asm/types.h>
5 5
6struct scatterlist { 6struct scatterlist {
7 struct page *page; 7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
9#endif
10 unsigned long page_link;
8 unsigned int offset; 11 unsigned int offset;
9 dma_addr_t dma_address; 12 dma_addr_t dma_address;
10 unsigned int length; 13 unsigned int length;