blob: 1d00a3803c37820b93602cacce8dbf664b45b11a [file] [log] [blame]
Rene Bolldorf4ff40d52011-11-17 14:25:09 +00001/*
Gabor Juhose9b62e82012-03-14 10:36:14 +01002 * Atheros AR71XX/AR724X PCI support
Rene Bolldorf4ff40d52011-11-17 14:25:09 +00003 *
4 * Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com>
Gabor Juhose9b62e82012-03-14 10:36:14 +01005 * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
6 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
Rene Bolldorf4ff40d52011-11-17 14:25:09 +00007 *
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 Juhosd624bd32012-03-14 10:29:26 +010013#ifndef _ATH79_PCI_H
14#define _ATH79_PCI_H
Rene Bolldorf4ff40d52011-11-17 14:25:09 +000015
Gabor Juhosd22ce252012-03-14 10:36:11 +010016struct ath79_pci_irq {
Gabor Juhos617fed42013-02-03 09:58:37 +000017 int bus;
Gabor Juhosd22ce252012-03-14 10:36:11 +010018 u8 slot;
19 u8 pin;
20 int irq;
21};
22
Gabor Juhos6335aef2012-03-14 10:29:24 +010023#ifdef CONFIG_PCI
Gabor Juhosd22ce252012-03-14 10:36:11 +010024void ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map);
Gabor Juhosa68ad4d2012-03-14 10:36:09 +010025void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *dev));
Gabor Juhos6335aef2012-03-14 10:29:24 +010026int ath79_register_pci(void);
27#else
Gabor Juhosa68ad4d2012-03-14 10:36:09 +010028static inline void
Gabor Juhosd22ce252012-03-14 10:36:11 +010029ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map) {}
30static inline void
Gabor Juhosa68ad4d2012-03-14 10:36:09 +010031ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {}
Gabor Juhos6335aef2012-03-14 10:29:24 +010032static inline int ath79_register_pci(void) { return 0; }
33#endif
34
Gabor Juhosd624bd32012-03-14 10:29:26 +010035#endif /* _ATH79_PCI_H */