[PARISC] Make local cache flushes take a void *
[powerpc.git] / arch / parisc / kernel / pci.c
index 3cb08a4..88cba49 100644 (file)
@@ -202,7 +202,8 @@ static void
 pcibios_link_hba_resources( struct resource *hba_res, struct resource *r)
 {
        if (!r->parent) {
-               printk(KERN_EMERG "PCI: Tell willy he's wrong\n");
+               printk(KERN_EMERG "PCI: resource not parented! [%lx-%lx]\n",
+                               r->start, r->end);
                r->parent = hba_res;
 
                /* reverse link is harder *sigh*  */
@@ -255,8 +256,26 @@ void __devinit pcibios_resource_to_bus(struct pci_dev *dev,
        pcibios_link_hba_resources(&hba->lmmio_space, bus->resource[1]);
 }
 
+void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+                             struct pci_bus_region *region)
+{
+       struct pci_bus *bus = dev->bus;
+       struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data);
+
+       if (res->flags & IORESOURCE_MEM) {
+               res->start = PCI_HOST_ADDR(hba, region->start);
+               res->end = PCI_HOST_ADDR(hba, region->end);
+       }
+
+       if (res->flags & IORESOURCE_IO) {
+               res->start = region->start;
+               res->end = region->end;
+       }
+}
+
 #ifdef CONFIG_HOTPLUG
 EXPORT_SYMBOL(pcibios_resource_to_bus);
+EXPORT_SYMBOL(pcibios_bus_to_resource);
 #endif
 
 /*