| 
									
										
										
										
											2011-11-17 14:25:09 +00:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:14 +01:00
										 |  |  |  *  Atheros AR71XX/AR724X PCI support | 
					
						
							| 
									
										
										
										
											2011-11-17 14:25:09 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  *  Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com> | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:14 +01:00
										 |  |  |  *  Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | 
					
						
							|  |  |  |  *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | 
					
						
							| 
									
										
										
										
											2011-11-17 14:25:09 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  *  This program is free software; you can redistribute it and/or modify it | 
					
						
							|  |  |  |  *  under the terms of the GNU General Public License version 2 as published | 
					
						
							|  |  |  |  *  by the Free Software Foundation. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:29:26 +01:00
										 |  |  | #ifndef _ATH79_PCI_H
 | 
					
						
							|  |  |  | #define _ATH79_PCI_H
 | 
					
						
							| 
									
										
										
										
											2011-11-17 14:25:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:11 +01:00
										 |  |  | struct ath79_pci_irq { | 
					
						
							| 
									
										
										
										
											2013-02-03 09:58:37 +00:00
										 |  |  | 	int	bus; | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:11 +01:00
										 |  |  | 	u8	slot; | 
					
						
							|  |  |  | 	u8	pin; | 
					
						
							|  |  |  | 	int	irq; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:29:24 +01:00
										 |  |  | #ifdef CONFIG_PCI
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:11 +01:00
										 |  |  | void ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map); | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:09 +01:00
										 |  |  | void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *dev)); | 
					
						
							| 
									
										
										
										
											2012-03-14 10:29:24 +01:00
										 |  |  | int ath79_register_pci(void); | 
					
						
							|  |  |  | #else
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:09 +01:00
										 |  |  | static inline void | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:11 +01:00
										 |  |  | ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map) {} | 
					
						
							|  |  |  | static inline void | 
					
						
							| 
									
										
										
										
											2012-03-14 10:36:09 +01:00
										 |  |  | ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {} | 
					
						
							| 
									
										
										
										
											2012-03-14 10:29:24 +01:00
										 |  |  | static inline int ath79_register_pci(void) { return 0; } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-14 10:29:26 +01:00
										 |  |  | #endif /* _ATH79_PCI_H */
 |