aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-powerpc/scatterlist.h (renamed from include/asm-ppc64/scatterlist.h)22
-rw-r--r--include/asm-ppc/scatterlist.h25
2 files changed, 18 insertions, 29 deletions
diff --git a/include/asm-ppc64/scatterlist.h b/include/asm-powerpc/scatterlist.h
index 65a2a027ac94..8c992d1491d4 100644
--- a/include/asm-ppc64/scatterlist.h
+++ b/include/asm-powerpc/scatterlist.h
@@ -1,6 +1,5 @@
1#ifndef _PPC64_SCATTERLIST_H 1#ifndef _ASM_POWERPC_SCATTERLIST_H
2#define _PPC64_SCATTERLIST_H 2#define _ASM_POWERPC_SCATTERLIST_H
3
4/* 3/*
5 * Copyright (C) 2001 PPC64 Team, IBM Corp 4 * Copyright (C) 2001 PPC64 Team, IBM Corp
6 * 5 *
@@ -10,6 +9,7 @@
10 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
11 */ 10 */
12 11
12#ifdef __KERNEL__
13#include <linux/types.h> 13#include <linux/types.h>
14#include <asm/dma.h> 14#include <asm/dma.h>
15 15
@@ -23,9 +23,23 @@ struct scatterlist {
23 u32 dma_length; 23 u32 dma_length;
24}; 24};
25 25
26/*
27 * These macros should be used after a dma_map_sg call has been done
28 * to get bus addresses of each of the SG entries and their lengths.
29 * You should only work with the number of sg entries pci_map_sg
30 * returns, or alternatively stop on the first sg_dma_len(sg) which
31 * is 0.
32 */
26#define sg_dma_address(sg) ((sg)->dma_address) 33#define sg_dma_address(sg) ((sg)->dma_address)
34#ifdef __powerpc64__
27#define sg_dma_len(sg) ((sg)->dma_length) 35#define sg_dma_len(sg) ((sg)->dma_length)
36#else
37#define sg_dma_len(sg) ((sg)->length)
38#endif
28 39
40#ifdef __powerpc64__
29#define ISA_DMA_THRESHOLD (~0UL) 41#define ISA_DMA_THRESHOLD (~0UL)
42#endif
30 43
31#endif /* !(_PPC64_SCATTERLIST_H) */ 44#endif /* __KERNEL__ */
45#endif /* _ASM_POWERPC_SCATTERLIST_H */
diff --git a/include/asm-ppc/scatterlist.h b/include/asm-ppc/scatterlist.h
deleted file mode 100644
index f21f18f56548..000000000000
--- a/include/asm-ppc/scatterlist.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifdef __KERNEL__
2#ifndef _PPC_SCATTERLIST_H
3#define _PPC_SCATTERLIST_H
4
5#include <asm/dma.h>
6
7struct scatterlist {
8 struct page *page;
9 unsigned int offset;
10 dma_addr_t dma_address;
11 unsigned int length;
12};
13
14/*
15 * These macros should be used after a pci_map_sg call has been done
16 * to get bus addresses of each of the SG entries and their lengths.
17 * You should only work with the number of sg entries pci_map_sg
18 * returns, or alternatively stop on the first sg_dma_len(sg) which
19 * is 0.
20 */
21#define sg_dma_address(sg) ((sg)->dma_address)
22#define sg_dma_len(sg) ((sg)->length)
23
24#endif /* !(_PPC_SCATTERLIST_H) */
25#endif /* __KERNEL__ */