Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] Add pcibios_bus_to_resource for parisc

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Dominik Brodowski and committed by
Linus Torvalds
0f94c8e1 d912d1ff

+18
+18
arch/parisc/kernel/pci.c
··· 255 255 pcibios_link_hba_resources(&hba->lmmio_space, bus->resource[1]); 256 256 } 257 257 258 + void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, 259 + struct pci_bus_region *region) 260 + { 261 + struct pci_bus *bus = dev->bus; 262 + struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data); 263 + 264 + if (res->flags & IORESOURCE_MEM) { 265 + res->start = PCI_HOST_ADDR(hba, region->start); 266 + res->end = PCI_HOST_ADDR(hba, region->end); 267 + } 268 + 269 + if (res->flags & IORESOURCE_IO) { 270 + res->start = region->start; 271 + res->end = region->end; 272 + } 273 + } 274 + 258 275 #ifdef CONFIG_HOTPLUG 259 276 EXPORT_SYMBOL(pcibios_resource_to_bus); 277 + EXPORT_SYMBOL(pcibios_bus_to_resource); 260 278 #endif 261 279 262 280 /*