ar71xx: move the watchdog driver to the kernel
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / patches-3.8 / 016-MIPS-ath79-allow-to-specify-bus-number-in-PCI-IRQ-ma.patch
1 From 53ba4919664636487155c810fb49781169780e0c Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Sun, 3 Feb 2013 09:58:37 +0000
4 Subject: [PATCH] MIPS: ath79: allow to specify bus number in PCI IRQ maps
5
6 commit 617fed41e98417f3ea3e9974be251e125c8796f2 upstream.
7
8 This is needed for multiple PCI bus support.
9
10 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
11 Patchwork: http://patchwork.linux-mips.org/patch/4913/
12 Signed-off-by: John Crispin <blogic@openwrt.org>
13 ---
14 arch/mips/ath79/pci.c | 4 +++-
15 arch/mips/ath79/pci.h | 1 +
16 2 files changed, 4 insertions(+), 1 deletion(-)
17
18 --- a/arch/mips/ath79/pci.c
19 +++ b/arch/mips/ath79/pci.c
20 @@ -75,7 +75,9 @@ int __init pcibios_map_irq(const struct
21 const struct ath79_pci_irq *entry;
22
23 entry = &ath79_pci_irq_map[i];
24 - if (entry->slot == slot && entry->pin == pin) {
25 + if (entry->bus == dev->bus->number &&
26 + entry->slot == slot &&
27 + entry->pin == pin) {
28 irq = entry->irq;
29 break;
30 }
31 --- a/arch/mips/ath79/pci.h
32 +++ b/arch/mips/ath79/pci.h
33 @@ -14,6 +14,7 @@
34 #define _ATH79_PCI_H
35
36 struct ath79_pci_irq {
37 + int bus;
38 u8 slot;
39 u8 pin;
40 int irq;