blob: a5c4e5856202cc12fad34598038cc1fbb3bf5c38 [file] [log] [blame]
Rene Bolldorf4ff40d52011-11-17 14:25:09 +00001/*
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 Juhosd624bd32012-03-14 10:29:26 +010011#ifndef _ATH79_PCI_H
12#define _ATH79_PCI_H
Rene Bolldorf4ff40d52011-11-17 14:25:09 +000013
Gabor Juhosd624bd32012-03-14 10:29:26 +010014struct ar724x_pci_data {
Rene Bolldorf4ff40d52011-11-17 14:25:09 +000015 int irq;
Rene Bolldorf4ff40d52011-11-17 14:25:09 +000016};
17
Gabor Juhosd22ce252012-03-14 10:36:11 +010018struct ath79_pci_irq {
19 u8 slot;
20 u8 pin;
21 int irq;
22};
23
Gabor Juhosd624bd32012-03-14 10:29:26 +010024void ar724x_pci_add_data(struct ar724x_pci_data *data, int size);
Rene Bolldorf4ff40d52011-11-17 14:25:09 +000025
Gabor Juhos6335aef2012-03-14 10:29:24 +010026#ifdef CONFIG_PCI
Gabor Juhosd22ce252012-03-14 10:36:11 +010027void ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map);
Gabor Juhosa68ad4d2012-03-14 10:36:09 +010028void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *dev));
Gabor Juhos6335aef2012-03-14 10:29:24 +010029int ath79_register_pci(void);
30#else
Gabor Juhosa68ad4d2012-03-14 10:36:09 +010031static inline void
Gabor Juhosd22ce252012-03-14 10:36:11 +010032ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map) {}
33static inline void
Gabor Juhosa68ad4d2012-03-14 10:36:09 +010034ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {}
Gabor Juhos6335aef2012-03-14 10:29:24 +010035static inline int ath79_register_pci(void) { return 0; }
36#endif
37
Gabor Juhosd624bd32012-03-14 10:29:26 +010038#endif /* _ATH79_PCI_H */