Skip to content

Commit 7ee214b

Browse files
committed
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. a2e50f5 ("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 <[email protected]> # SGI IP30 and IP27 Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Joshua Kinard <[email protected]>
1 parent f5853e8 commit 7ee214b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

arch/mips/include/asm/pci.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ struct pci_controller {
3939
unsigned long io_offset;
4040
unsigned long io_map_base;
4141
struct resource *busn_resource;
42-
unsigned long busn_offset;
4342

4443
#ifndef CONFIG_PCI_DOMAINS_GENERIC
4544
unsigned int index;

arch/mips/pci/pci-legacy.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ static void pcibios_scanbus(struct pci_controller *hose)
8686
hose->mem_resource, hose->mem_offset);
8787
pci_add_resource_offset(&resources,
8888
hose->io_resource, hose->io_offset);
89-
pci_add_resource_offset(&resources,
90-
hose->busn_resource, hose->busn_offset);
89+
pci_add_resource(&resources, hose->busn_resource);
9190
bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose,
9291
&resources);
9392
hose->bus = bus;

0 commit comments

Comments
 (0)