aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/iommu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 20:22:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 20:22:31 -0400
commit8e44e4347735229b518cc02938c351428bcd7492 (patch)
treee2d7b5998fa8ad76948b2e11591f4534f06f7958 /arch/powerpc/platforms/cell/iommu.c
parent06aab5a3084e1d825384fa353e6df4c7949c8683 (diff)
parent09dd3fc19c09f79115267361ecd7d5c5d2c27a3a (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: Fix build of cpm_uart due to core changes powerpc/8xx: Fix regression introduced by cache coherency rewrite powerpc/4xx: Fix erroneous xmon warning on PowerPC 4xx powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL powerpc: Cleanup linker script using new linker script macros. powerpc: Fix ibm,client-architecture-support printout powerpc: Increase NODES_SHIFT on 64bit from 4 to 8 powerpc/perf_counter: Fix vdso detection powerpc: Move 64bit heap above 1TB on machines with 1TB segments powerpc: Change archdata dma_data to a union powerpc: Rename get_dma_direct_offset get_dma_offset powerpc/mm: Remove duplicated #include powerpc/book3e-64: Remove duplicated #include powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE powerpc/pmc: Don't access lppaca on Book3E powerpc: kmalloc failure ignored in vio_build_iommu_table() hvc_console: Provide (un)locked version for hvc_resize()
Diffstat (limited to 'arch/powerpc/platforms/cell/iommu.c')
-rw-r--r--arch/powerpc/platforms/cell/iommu.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 416db17eb18f..ca5bfdfe47f2 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -657,15 +657,13 @@ static void cell_dma_dev_setup_fixed(struct device *dev);
657 657
658static void cell_dma_dev_setup(struct device *dev) 658static void cell_dma_dev_setup(struct device *dev)
659{ 659{
660 struct dev_archdata *archdata = &dev->archdata;
661
662 /* Order is important here, these are not mutually exclusive */ 660 /* Order is important here, these are not mutually exclusive */
663 if (get_dma_ops(dev) == &dma_iommu_fixed_ops) 661 if (get_dma_ops(dev) == &dma_iommu_fixed_ops)
664 cell_dma_dev_setup_fixed(dev); 662 cell_dma_dev_setup_fixed(dev);
665 else if (get_pci_dma_ops() == &dma_iommu_ops) 663 else if (get_pci_dma_ops() == &dma_iommu_ops)
666 archdata->dma_data = cell_get_iommu_table(dev); 664 set_iommu_table_base(dev, cell_get_iommu_table(dev));
667 else if (get_pci_dma_ops() == &dma_direct_ops) 665 else if (get_pci_dma_ops() == &dma_direct_ops)
668 archdata->dma_data = (void *)cell_dma_direct_offset; 666 set_dma_offset(dev, cell_dma_direct_offset);
669 else 667 else
670 BUG(); 668 BUG();
671} 669}
@@ -973,11 +971,10 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)
973 971
974static void cell_dma_dev_setup_fixed(struct device *dev) 972static void cell_dma_dev_setup_fixed(struct device *dev)
975{ 973{
976 struct dev_archdata *archdata = &dev->archdata;
977 u64 addr; 974 u64 addr;
978 975
979 addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base; 976 addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base;
980 archdata->dma_data = (void *)addr; 977 set_dma_offset(dev, addr);
981 978
982 dev_dbg(dev, "iommu: fixed addr = %llx\n", addr); 979 dev_dbg(dev, "iommu: fixed addr = %llx\n", addr);
983} 980}