aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/powerpc/Kconfig3
-rw-r--r--arch/powerpc/include/asm/pci.h32
2 files changed, 4 insertions, 31 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 155d571f5e26..8a54eb8e3768 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -672,6 +672,9 @@ config ZONE_DMA
672 bool 672 bool
673 default y 673 default y
674 674
675config NEED_DMA_MAP_STATE
676 def_bool (PPC64 || NOT_COHERENT_CACHE)
677
675config GENERIC_ISA_DMA 678config GENERIC_ISA_DMA
676 bool 679 bool
677 depends on PPC64 || POWER4 || 6xx && !CPM2 680 depends on PPC64 || POWER4 || 6xx && !CPM2
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index b5ea626eea2d..4a9991ba249a 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