summaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79/pci.h
diff options
context:
space:
mode:
authorGabor Juhos2012-03-14 10:36:11 +0100
committerRalf Baechle2012-05-15 17:49:06 +0200
commitd22ce25f870dff2521d352e20d0fd2a7598fbf87 (patch)
tree1cff72b64ddf1a612d5b6096914ed3d086b774b2 /arch/mips/ath79/pci.h
parentMIPS: ath79: add support for the PCI host controller of the AR71XX SoCs (diff)
downloadkernel-qcow2-linux-d22ce25f870dff2521d352e20d0fd2a7598fbf87.tar.gz
kernel-qcow2-linux-d22ce25f870dff2521d352e20d0fd2a7598fbf87.tar.xz
kernel-qcow2-linux-d22ce25f870dff2521d352e20d0fd2a7598fbf87.zip
MIPS: ath79: allow to use SoC specific PCI IRQ maps
The PCI controllers in the AR71XX and in the AR724X SoCs are different, and both of them uses different IRQ wiring. The patch modifies the 'pcibios_map_irq' function in order to allow to use different IRQ maps for the different SoCs. The patch also adds a function, which lets the board setup code to override the default IRQ map. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3500/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79/pci.h')
-rw-r--r--arch/mips/ath79/pci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/ath79/pci.h b/arch/mips/ath79/pci.h
index de30e158932d..a5c4e5856202 100644
--- a/arch/mips/ath79/pci.h
+++ b/arch/mips/ath79/pci.h
@@ -15,13 +15,22 @@ struct ar724x_pci_data {
int irq;
};
+struct ath79_pci_irq {
+ u8 slot;
+ u8 pin;
+ int irq;
+};
+
void ar724x_pci_add_data(struct ar724x_pci_data *data, int size);
#ifdef CONFIG_PCI
+void ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map);
void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *dev));
int ath79_register_pci(void);
#else
static inline void
+ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map) {}
+static inline void
ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {}
static inline int ath79_register_pci(void) { return 0; }
#endif