This will allow us to build without PCI easier.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
 struct pci_dev *ppc64_isabridge_dev = NULL;
 EXPORT_SYMBOL_GPL(ppc64_isabridge_dev);
 
+void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
+{
+       pci_dma_ops = dma_ops;
+}
+
 static void fixup_broken_pcnet32(struct pci_dev* dev)
 {
        if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
 
        unsigned long base = 0, size;
 
        /* When no iommu is present, we use direct DMA ops */
-       pci_dma_ops = &dma_direct_ops;
+       set_pci_dma_ops(&dma_direct_ops);
 
        /* First make sure all IOC translation is turned off */
        cell_disable_iommus();
        }
 
        /* Setup default PCI iommu ops */
-       pci_dma_ops = &dma_iommu_ops;
+       set_pci_dma_ops(&dma_iommu_ops);
 
  bail:
        /* Register callbacks on OF platform device addition/removal
 
                return -ENODEV;
 
        celleb_init_direct_mapping();
-       pci_dma_ops = &dma_direct_ops;
+       set_pci_dma_ops(&dma_direct_ops);
        bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
 
        return 0;
 
        ppc_md.tce_build = tce_build_iSeries;
        ppc_md.tce_free  = tce_free_iSeries;
 
-       pci_dma_ops = &dma_iommu_ops;
+       set_pci_dma_ops(&dma_iommu_ops);
 }
 
                /* Direct I/O, IOMMU off */
                ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null;
                ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null;
-               pci_dma_ops = &dma_direct_ops;
+               set_pci_dma_ops(&dma_direct_ops);
 
                return;
        }
        ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi;
        ppc_md.tce_build = iobmap_build;
        ppc_md.tce_free  = iobmap_free;
-       pci_dma_ops = &dma_iommu_ops;
+       set_pci_dma_ops(&dma_iommu_ops);
 }
 
 void __init alloc_iobmap_l2(void)
 
                /* Direct I/O, IOMMU off */
                ppc_md.pci_dma_dev_setup = NULL;
                ppc_md.pci_dma_bus_setup = NULL;
-               pci_dma_ops = &dma_direct_ops;
+               set_pci_dma_ops(&dma_direct_ops);
                return;
        }
 
 
        pSeries_reconfig_notifier_register(&iommu_reconfig_nb);
 
-       pci_dma_ops = &dma_iommu_ops;
+       set_pci_dma_ops(&dma_iommu_ops);
 }
 
 
                ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_dart;
 
                /* Setup pci_dma ops */
-               pci_dma_ops = &dma_iommu_ops;
+               set_pci_dma_ops(&dma_iommu_ops);
                return;
        }
 
        ppc_md.pci_dma_bus_setup = NULL;
 
        /* Setup pci_dma ops */
-       pci_dma_ops = &dma_direct_ops;
+       set_pci_dma_ops(&dma_direct_ops);
 }
 
 
 
  */
 #define PCI_DISABLE_MWI
 
+#ifdef CONFIG_PCI
 extern struct dma_mapping_ops *pci_dma_ops;
 
+extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops);
+
 /* For DAC DMA, we currently don't support it by default, but
  * we let 64-bit platforms override this.
  */
        return 0;
 }
 
-#ifdef CONFIG_PCI
 static inline void pci_dma_burst_advice(struct pci_dev *pdev,
                                        enum pci_dma_burst_strategy *strat,
                                        unsigned long *strategy_parameter)
        *strat = PCI_DMA_BURST_MULTIPLE;
        *strategy_parameter = cacheline_size;
 }
+#else  /* CONFIG_PCI */
+#define set_pci_dma_ops(d)
 #endif
 
 extern int pci_domain_nr(struct pci_bus *bus);