MIPS: ath79: allow to specify bus number in PCI IRQ maps
authorGabor Juhos <juhosg@openwrt.org>
Sun, 3 Feb 2013 09:58:37 +0000 (09:58 +0000)
committerJohn Crispin <blogic@openwrt.org>
Sun, 17 Feb 2013 00:25:38 +0000 (01:25 +0100)
This is needed for multiple PCI bus support.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4913/
Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/ath79/pci.c
arch/mips/ath79/pci.h

index c94bcec169abfadfacae9ac971d6d4b43144405d..d90e07136383d49b4523719282916187de0652cf 100644 (file)
@@ -75,7 +75,9 @@ int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
                const struct ath79_pci_irq *entry;
 
                entry = &ath79_pci_irq_map[i];
-               if (entry->slot == slot && entry->pin == pin) {
+               if (entry->bus == dev->bus->number &&
+                   entry->slot == slot &&
+                   entry->pin == pin) {
                        irq = entry->irq;
                        break;
                }
index 51c6625dcc6d358cc93f1cd587aa4e61da6e5aa9..1d00a3803c37820b93602cacce8dbf664b45b11a 100644 (file)
@@ -14,6 +14,7 @@
 #define _ATH79_PCI_H
 
 struct ath79_pci_irq {
+       int     bus;
        u8      slot;
        u8      pin;
        int     irq;