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