aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/dma_64.c9
-rw-r--r--include/asm-powerpc/dma-mapping.h9
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c
index 3ae0c35d21f9..ae5708e3a312 100644
--- a/arch/powerpc/kernel/dma_64.c
+++ b/arch/powerpc/kernel/dma_64.c
@@ -15,15 +15,6 @@
15 * Generic iommu implementation 15 * Generic iommu implementation
16 */ 16 */
17 17
18static inline unsigned long device_to_mask(struct device *dev)
19{
20 if (dev->dma_mask && *dev->dma_mask)
21 return *dev->dma_mask;
22 /* Assume devices without mask can take 32 bit addresses */
23 return 0xfffffffful;
24}
25
26
27/* Allocates a contiguous real buffer and creates mappings over it. 18/* Allocates a contiguous real buffer and creates mappings over it.
28 * Returns the virtual address of the buffer and sets dma_handle 19 * Returns the virtual address of the buffer and sets dma_handle
29 * to the dma address (mapping) of the first page. 20 * to the dma address (mapping) of the first page.
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index de1395023cb1..74c549780987 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -45,6 +45,15 @@ extern void __dma_sync_page(struct page *page, unsigned long offset,
45#endif /* ! CONFIG_NOT_COHERENT_CACHE */ 45#endif /* ! CONFIG_NOT_COHERENT_CACHE */
46 46
47#ifdef CONFIG_PPC64 47#ifdef CONFIG_PPC64
48
49static inline unsigned long device_to_mask(struct device *dev)
50{
51 if (dev->dma_mask && *dev->dma_mask)
52 return *dev->dma_mask;
53 /* Assume devices without mask can take 32 bit addresses */
54 return 0xfffffffful;
55}
56
48/* 57/*
49 * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO 58 * DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO
50 */ 59 */