ar71xx: fix build error w/o CONFIG_PCI
[openwrt.git] / target / linux / ar71xx / files / arch / mips / include / asm / mach-ar71xx / pci.h
1 /*
2  *  Atheros AR71xx SoC specific PCI definitions
3  *
4  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
5  *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
6  *
7  *  This program is free software; you can redistribute it and/or modify it
8  *  under the terms of the GNU General Public License version 2 as published
9  *  by the Free Software Foundation.
10  */
11
12 #ifndef __ASM_MACH_AR71XX_PCI_H
13 #define __ASM_MACH_AR71XX_PCI_H
14
15 struct pci_dev;
16
17 struct ar71xx_pci_irq {
18         int     irq;
19         u8      slot;
20         u8      pin;
21 };
22
23 #ifdef CONFIG_PCI
24 extern int (*ar71xx_pci_plat_dev_init)(struct pci_dev *dev);
25 extern unsigned ar71xx_pci_nr_irqs __initdata;
26 extern struct ar71xx_pci_irq *ar71xx_pci_irq_map __initdata;
27
28 int ar71xx_pcibios_map_irq(const struct pci_dev *dev,
29                            uint8_t slot, uint8_t pin) __init;
30 int ar71xx_pcibios_init(void) __init;
31
32 int ar71xx_pci_be_handler(int is_fixup);
33
34 int ar724x_pcibios_map_irq(const struct pci_dev *dev,
35                            uint8_t slot, uint8_t pin) __init;
36 int ar724x_pcibios_init(void) __init;
37
38 int ar71xx_pci_init(unsigned nr_irqs, struct ar71xx_pci_irq *map) __init;
39 #else
40 static inline int ar71xx_pci_init(unsigned nr_irqs, struct ar71xx_pci_irq *map)
41 {
42         return 0;
43 }
44 #endif
45
46 #endif /* __ASM_MACH_AR71XX_PCI_H */