From: Dominik Brodowski Date: Wed, 27 Jul 2005 18:43:44 +0000 (-0700) Subject: [PATCH] Add pcibios_bus_to_resource for parisc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f94c8e1256fcb786e1918e30bdaeccf669bf63c;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 3cb08a4a513..e6a891a0cad 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 /*