[POWERPC] Create and use set_pci_dma_ops
[powerpc.git] / arch / powerpc / kernel / pci_64.c
index 73c59ec..73d5093 100644 (file)
@@ -70,6 +70,11 @@ int global_phb_number;               /* Global phb counter */
 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)) {
@@ -381,8 +386,6 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
 
        pci_device_add(dev, bus);
 
-       /* XXX pci_scan_msi_device(dev); */
-
        return dev;
 }
 EXPORT_SYMBOL(of_create_pci_dev);
@@ -1325,7 +1328,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
        DBG(" -> mapped to linux irq %d\n", virq);
 
        pci_dev->irq = virq;
-       pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
 
        return 0;
 }
@@ -1430,7 +1432,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
 
        for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
                bus = pci_bus_b(ln);
-               if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate))
+               if (in_bus >= bus->number && in_bus <= bus->subordinate)
                        break;
                bus = NULL;
        }