aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-08-04 15:08:23 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-28 00:24:09 -0400
commit3702977fa7d1a1a95caa387121fa7c9f4cae35f3 (patch)
tree8d77c9fb86d49feac2354491a8e4cca05ae5f612
parent762afb7317b1987fa0851135fe4f2947f68c3c2a (diff)
powerpc: Remove swiotlb_pci_dma_ops
Now swiotlb_pci_dma_ops is identical to swiotlb_dma_ops; we can use swiotlb_dma_ops with any devices. This removes swiotlb_pci_dma_ops. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/include/asm/swiotlb.h1
-rw-r--r--arch/powerpc/kernel/dma-swiotlb.c14
-rw-r--r--arch/powerpc/platforms/85xx/mpc8536_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c2
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c2
6 files changed, 4 insertions, 19 deletions
diff --git a/arch/powerpc/include/asm/swiotlb.h b/arch/powerpc/include/asm/swiotlb.h
index 31e0e43c880d..21ce0a3b4941 100644
--- a/arch/powerpc/include/asm/swiotlb.h
+++ b/arch/powerpc/include/asm/swiotlb.h
@@ -14,7 +14,6 @@
14#include <linux/swiotlb.h> 14#include <linux/swiotlb.h>
15 15
16extern struct dma_mapping_ops swiotlb_dma_ops; 16extern struct dma_mapping_ops swiotlb_dma_ops;
17extern struct dma_mapping_ops swiotlb_pci_dma_ops;
18 17
19static inline void dma_mark_clean(void *addr, size_t size) {} 18static inline void dma_mark_clean(void *addr, size_t size) {}
20 19
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c
index c9f6a302e879..ca141e108ae3 100644
--- a/arch/powerpc/kernel/dma-swiotlb.c
+++ b/arch/powerpc/kernel/dma-swiotlb.c
@@ -45,20 +45,6 @@ struct dma_mapping_ops swiotlb_dma_ops = {
45 .sync_sg_for_device = swiotlb_sync_sg_for_device 45 .sync_sg_for_device = swiotlb_sync_sg_for_device
46}; 46};
47 47
48struct dma_mapping_ops swiotlb_pci_dma_ops = {
49 .alloc_coherent = dma_direct_alloc_coherent,
50 .free_coherent = dma_direct_free_coherent,
51 .map_sg = swiotlb_map_sg_attrs,
52 .unmap_sg = swiotlb_unmap_sg_attrs,
53 .dma_supported = swiotlb_dma_supported,
54 .map_page = swiotlb_map_page,
55 .unmap_page = swiotlb_unmap_page,
56 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
57 .sync_single_range_for_device = swiotlb_sync_single_range_for_device,
58 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
59 .sync_sg_for_device = swiotlb_sync_sg_for_device
60};
61
62void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev) 48void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev)
63{ 49{
64 struct pci_controller *hose; 50 struct pci_controller *hose;
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index bf052c056106..004b7d36cdb7 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -96,7 +96,7 @@ static void __init mpc8536_ds_setup_arch(void)
96#ifdef CONFIG_SWIOTLB 96#ifdef CONFIG_SWIOTLB
97 if (lmb_end_of_DRAM() > max) { 97 if (lmb_end_of_DRAM() > max) {
98 ppc_swiotlb_enable = 1; 98 ppc_swiotlb_enable = 1;
99 set_pci_dma_ops(&swiotlb_pci_dma_ops); 99 set_pci_dma_ops(&swiotlb_dma_ops);
100 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 100 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
101 } 101 }
102#endif 102#endif
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index c6f92ccd963b..544011a562fb 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -192,7 +192,7 @@ static void __init mpc85xx_ds_setup_arch(void)
192#ifdef CONFIG_SWIOTLB 192#ifdef CONFIG_SWIOTLB
193 if (lmb_end_of_DRAM() > max) { 193 if (lmb_end_of_DRAM() > max) {
194 ppc_swiotlb_enable = 1; 194 ppc_swiotlb_enable = 1;
195 set_pci_dma_ops(&swiotlb_pci_dma_ops); 195 set_pci_dma_ops(&swiotlb_dma_ops);
196 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 196 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
197 } 197 }
198#endif 198#endif
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 25998b661f20..3909d57b86e3 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -255,7 +255,7 @@ static void __init mpc85xx_mds_setup_arch(void)
255#ifdef CONFIG_SWIOTLB 255#ifdef CONFIG_SWIOTLB
256 if (lmb_end_of_DRAM() > max) { 256 if (lmb_end_of_DRAM() > max) {
257 ppc_swiotlb_enable = 1; 257 ppc_swiotlb_enable = 1;
258 set_pci_dma_ops(&swiotlb_pci_dma_ops); 258 set_pci_dma_ops(&swiotlb_dma_ops);
259 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 259 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
260 } 260 }
261#endif 261#endif
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 803230156875..2aa69a69bcc8 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -105,7 +105,7 @@ mpc86xx_hpcn_setup_arch(void)
105#ifdef CONFIG_SWIOTLB 105#ifdef CONFIG_SWIOTLB
106 if (lmb_end_of_DRAM() > max) { 106 if (lmb_end_of_DRAM() > max) {
107 ppc_swiotlb_enable = 1; 107 ppc_swiotlb_enable = 1;
108 set_pci_dma_ops(&swiotlb_pci_dma_ops); 108 set_pci_dma_ops(&swiotlb_dma_ops);
109 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 109 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
110 } 110 }
111#endif 111#endif