提交 7ee214b5 编写于 作者: B Bjorn Helgaas

MIPS: PCI: Remove unused busn_offset

pci_add_resource_offset() is for host bridge windows where the bridge
translates CPU addresses to PCI bus addresses by adding an offset.  To my
knowledge, no host bridge translates bus numbers, so this is only useful
for MEM and IO windows.  In any event, host->busn_offset is never set to
anything other than zero, so pci_add_resource() is sufficient.

a2e50f53 ("MIPS: PCI: Add a hook for IORESOURCE_BUS in
pci_controller/bridge_controller") also added busn_resource itself.  This
is currently unused but may be used by future SGI IP27 fixes, so I left it
there.

Tested-by: Joshua Kinard <kumba@gentoo.org>	# SGI IP30 and IP27
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NJoshua Kinard <kumba@gentoo.org>
上级 f5853e84
...@@ -39,7 +39,6 @@ struct pci_controller { ...@@ -39,7 +39,6 @@ struct pci_controller {
unsigned long io_offset; unsigned long io_offset;
unsigned long io_map_base; unsigned long io_map_base;
struct resource *busn_resource; struct resource *busn_resource;
unsigned long busn_offset;
#ifndef CONFIG_PCI_DOMAINS_GENERIC #ifndef CONFIG_PCI_DOMAINS_GENERIC
unsigned int index; unsigned int index;
......
...@@ -86,8 +86,7 @@ static void pcibios_scanbus(struct pci_controller *hose) ...@@ -86,8 +86,7 @@ static void pcibios_scanbus(struct pci_controller *hose)
hose->mem_resource, hose->mem_offset); hose->mem_resource, hose->mem_offset);
pci_add_resource_offset(&resources, pci_add_resource_offset(&resources,
hose->io_resource, hose->io_offset); hose->io_resource, hose->io_offset);
pci_add_resource_offset(&resources, pci_add_resource(&resources, hose->busn_resource);
hose->busn_resource, hose->busn_offset);
bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose, bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose,
&resources); &resources);
hose->bus = bus; hose->bus = bus;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册