aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pci.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-03-10 18:23:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:41 -0500
commitaf407c6db16aa9ca63559076dbe620220a822580 (patch)
treebdc7565da04d6d9cec2f51b561b4271180dfbe79 /arch/powerpc/include/asm/pci.h
parent74a0bd66a3f78cb993144aaf336ce115017a0b5c (diff)
pci-dma: powerpc: use include/linux/pci-dma.h
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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/powerpc/include/asm/pci.h')
-rw-r--r--arch/powerpc/include/asm/pci.h32
1 files changed, 1 insertions, 31 deletions
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index b5ea626eea2..4a9991ba249 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -141,37 +141,7 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
141 141
142#define HAVE_PCI_LEGACY 1 142#define HAVE_PCI_LEGACY 1
143 143
144#if defined(CONFIG_PPC64) || defined(CONFIG_NOT_COHERENT_CACHE) 144#include <linux/pci-dma.h>
145/*
146 * For 64-bit kernels, pci_unmap_{single,page} is not a nop.
147 * For 32-bit non-coherent kernels, pci_dma_sync_single_for_cpu() and
148 * so on are not nops.
149 * and thus...
150 */
151#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
152 dma_addr_t ADDR_NAME;
153#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
154 __u32 LEN_NAME;
155#define pci_unmap_addr(PTR, ADDR_NAME) \
156 ((PTR)->ADDR_NAME)
157#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
158 (((PTR)->ADDR_NAME) = (VAL))
159#define pci_unmap_len(PTR, LEN_NAME) \
160 ((PTR)->LEN_NAME)
161#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
162 (((PTR)->LEN_NAME) = (VAL))
163
164#else /* 32-bit && coherent */
165
166/* pci_unmap_{page,single} is a nop so... */
167#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
168#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
169#define pci_unmap_addr(PTR, ADDR_NAME) (0)
170#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
171#define pci_unmap_len(PTR, LEN_NAME) (0)
172#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
173
174#endif /* CONFIG_PPC64 || CONFIG_NOT_COHERENT_CACHE */
175 145
176#ifdef CONFIG_PPC64 146#ifdef CONFIG_PPC64
177 147