Commit 9f2db9bb authored by David S. Miller's avatar David S. Miller

[SPARC64]: Implement pcibios_bus_to_resource.

parent 7533a2c1
......@@ -553,6 +553,23 @@ void pcibios_resource_to_bus(struct pci_dev *pdev, struct pci_bus_region *region
region->end = res->end - zero_res.start;
}
void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res,
struct pci_bus_region *region)
{
struct pci_pbm_info *pbm = pci_bus2pbm[pdev->bus->number];
struct resource *root;
res->start = region->start;
res->end = region->end;
if (res->flags & IORESOURCE_IO)
root = &pbm->io_space;
else
root = &pbm->mem_space;
pbm->parent->resource_adjust(pdev, res, root);
}
char * __init pcibios_setup(char *str)
{
if (!strcmp(str, "onboardfirst")) {
......
......@@ -209,6 +209,10 @@ extern void
pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res);
extern void
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region);
#endif /* __KERNEL__ */
#endif /* __SPARC64_PCI_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment