diff mbox

[11/18] Delayed mips setup of PCI IRQs to bus scan time

Message ID 1412222866-21068-12-git-send-email-matt@masarand.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

matt@masarand.com Oct. 2, 2014, 4:07 a.m. UTC
From: Matthew Minter <matt@masarand.com>

Currently mips PCI IRQs are assigned at boot, this creates an extra
pass over the PCI bus and causes hot-plugged devices which are not
present at boot to not be given IRQs, this patch set fixes this by
registering assignment functions which are then run later during the
device enable code path.

Signed-off-by: Matthew Minter <matt@masarand.com>

 arch/mips/pci/pci.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox


diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 1bf60b1..dc660a0 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -242,13 +242,18 @@  static int __init pcibios_init(void)
 	for (hose = hose_head; hose; hose = hose->next)
-	pci_fixup_irqs(pci_common_swizzle, pcibios_map_irq);
 	pci_initialized = 1;
 	return 0;
+int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
+       bridge->swizzle_irq = pci_common_swizzle;
+       bridge->map_irq = pcibios_map_irq;
+       return 0;
 static int pcibios_enable_resources(struct pci_dev *dev, int mask)