Commit 797cfc4f authored by Sinan Kaya's avatar Sinan Kaya Committed by Matt Turner

alpha: deprecate pci_get_bus_and_slot()

pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
where a PCI device is present. This restricts the device drivers to be
reused for other domain numbers.

Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't
extract the domain number. Other places, use the actual domain number from
the device.
Signed-off-by: default avatarSinan Kaya <okaya@codeaurora.org>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent 84e45536
...@@ -425,7 +425,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) ...@@ -425,7 +425,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
if (bus == 0 && dfn == 0) { if (bus == 0 && dfn == 0) {
hose = pci_isa_hose; hose = pci_isa_hose;
} else { } else {
dev = pci_get_bus_and_slot(bus, dfn); dev = pci_get_domain_bus_and_slot(0, bus, dfn);
if (!dev) if (!dev)
return -ENODEV; return -ENODEV;
hose = dev->sysdata; hose = dev->sysdata;
......
...@@ -237,7 +237,7 @@ nautilus_init_pci(void) ...@@ -237,7 +237,7 @@ nautilus_init_pci(void)
bus = hose->bus = bridge->bus; bus = hose->bus = bridge->bus;
pcibios_claim_one_bus(bus); pcibios_claim_one_bus(bus);
irongate = pci_get_bus_and_slot(0, 0); irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0);
bus->self = irongate; bus->self = irongate;
bus->resource[0] = &irongate_io; bus->resource[0] = &irongate_io;
bus->resource[1] = &irongate_mem; bus->resource[1] = &irongate_mem;
......
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