diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 13:03:06 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 13:03:06 -0400 |
commit | e872d4cace8681838e8d18d52c92f4870e980a08 (patch) | |
tree | 082b75cc52935efae68f9f744bc3f8807f7176c6 /arch/ppc/kernel/pci.c | |
parent | 1f3a730117ceda2a7c917d687921fe3c82283968 (diff) | |
parent | 403fe5ae57c831968c3dbbaba291ae825a1c5aaa (diff) | |
download | talos-op-linux-e872d4cace8681838e8d18d52c92f4870e980a08.tar.gz talos-op-linux-e872d4cace8681838e8d18d52c92f4870e980a08.zip |
Merge ../from-linus
Diffstat (limited to 'arch/ppc/kernel/pci.c')
-rw-r--r-- | arch/ppc/kernel/pci.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 70cfb6ffd877..7b3586a3bf30 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c @@ -160,6 +160,21 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, } EXPORT_SYMBOL(pcibios_resource_to_bus); +void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, + struct pci_bus_region *region) +{ + unsigned long offset = 0; + struct pci_controller *hose = dev->sysdata; + + if (hose && res->flags & IORESOURCE_IO) + offset = (unsigned long)hose->io_base_virt - isa_io_base; + else if (hose && res->flags & IORESOURCE_MEM) + offset = hose->pci_mem_offset; + res->start = region->start + offset; + res->end = region->end + offset; +} +EXPORT_SYMBOL(pcibios_bus_to_resource); + /* * We need to avoid collisions with `mirrored' VGA ports * and other strange ISA hardware, so we always want the |