From: Dominik Brodowski Date: Wed, 27 Jul 2005 18:43:44 +0000 (-0700) Subject: [PATCH] Add pcibios_bus_to_resource for parisc X-Git-Tag: v2.6.13-rc4~25^2~147 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f94c8e1256fcb786e1918e30bdaeccf669bf63c;p=linux-2.6 [PATCH] Add pcibios_bus_to_resource for parisc Signed-off-by: Dominik Brodowski Acked-by: Grant Grundler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 3cb08a4a51..e6a891a0ca 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c @@ -255,8 +255,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 /*