diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-05-26 17:44:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:55 -0400 |
commit | 3e6e3da8d5eafb5f849a14272ed725f85bed5dc8 (patch) | |
tree | b88695b3672a9d326d43c11028b7de78122ce830 /arch/frv/include | |
parent | 459d42b72c1fa76928ff92623ce785a55ee87095 (diff) |
frv: use asm-generic/scatterlist.h
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv/include')
-rw-r--r-- | arch/frv/include/asm/scatterlist.h | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/arch/frv/include/asm/scatterlist.h b/arch/frv/include/asm/scatterlist.h index 4bca8a28546c..1614bfd7e3a4 100644 --- a/arch/frv/include/asm/scatterlist.h +++ b/arch/frv/include/asm/scatterlist.h | |||
@@ -1,45 +1,7 @@ | |||
1 | #ifndef _ASM_SCATTERLIST_H | 1 | #ifndef _ASM_SCATTERLIST_H |
2 | #define _ASM_SCATTERLIST_H | 2 | #define _ASM_SCATTERLIST_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm-generic/scatterlist.h> |
5 | |||
6 | /* | ||
7 | * Drivers must set either ->address or (preferred) page and ->offset | ||
8 | * to indicate where data must be transferred to/from. | ||
9 | * | ||
10 | * Using page is recommended since it handles highmem data as well as | ||
11 | * low mem. ->address is restricted to data which has a virtual mapping, and | ||
12 | * it will go away in the future. Updating to page can be automated very | ||
13 | * easily -- something like | ||
14 | * | ||
15 | * sg->address = some_ptr; | ||
16 | * | ||
17 | * can be rewritten as | ||
18 | * | ||
19 | * sg_set_buf(sg, some_ptr, length); | ||
20 | * | ||
21 | * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens | ||
22 | */ | ||
23 | struct scatterlist { | ||
24 | #ifdef CONFIG_DEBUG_SG | ||
25 | unsigned long sg_magic; | ||
26 | #endif | ||
27 | unsigned long page_link; | ||
28 | unsigned int offset; /* for highmem, page offset */ | ||
29 | |||
30 | dma_addr_t dma_address; | ||
31 | unsigned int length; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * These macros should be used after a pci_map_sg call has been done | ||
36 | * to get bus addresses of each of the SG entries and their lengths. | ||
37 | * You should only work with the number of sg entries pci_map_sg | ||
38 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
39 | * is 0. | ||
40 | */ | ||
41 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
42 | #define sg_dma_len(sg) ((sg)->length) | ||
43 | 5 | ||
44 | #define ISA_DMA_THRESHOLD (0xffffffffUL) | 6 | #define ISA_DMA_THRESHOLD (0xffffffffUL) |
45 | 7 | ||