diff options
author | Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | 2005-09-03 15:56:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:06:08 -0700 |
commit | e63ea56fe2669c20f4668d89522500f4ab439b04 (patch) | |
tree | 74f1eca199852ad6dbaf70bdc90d755b0e598d98 /arch/mips | |
parent | e2de84920d9489f7fd87fa4b04d996d569def4fa (diff) | |
download | linux-e63ea56fe2669c20f4668d89522500f4ab439b04.tar.bz2 |
[PATCH] mips: add pcibios_bus_to_resource
This patch has added pcibios_bus_to_resource to MIPS.
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/pci/pci.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 8a5b52250bda..a8d499b0a36f 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -292,8 +292,25 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, region->end = res->end - offset; } +void __devinit +pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, + struct pci_bus_region *region) +{ + struct pci_controller *hose = (struct pci_controller *)dev->sysdata; + unsigned long offset = 0; + + if (res->flags & IORESOURCE_IO) + offset = hose->io_offset; + else if (res->flags & IORESOURCE_MEM) + offset = hose->mem_offset; + + res->start = region->start + offset; + res->end = region->end + offset; +} + #ifdef CONFIG_HOTPLUG EXPORT_SYMBOL(pcibios_resource_to_bus); +EXPORT_SYMBOL(pcibios_bus_to_resource); EXPORT_SYMBOL(PCIBIOS_MIN_IO); EXPORT_SYMBOL(PCIBIOS_MIN_MEM); #endif |