Rene Bolldorf | 4ff40d5 | 2011-11-17 14:25:09 +0000 | [diff] [blame] | 1 | /* |
Gabor Juhos | e9b62e8 | 2012-03-14 10:36:14 +0100 | [diff] [blame] | 2 | * Atheros AR71XX/AR724X PCI support |
Rene Bolldorf | 4ff40d5 | 2011-11-17 14:25:09 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com> |
Gabor Juhos | e9b62e8 | 2012-03-14 10:36:14 +0100 | [diff] [blame] | 5 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> |
| 6 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> |
Rene Bolldorf | 4ff40d5 | 2011-11-17 14:25:09 +0000 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License version 2 as published |
| 10 | * by the Free Software Foundation. |
| 11 | */ |
| 12 | |
Gabor Juhos | d624bd3 | 2012-03-14 10:29:26 +0100 | [diff] [blame] | 13 | #ifndef _ATH79_PCI_H |
| 14 | #define _ATH79_PCI_H |
Rene Bolldorf | 4ff40d5 | 2011-11-17 14:25:09 +0000 | [diff] [blame] | 15 | |
Gabor Juhos | d22ce25 | 2012-03-14 10:36:11 +0100 | [diff] [blame] | 16 | struct ath79_pci_irq { |
Gabor Juhos | 617fed4 | 2013-02-03 09:58:37 +0000 | [diff] [blame] | 17 | int bus; |
Gabor Juhos | d22ce25 | 2012-03-14 10:36:11 +0100 | [diff] [blame] | 18 | u8 slot; |
| 19 | u8 pin; |
| 20 | int irq; |
| 21 | }; |
| 22 | |
Gabor Juhos | 6335aef | 2012-03-14 10:29:24 +0100 | [diff] [blame] | 23 | #ifdef CONFIG_PCI |
Gabor Juhos | d22ce25 | 2012-03-14 10:36:11 +0100 | [diff] [blame] | 24 | void ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map); |
Gabor Juhos | a68ad4d | 2012-03-14 10:36:09 +0100 | [diff] [blame] | 25 | void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *dev)); |
Gabor Juhos | 6335aef | 2012-03-14 10:29:24 +0100 | [diff] [blame] | 26 | int ath79_register_pci(void); |
| 27 | #else |
Gabor Juhos | a68ad4d | 2012-03-14 10:36:09 +0100 | [diff] [blame] | 28 | static inline void |
Gabor Juhos | d22ce25 | 2012-03-14 10:36:11 +0100 | [diff] [blame] | 29 | ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map) {} |
| 30 | static inline void |
Gabor Juhos | a68ad4d | 2012-03-14 10:36:09 +0100 | [diff] [blame] | 31 | ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {} |
Gabor Juhos | 6335aef | 2012-03-14 10:29:24 +0100 | [diff] [blame] | 32 | static inline int ath79_register_pci(void) { return 0; } |
| 33 | #endif |
| 34 | |
Gabor Juhos | d624bd3 | 2012-03-14 10:29:26 +0100 | [diff] [blame] | 35 | #endif /* _ATH79_PCI_H */ |